Skip to content

Commit adfa806

Browse files
committed
Inline canRunForked() check in DesignerNewElementWizard
This method is defined in an internal class, is never overridden and therefore always returns `true`. Given that it is only used in one place, we can use this value directly when executing the workspace runnable.
1 parent a44ab90 commit adfa806

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

org.eclipse.wb.core.java/src/org/eclipse/wb/internal/core/wizards/DesignerNewElementWizard.java

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*******************************************************************************
2-
* Copyright (c) 2011 Google, Inc.
2+
* Copyright (c) 2011, 2025 Google, Inc. and others.
33
*
44
* This program and the accompanying materials are made available under the
55
* terms of the Eclipse Public License 2.0 which is available at
@@ -97,10 +97,6 @@ public void run() {
9797
*/
9898
protected abstract void finishPage(IProgressMonitor monitor) throws Exception;
9999

100-
protected boolean canRunForked() {
101-
return true;
102-
}
103-
104100
protected void handleFinishException(Shell shell, InvocationTargetException e) {
105101
ExceptionHandler.perform(
106102
e,
@@ -139,7 +135,7 @@ public void run(IProgressMonitor monitor) throws CoreException {
139135
} else {
140136
runnable = new WorkbenchRunnableAdapter(op, rule, true);
141137
}
142-
getContainer().run(canRunForked(), true, runnable);
138+
getContainer().run(true, true, runnable);
143139
} catch (InvocationTargetException e) {
144140
handleFinishException(getShell(), e);
145141
return false;

0 commit comments

Comments
 (0)