use of org.talend.mdm.repository.ui.actions.datamodel.NewDataModelAction in project tmdm-studio-se by Talend.
the class DataModelActionProvider method initCommonViewer.
@Override
public void initCommonViewer(CommonViewer commonViewer) {
super.initCommonViewer(commonViewer);
addAction = new NewDataModelAction();
//
addAction.initCommonViewer(commonViewer);
}
use of org.talend.mdm.repository.ui.actions.datamodel.NewDataModelAction in project tmdm-studio-se by Talend.
the class AddDataModelLinkAction method doRun.
protected void doRun(IIntroSite site, Properties params) {
try {
MDMRepositoryView findView = showRepositoryView();
CommonViewer commonViewer = findView.getCommonViewer();
IRepositoryViewObject[] categoryViewObjects = RepositoryResourceUtil.getCategoryViewObjects(IServerObjectRepositoryType.TYPE_DATAMODEL);
if (categoryViewObjects.length > 0) {
NewDataModelAction addAction = new NewDataModelAction();
addAction.initCommonViewer(commonViewer);
addAction.setParentItem((ContainerItem) categoryViewObjects[0].getProperty().getItem());
addAction.run();
}
} catch (PartInitException e) {
log.error(e.getMessage(), e);
}
}
Aggregations