use of org.talend.repository.ui.dialog.OpenJobSelectionDialog in project tdi-studio-se by Talend.
the class OpenJobAction method run.
@Override
public void run() {
List<ERepositoryObjectType> repObjectTypes = new ArrayList<ERepositoryObjectType>();
repObjectTypes.add(ERepositoryObjectType.PROCESS);
if (PluginChecker.isStormPluginLoader()) {
repObjectTypes.add(ERepositoryObjectType.PROCESS_STORM);
}
if (PluginChecker.isMapReducePluginLoader()) {
repObjectTypes.add(ERepositoryObjectType.PROCESS_MR);
}
final OpenJobSelectionDialog dialog = new OpenJobSelectionDialog(window.getShell(), repObjectTypes);
if (dialog.open() == RepositoryReviewDialog.OK) {
EditProcess editProcess = new EditProcess() {
/*
* (non-Javadoc)
*
* @see org.talend.repository.ui.actions.AContextualAction#getSelection()
*/
@Override
public ISelection getSelection() {
return new StructuredSelection(dialog.getResult());
}
};
editProcess.run();
}
}
Aggregations