use of org.talend.mdm.repository.ui.editors.XObjectBrowserInput2 in project tmdm-studio-se by Talend.
the class MDMEventManagerAction method doRun.
@Override
protected void doRun() {
boolean checkMissingJar = MissingJarService.getInstance().checkMissingJar(true);
if (!checkMissingJar) {
return;
}
MDMServerDef serverDef = getServerDef();
if (serverDef != null) {
try {
ServerDefService.checkMDMConnection(serverDef);
} catch (Exception e) {
MessageDialog.openError(getShell(), Messages.MDMEventManagerAction_CheckConnection, Messages.MDMEventManagerAction_connectFailed);
return;
}
IRepositoryViewObject eventViewObj = getEventMangerViewObject();
TreeObject treeObj = createModel();
XObjectBrowserInput2 input = new XObjectBrowserInput2(eventViewObj, treeObj, Messages.EventManager_text);
input.setServerDef(serverDef);
if (page == null) {
this.page = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();
}
try {
this.page.openEditor(input, XObjectBrowser2.EDITOR_ID);
} catch (PartInitException e) {
log.error(e.getMessage(), e);
}
setServerDef(null);
}
}
use of org.talend.mdm.repository.ui.editors.XObjectBrowserInput2 in project tmdm-studio-se by Talend.
the class RepositoryNodeActionProviderAdapter method getOpenEditorInput.
/**
* The child class can override this method, current implement is adapt to most of MDMServerobject
*/
@Override
public IRepositoryViewEditorInput getOpenEditorInput(IRepositoryViewObject viewObj) {
Item item = viewObj.getProperty().getItem();
MDMServerObject serverObject = ((MDMServerObjectItem) item).getMDMServerObject();
if (serverObject.getType() == TreeObject.DATA_CLUSTER) {
// Data Cluster
return new XObjectBrowserInput2(viewObj);
}
return new XObjectEditorInput2(viewObj);
}
Aggregations