Search in sources :

Example 1 with NewDataModelAction

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);
}
Also used : NewDataModelAction(org.talend.mdm.repository.ui.actions.datamodel.NewDataModelAction)

Example 2 with NewDataModelAction

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);
    }
}
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

NewDataModelAction (org.talend.mdm.repository.ui.actions.datamodel.NewDataModelAction)2 PartInitException (org.eclipse.ui.PartInitException)1 CommonViewer (org.eclipse.ui.navigator.CommonViewer)1 IRepositoryViewObject (org.talend.core.model.repository.IRepositoryViewObject)1 MDMRepositoryView (org.talend.mdm.repository.ui.navigator.MDMRepositoryView)1