Search in sources :

Example 36 with TransGraph

use of org.pentaho.di.ui.spoon.trans.TransGraph 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)

Example 37 with TransGraph

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

the class MainSpoonPerspective method getActiveMeta.

@Override
public EngineMetaInterface getActiveMeta() {
    if (tabfolder == null) {
        return null;
    }
    TabItem tabItem = tabfolder.getSelected();
    if (tabItem == null) {
        return null;
    }
    // What transformation is in the active tab?
    // TransLog, TransGraph & TransHist contain the same transformation
    // 
    TabMapEntry mapEntry = ((Spoon) SpoonFactory.getInstance()).delegates.tabs.getTab(tabfolder.getSelected());
    EngineMetaInterface meta = null;
    if (mapEntry != null) {
        if (mapEntry.getObject() instanceof TransGraph) {
            meta = (mapEntry.getObject()).getMeta();
        }
        if (mapEntry.getObject() instanceof JobGraph) {
            meta = (mapEntry.getObject()).getMeta();
        }
    }
    return meta;
}
Also used : TabItem(org.pentaho.xul.swt.tab.TabItem) JobGraph(org.pentaho.di.ui.spoon.job.JobGraph) EngineMetaInterface(org.pentaho.di.core.EngineMetaInterface) TransGraph(org.pentaho.di.ui.spoon.trans.TransGraph)

Aggregations

TransGraph (org.pentaho.di.ui.spoon.trans.TransGraph)37 JobGraph (org.pentaho.di.ui.spoon.job.JobGraph)15 TransMeta (org.pentaho.di.trans.TransMeta)10 Test (org.junit.Test)8 KettleExtensionPoint (org.pentaho.di.core.extension.KettleExtensionPoint)7 ArrayList (java.util.ArrayList)6 Point (org.pentaho.di.core.gui.Point)6 JobMeta (org.pentaho.di.job.JobMeta)6 StepMeta (org.pentaho.di.trans.step.StepMeta)6 EngineMetaInterface (org.pentaho.di.core.EngineMetaInterface)5 KettleException (org.pentaho.di.core.exception.KettleException)5 TabMapEntry (org.pentaho.di.ui.spoon.TabMapEntry)5 Browser (org.eclipse.swt.browser.Browser)4 ValueMetaString (org.pentaho.di.core.row.value.ValueMetaString)4 FileObject (org.apache.commons.vfs2.FileObject)3 SashForm (org.eclipse.swt.custom.SashForm)3 Composite (org.eclipse.swt.widgets.Composite)3 MessageBox (org.eclipse.swt.widgets.MessageBox)3 RowMetaInterface (org.pentaho.di.core.row.RowMetaInterface)3 TabItem (org.pentaho.xul.swt.tab.TabItem)3