Search in sources :

Example 1 with ItemsTrashBrowserMainPage

use of com.amalto.workbench.editors.ItemsTrashBrowserMainPage in project tmdm-studio-se by Talend.

the class XObjectBrowser2 method addPageForXObject.

@Override
protected void addPageForXObject(TreeObject xobject) throws PartInitException {
    switch(xobject.getType()) {
        case TreeObject.VIEW:
            addPage(new ViewBrowserMainPage2(this));
            break;
        case TreeObject.DATA_CLUSTER:
            if (xobject.getDisplayName() != null && xobject.getDisplayName().equals(XSystemObjects.DC_MDMITEMSTRASH.getName())) {
                addPage(new ItemsTrashBrowserMainPage(this));
                break;
            }
            // page index 0
            addPage(new DataClusterBrowserMainPage(this));
            setPageImage(0, EclipseResourceManager.getImage(RepositoryPlugin.PLUGIN_ID, masterImgPath));
            setPageText(0, Messages.bind(Messages.DataClusterBrowserMainPage_masterDataContainer, ((XObjectBrowserInput) getEditorInput()).getName()));
            exAdapter = ExAdapterManager.getAdapter(this, IXObjectBrowser2ExAdapter.class);
            if (exAdapter != null) {
                boolean pageAdded = exAdapter.addPageForXObject(this, getEditorInput(), xobject);
                if (pageAdded) {
                    setPageText(1, exAdapter.getPageText());
                    setPageImage(1, exAdapter.getPageImage());
                    stagingDBExist = exAdapter.isStagingDBExist();
                }
            }
            break;
        case TreeObject.SUBSCRIPTION_ENGINE:
            try {
                addPage(new RoutingEngineV2BrowserMainPage2(this));
            } catch (PartInitException e) {
                log.error(e.getMessage(), e);
            }
            break;
    }
// switch
}
Also used : DataClusterBrowserMainPage(com.amalto.workbench.editors.DataClusterBrowserMainPage) XObjectBrowserInput(com.amalto.workbench.providers.XObjectBrowserInput) PartInitException(org.eclipse.ui.PartInitException) ItemsTrashBrowserMainPage(com.amalto.workbench.editors.ItemsTrashBrowserMainPage)

Aggregations

DataClusterBrowserMainPage (com.amalto.workbench.editors.DataClusterBrowserMainPage)1 ItemsTrashBrowserMainPage (com.amalto.workbench.editors.ItemsTrashBrowserMainPage)1 XObjectBrowserInput (com.amalto.workbench.providers.XObjectBrowserInput)1 PartInitException (org.eclipse.ui.PartInitException)1