use of org.pentaho.di.ui.trans.dialog.TransDialog in project pentaho-kettle by pentaho.
the class TransGraph method editProperties.
public static boolean editProperties(TransMeta transMeta, Spoon spoon, Repository rep, boolean allowDirectoryChange, TransDialog.Tabs currentTab) {
if (transMeta == null) {
return false;
}
TransDialog tid = new TransDialog(spoon.getShell(), SWT.NONE, transMeta, rep, currentTab);
tid.setDirectoryChangeAllowed(allowDirectoryChange);
TransMeta ti = tid.open();
//
if (tid.isSharedObjectsFileChanged()) {
try {
SharedObjects sharedObjects = rep != null ? rep.readTransSharedObjects(transMeta) : transMeta.readSharedObjects();
spoon.sharedObjectsFileMap.put(sharedObjects.getFilename(), sharedObjects);
} catch (KettleException e) {
// CHECKSTYLE:LineLength:OFF
new ErrorDialog(spoon.getShell(), BaseMessages.getString(PKG, "Spoon.Dialog.ErrorReadingSharedObjects.Title"), BaseMessages.getString(PKG, "Spoon.Dialog.ErrorReadingSharedObjects.Message", spoon.makeTabName(transMeta, true)), e);
}
// If we added properties, add them to the variables too, so that they appear in the CTRL-SPACE variable
// completion.
//
spoon.setParametersAsVariablesInUI(transMeta, transMeta);
spoon.refreshTree();
// cheap operation, might as will do it anyway
spoon.delegates.tabs.renameTabs();
}
spoon.setShellText();
return ti != null;
}
Aggregations