use of org.talend.repository.ui.dialog.JobSearchResultProcessor in project tdi-studio-se by Talend.
the class ComponentSearcher method run.
public void run() {
final List<IRepositoryViewObject> found = new ArrayList<IRepositoryViewObject>();
IRunnableWithProgress op = new IRunnableWithProgress() {
@Override
public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
search(monitor, componentName, found);
}
};
try {
new ProgressMonitorDialog(shell).run(true, true, op);
} catch (Exception e) {
// ignore me
}
if (found.size() > 0) {
Display.getDefault().syncExec(new Runnable() {
@Override
public void run() {
final RepositoryReviewDialog dialog = new RepositoryReviewDialog(shell, new JobSearchResultProcessor(found), ERepositoryObjectType.PROCESS);
if (dialog.open() == RepositoryReviewDialog.OK) {
RepositoryNode result = dialog.getResult();
openEditorOperation(result);
}
}
});
} else {
MessageDialog.openInformation(shell, Messages.getString("ComponentSearcher.searchResult", componentName), //$NON-NLS-1$//$NON-NLS-2$
Messages.getString("ComponentSearcher.noJobsFound"));
}
}
Aggregations