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