Search in sources :

Example 21 with EngineMetaInterface

use of org.pentaho.di.core.EngineMetaInterface 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

EngineMetaInterface (org.pentaho.di.core.EngineMetaInterface)21 KettleException (org.pentaho.di.core.exception.KettleException)9 TransMeta (org.pentaho.di.trans.TransMeta)7 RepositoryDirectoryInterface (org.pentaho.di.repository.RepositoryDirectoryInterface)5 TransGraph (org.pentaho.di.ui.spoon.trans.TransGraph)5 MalformedURLException (java.net.MalformedURLException)4 FileSystemException (org.apache.commons.vfs2.FileSystemException)4 SWTException (org.eclipse.swt.SWTException)4 Test (org.junit.Test)4 KettleAuthException (org.pentaho.di.core.exception.KettleAuthException)4 KettleFileException (org.pentaho.di.core.exception.KettleFileException)4 KettleMissingPluginsException (org.pentaho.di.core.exception.KettleMissingPluginsException)4 KettleRowException (org.pentaho.di.core.exception.KettleRowException)4 KettleValueException (org.pentaho.di.core.exception.KettleValueException)4 KettleXMLException (org.pentaho.di.core.exception.KettleXMLException)4 LifecycleException (org.pentaho.di.core.lifecycle.LifecycleException)4 JobMeta (org.pentaho.di.job.JobMeta)4 KettleRepositoryLostException (org.pentaho.di.repository.KettleRepositoryLostException)4 Repository (org.pentaho.di.repository.Repository)4 ErrorDialog (org.pentaho.di.ui.core.dialog.ErrorDialog)4