Search in sources :

Example 16 with TabMapEntry

use of org.pentaho.di.ui.spoon.TabMapEntry in project pentaho-kettle by pentaho.

the class SpoonTransformationDelegate method tabSelected.

public void tabSelected(TabItem item) {
    List<TabMapEntry> collection = spoon.delegates.tabs.getTabs();
    // 
    for (TabMapEntry entry : collection) {
        if (item.equals(entry.getTabItem())) {
            // 
            if (entry.getObject() instanceof TransGraph || entry.getObject() instanceof JobGraph) {
                EngineMetaInterface meta = entry.getObject().getMeta();
                if (meta != null) {
                    meta.setInternalKettleVariables();
                }
                if (spoon.getCoreObjectsState() != SpoonInterface.STATE_CORE_OBJECTS_SPOON) {
                    spoon.refreshCoreObjects();
                }
            }
        }
    }
    // Also refresh the tree
    spoon.refreshTree();
    spoon.enableMenus();
}
Also used : JobGraph(org.pentaho.di.ui.spoon.job.JobGraph) EngineMetaInterface(org.pentaho.di.core.EngineMetaInterface) TransGraph(org.pentaho.di.ui.spoon.trans.TransGraph) TabMapEntry(org.pentaho.di.ui.spoon.TabMapEntry)

Aggregations

TabMapEntry (org.pentaho.di.ui.spoon.TabMapEntry)16 KettleException (org.pentaho.di.core.exception.KettleException)7 TabItem (org.pentaho.xul.swt.tab.TabItem)7 KettleExtensionPoint (org.pentaho.di.core.extension.KettleExtensionPoint)6 TransGraph (org.pentaho.di.ui.spoon.trans.TransGraph)6 JobGraph (org.pentaho.di.ui.spoon.job.JobGraph)5 Point (org.pentaho.di.core.gui.Point)4 PropsUI (org.pentaho.di.ui.core.PropsUI)4 EngineMetaInterface (org.pentaho.di.core.EngineMetaInterface)3 JobMeta (org.pentaho.di.job.JobMeta)3 KettleRepositoryLostException (org.pentaho.di.repository.KettleRepositoryLostException)3 TransMeta (org.pentaho.di.trans.TransMeta)3 ErrorDialog (org.pentaho.di.ui.core.dialog.ErrorDialog)3 XulException (org.pentaho.ui.xul.XulException)3 TabSet (org.pentaho.xul.swt.tab.TabSet)3 FileObject (org.apache.commons.vfs2.FileObject)2 AbstractMeta (org.pentaho.di.base.AbstractMeta)2 RepositoryDirectoryInterface (org.pentaho.di.repository.RepositoryDirectoryInterface)2 AbstractGraph (org.pentaho.di.ui.spoon.AbstractGraph)2 SpoonBrowser (org.pentaho.di.ui.spoon.SpoonBrowser)2