boolean isAutoBuilding= SearchPlugin.setAutoBuilding(false); try { ProgressMonitorDialog dialog= new ProgressMonitorDialog(getShell()); dialog.run(true, true, op); } catch (InvocationTargetException ex) {
boolean isAutoBuilding= SearchPlugin.setAutoBuilding(false); try { ProgressMonitorDialog dialog= new ProgressMonitorDialog(getShell()); dialog.run(true, true, op); } catch (InvocationTargetException ex) {
void setCurrentSearch(final Search search) { if (fCurrentSearch == search) return; SearchPlugin.getWorkspace().removeResourceChangeListener(this); WorkspaceModifyOperation op= new WorkspaceModifyOperation(null) { protected void execute(IProgressMonitor monitor) throws CoreException { internalSetCurrentSearch(search, monitor); } }; boolean isAutoBuilding= SearchPlugin.setAutoBuilding(false); try { ProgressMonitorDialog dialog= new ProgressMonitorDialog(getShell()); dialog.run(true, true, op); } catch (InvocationTargetException ex) { ExceptionHandler.handle(ex, SearchMessages.Search_Error_switchSearch_title, SearchMessages.Search_Error_switchSearch_message); } catch (InterruptedException e) { // Do nothing. Operation has been canceled. } finally { SearchPlugin.setAutoBuilding(isAutoBuilding); } getPreviousSearches().remove(search); getPreviousSearches().addFirst(search); }
void setCurrentSearch(final Search search) { if (fCurrentSearch == search) return; SearchPlugin.getWorkspace().removeResourceChangeListener(this); WorkspaceModifyOperation op= new WorkspaceModifyOperation(null) { @Override protected void execute(IProgressMonitor monitor) throws CoreException { internalSetCurrentSearch(search, monitor); } }; boolean isAutoBuilding= SearchPlugin.setAutoBuilding(false); try { ProgressMonitorDialog dialog= new ProgressMonitorDialog(getShell()); dialog.run(true, true, op); } catch (InvocationTargetException ex) { ExceptionHandler.handle(ex, SearchMessages.Search_Error_switchSearch_title, SearchMessages.Search_Error_switchSearch_message); } catch (InterruptedException e) { // Do nothing. Operation has been canceled. } finally { SearchPlugin.setAutoBuilding(isAutoBuilding); } getPreviousSearches().remove(search); getPreviousSearches().addFirst(search); }
final String warningTitle= SearchMessages.SearchManager_resourceChangedWarning; final String warningMsg= warningMessage; display.syncExec(() -> MessageDialog.openWarning(getShell(), warningTitle, warningMsg));