@Override public void run(final IStructuredSelection selection) { IWorkspaceRunnable operation= new IWorkspaceRunnable() { @Override public void run(IProgressMonitor monitor) throws CoreException { performRefresh(selection, monitor); } }; new WorkbenchRunnableAdapter(operation).runAsUserJob(ActionMessages.RefreshAction_refresh_operation_label, null); }
@Override public void run(final IStructuredSelection selection) { IWorkspaceRunnable operation= new IWorkspaceRunnable() { @Override public void run(IProgressMonitor monitor) throws CoreException { performRefresh(selection, monitor); } }; new WorkbenchRunnableAdapter(operation).runAsUserJob(ActionMessages.RefreshAction_refresh_operation_label, null); }
/** * @see org.eclipse.jface.preference.IPreferencePage#performOk() */ @Override public boolean performOk() { if (fIsValidElement && fIgnoreOptionalProblemsField.isSelected() != isIgnoringOptionalProblems()) { String newValue= fIgnoreOptionalProblemsField.isSelected() ? "true" : null; //$NON-NLS-1$ fElement.setAttribute(IClasspathAttribute.IGNORE_OPTIONAL_PROBLEMS, newValue); IWorkspaceRunnable runnable= getRunnable(getShell(), fProject, fElement.getClasspathEntry()); WorkbenchRunnableAdapter op= new WorkbenchRunnableAdapter(runnable); op.runAsUserJob(PreferencesMessages.BuildPathsPropertyPage_job_title, null); } return true; }
/** * @see org.eclipse.jface.preference.IPreferencePage#performOk() */ @Override public boolean performOk() { if (fIsValidElement && fIgnoreOptionalProblemsField.isSelected() != isIgnoringOptionalProblems()) { String newValue= fIgnoreOptionalProblemsField.isSelected() ? "true" : null; //$NON-NLS-1$ fElement.setAttribute(IClasspathAttribute.IGNORE_OPTIONAL_PROBLEMS, newValue); IWorkspaceRunnable runnable= getRunnable(getShell(), fProject, fElement.getClasspathEntry()); WorkbenchRunnableAdapter op= new WorkbenchRunnableAdapter(runnable); op.runAsUserJob(PreferencesMessages.BuildPathsPropertyPage_job_title, null); } return true; }
public boolean performOk() { if (fBuildPathsBlock != null) { getSettings().put(INDEX, fBuildPathsBlock.getPageIndex()); if (fBuildPathsBlock.hasChangesInDialog() || fBuildPathsBlock.isClassfileMissing()) { IWorkspaceRunnable runnable= new IWorkspaceRunnable() { public void run(IProgressMonitor monitor) throws CoreException, OperationCanceledException { fBuildPathsBlock.configureJavaProject(monitor); } }; WorkbenchRunnableAdapter op= new WorkbenchRunnableAdapter(runnable); if (fBlockOnApply) { try { new ProgressMonitorDialog(getShell()).run(true, true, op); } catch (InvocationTargetException e) { ExceptionHandler.handle(e, getShell(), PreferencesMessages.BuildPathsPropertyPage_error_title, PreferencesMessages.BuildPathsPropertyPage_error_message); return false; } catch (InterruptedException e) { return false; } } else { op.runAsUserJob(PreferencesMessages.BuildPathsPropertyPage_job_title, null); } } } return true; }
@Override public boolean performOk() { if (fBuildPathsBlock != null) { getSettings().put(INDEX, fBuildPathsBlock.getPageIndex()); if (fBuildPathsBlock.hasChangesInDialog() || fBuildPathsBlock.isClassfileMissing()) { IWorkspaceRunnable runnable= new IWorkspaceRunnable() { @Override public void run(IProgressMonitor monitor) throws CoreException, OperationCanceledException { fBuildPathsBlock.configureJavaProject(monitor); } }; WorkbenchRunnableAdapter op= new WorkbenchRunnableAdapter(runnable); if (fBlockOnApply) { try { new ProgressMonitorDialog(getShell()).run(true, true, op); } catch (InvocationTargetException e) { ExceptionHandler.handle(e, getShell(), PreferencesMessages.BuildPathsPropertyPage_error_title, PreferencesMessages.BuildPathsPropertyPage_error_message); return false; } catch (InterruptedException e) { return false; } } else { op.runAsUserJob(PreferencesMessages.BuildPathsPropertyPage_job_title, null); } } } return true; }
@Override public boolean performOk() { if (fBuildPathsBlock != null) { getSettings().put(INDEX, fBuildPathsBlock.getPageIndex()); if (fBuildPathsBlock.hasChangesInDialog() || fBuildPathsBlock.isClassfileMissing()) { IWorkspaceRunnable runnable= new IWorkspaceRunnable() { @Override public void run(IProgressMonitor monitor) throws CoreException, OperationCanceledException { fBuildPathsBlock.configureJavaProject(monitor); } }; WorkbenchRunnableAdapter op= new WorkbenchRunnableAdapter(runnable); if (fBlockOnApply) { try { new ProgressMonitorDialog(getShell()).run(true, true, op); } catch (InvocationTargetException e) { ExceptionHandler.handle(e, getShell(), PreferencesMessages.BuildPathsPropertyPage_error_title, PreferencesMessages.BuildPathsPropertyPage_error_message); return false; } catch (InterruptedException e) { return false; } } else { op.runAsUserJob(PreferencesMessages.BuildPathsPropertyPage_job_title, null); } } } return true; }