Skip to content

Commit

Permalink
PDE: Restarting development eclipse does not relaunch
Browse files Browse the repository at this point in the history
- In development mode, changing restart parameters is not allowed, hence exit code 24 is not supported. Previously Workbench.buildCommandLine(..) used to return null for development mode, hence exit code was not set by Workbench.restart(..). And IDEApplication.start(..) used to take care of restarting development mode eclipse with exit code 23.
- Now in [PR#1307](eclipse-platform#1307), Workbench.buildCommandLine(..) does not check for development mode, hence Workbench.restart(..) is setting return code 24.

Fix:
====
Similar to Workbench.setRestartArguments(..), Workbench.restart(..) also checks for development mode and explicitly sets the exit code 23
  • Loading branch information
umairsair authored and merks committed Feb 4, 2024
1 parent a8f84f8 commit 1dceecc
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -2553,7 +2553,11 @@ public boolean restart() {

@Override
public boolean restart(boolean useCurrrentWorkspace) {
if (useCurrrentWorkspace) {
if (Platform.inDevelopmentMode()) {
// In development mode, command line parameters cannot be changed and restart
// will always be EXIT_RESTART. Also see setRestartArguments method
System.setProperty(PROP_EXIT_CODE, IApplication.EXIT_RESTART.toString());
} else if (useCurrrentWorkspace) {
URL instanceUrl = Platform.getInstanceLocation().getURL();
if (instanceUrl != null) {
try {
Expand Down

0 comments on commit 1dceecc

Please sign in to comment.