Community
Participate
Working Groups
Build Identifier: 20100917-0705 When Eclipse starts-up in a clean brand-new workspace, there's a menu item under Run called "Run Last Launched". As its name suggests, it used to run the last launch config. Now: 1- Create a Java project. 2- Create a class that has a main method 3- That menu item is still named "Run Last Launched" 4- Run the current file either by selecting Run As > Java Application or by pressing Run Last Launched 5- Now the menu item (ironically) is renamed to Run 6- Create a new class that also has a main method and select its editor 7- Now there's no way to run the last launched class (the menu item is renamed to Run and runs the class in the active editor) Reproducible: Always Steps to Reproduce: 1- Create a Java project. 2- Create a class that has a main method 3- That menu item is still named "Run Last Launched" 4- Run the current file either by selecting Run As > Java Application or by pressing Run Last Launched 5- Now the menu item (ironically) is renamed to Run 6- Create a new class that also has a main method and select its editor 7- Now there's no way to run the last launched class (the menu item is renamed to Run and runs the class in the active editor)
Moving to JDT/Debug
As strange as it may sound this is working as designed. Let me explain. The action in question is contributed with the name 'Run Last Launched' (there are also ones for Debug and Profile Last Launched). After the workbench starts and the debug.ui bundle is loaded the name will be updated based on your current context launching settings. For example, if you turn off the setting on the Run/Debug > Launching preference page for context launching (select the 'Always launch the previously launched application' setting) the name will remain unchanged and always run the last launched configuration. If you leave the preference setting to its default the action has its name updated to Run... (Debug... and Profile... respectively) and will now launch the current context (editor, project explorer selection, etc) or fall back to running the last launch if a context cannot be resolved. > 7- Now there's no way to run the last launched class (the menu item is renamed > to Run and runs the class in the active editor) I'm not sure what you mean here. You can run the last launched class by: 1. selecting it from the launch history 2. pressing the run / debug button after selecting the first editor 3. using the run / debug keybinding after selecting the first editor 4. using the Run As / Debug As popup menu items after selecting the first editor steps 2 - 4 also work if you select the class from the outline view or any of the Package / Project explorers The other option is that you can disable context launching altogether using the option mentioned above on the Run/Debug > Launching preference page. Marking WORKSFORME.
This is not resolved. Refer to this: https://bugs.eclipse.org/bugs/show_bug.cgi?id=345683