use of org.talend.mdm.repository.ui.navigator.MDMRepositoryView 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