Search in sources :

Example 26 with JobGraph

use of org.pentaho.di.ui.spoon.job.JobGraph 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 27 with JobGraph

use of org.pentaho.di.ui.spoon.job.JobGraph 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

JobGraph (org.pentaho.di.ui.spoon.job.JobGraph)27 TransGraph (org.pentaho.di.ui.spoon.trans.TransGraph)15 JobMeta (org.pentaho.di.job.JobMeta)8 TransMeta (org.pentaho.di.trans.TransMeta)6 Test (org.junit.Test)5 TabMapEntry (org.pentaho.di.ui.spoon.TabMapEntry)5 TabItem (org.pentaho.xul.swt.tab.TabItem)5 EngineMetaInterface (org.pentaho.di.core.EngineMetaInterface)4 KettleException (org.pentaho.di.core.exception.KettleException)4 KettleExtensionPoint (org.pentaho.di.core.extension.KettleExtensionPoint)4 FileObject (org.apache.commons.vfs2.FileObject)3 Point (org.pentaho.di.core.gui.Point)3 JobEntryCopy (org.pentaho.di.job.entry.JobEntryCopy)3 AbstractMeta (org.pentaho.di.base.AbstractMeta)2 SimpleLoggingObject (org.pentaho.di.core.logging.SimpleLoggingObject)2 TransAction (org.pentaho.di.core.undo.TransAction)2 JobExecutionConfiguration (org.pentaho.di.job.JobExecutionConfiguration)2 PurRepository (org.pentaho.di.repository.pur.PurRepository)2 IAbsSecurityProvider (org.pentaho.di.ui.repository.pur.services.IAbsSecurityProvider)2 Spoon (org.pentaho.di.ui.spoon.Spoon)2