Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/wizards/NewElementWizard.java')
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/wizards/NewElementWizard.java21
1 files changed, 6 insertions, 15 deletions
diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/wizards/NewElementWizard.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/wizards/NewElementWizard.java
index 8d384ddeb0b..53662baf4a5 100644
--- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/wizards/NewElementWizard.java
+++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/wizards/NewElementWizard.java
@@ -24,7 +24,6 @@ import org.eclipse.core.resources.IWorkspaceRunnable;
import org.eclipse.core.resources.ResourcesPlugin;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.OperationCanceledException;
import org.eclipse.core.runtime.jobs.ISchedulingRule;
import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.jface.wizard.Wizard;
@@ -50,14 +49,11 @@ public abstract class NewElementWizard extends Wizard implements INewWizard {
if (activePage != null) {
final Display display = getShell().getDisplay();
if (display != null) {
- display.asyncExec(new Runnable() {
- @Override
- public void run() {
- try {
- IDE.openEditor(activePage, resource, true);
- } catch (PartInitException e) {
- CUIPlugin.log(e);
- }
+ display.asyncExec(() -> {
+ try {
+ IDE.openEditor(activePage, resource, true);
+ } catch (PartInitException e) {
+ CUIPlugin.log(e);
}
});
}
@@ -89,12 +85,7 @@ public abstract class NewElementWizard extends Wizard implements INewWizard {
@Override
public boolean performFinish() {
- IWorkspaceRunnable op = new IWorkspaceRunnable() {
- @Override
- public void run(IProgressMonitor monitor) throws CoreException, OperationCanceledException {
- finishPage(monitor);
- }
- };
+ IWorkspaceRunnable op = monitor -> finishPage(monitor);
try {
getContainer().run(canRunForked(), true, new WorkbenchRunnableAdapter(op, getSchedulingRule()));
} catch (InvocationTargetException e) {

Back to the top