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();
}
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;
}
Aggregations