Search in sources :

Example 6 with MDMRepositoryView

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);
    }
}
Also used : CommonViewer(org.eclipse.ui.navigator.CommonViewer) IRepositoryViewObject(org.talend.core.model.repository.IRepositoryViewObject) NewDataModelAction(org.talend.mdm.repository.ui.actions.datamodel.NewDataModelAction) PartInitException(org.eclipse.ui.PartInitException) MDMRepositoryView(org.talend.mdm.repository.ui.navigator.MDMRepositoryView)

Aggregations

MDMRepositoryView (org.talend.mdm.repository.ui.navigator.MDMRepositoryView)6 IWorkbenchPage (org.eclipse.ui.IWorkbenchPage)2 PartInitException (org.eclipse.ui.PartInitException)2 DeployService (org.talend.mdm.repository.core.service.DeployService)2 ImportExchangeOptionsDialog (com.amalto.workbench.dialogs.ImportExchangeOptionsDialog)1 File (java.io.File)1 FileFilter (java.io.FileFilter)1 FileInputStream (java.io.FileInputStream)1 InputStream (java.io.InputStream)1 WizardDialog (org.eclipse.jface.wizard.WizardDialog)1 CommonViewer (org.eclipse.ui.navigator.CommonViewer)1 ItemState (org.talend.core.model.properties.ItemState)1 IRepositoryViewObject (org.talend.core.model.repository.IRepositoryViewObject)1 WSDataModelItem (org.talend.mdm.repository.model.mdmproperties.WSDataModelItem)1 WSDataModelE (org.talend.mdm.repository.model.mdmserverobject.WSDataModelE)1 DeployAllAction (org.talend.mdm.repository.ui.actions.DeployAllAction)1 NewDataModelAction (org.talend.mdm.repository.ui.actions.datamodel.NewDataModelAction)1