Search in sources :

Example 1 with XObjectEditorInput2

use of org.talend.mdm.repository.ui.editors.XObjectEditorInput2 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);
}
Also used : WorkspaceRootItem(org.talend.mdm.repository.model.mdmproperties.WorkspaceRootItem) Item(org.talend.core.model.properties.Item) MDMServerObjectItem(org.talend.mdm.repository.model.mdmproperties.MDMServerObjectItem) FolderItem(org.talend.core.model.properties.FolderItem) MDMItem(org.talend.mdm.repository.model.mdmproperties.MDMItem) ContainerItem(org.talend.mdm.repository.model.mdmproperties.ContainerItem) XObjectEditorInput2(org.talend.mdm.repository.ui.editors.XObjectEditorInput2) XObjectBrowserInput2(org.talend.mdm.repository.ui.editors.XObjectBrowserInput2) MDMServerObjectItem(org.talend.mdm.repository.model.mdmproperties.MDMServerObjectItem) MDMServerObject(org.talend.mdm.repository.model.mdmserverobject.MDMServerObject)

Aggregations

FolderItem (org.talend.core.model.properties.FolderItem)1 Item (org.talend.core.model.properties.Item)1 ContainerItem (org.talend.mdm.repository.model.mdmproperties.ContainerItem)1 MDMItem (org.talend.mdm.repository.model.mdmproperties.MDMItem)1 MDMServerObjectItem (org.talend.mdm.repository.model.mdmproperties.MDMServerObjectItem)1 WorkspaceRootItem (org.talend.mdm.repository.model.mdmproperties.WorkspaceRootItem)1 MDMServerObject (org.talend.mdm.repository.model.mdmserverobject.MDMServerObject)1 XObjectBrowserInput2 (org.talend.mdm.repository.ui.editors.XObjectBrowserInput2)1 XObjectEditorInput2 (org.talend.mdm.repository.ui.editors.XObjectEditorInput2)1