Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 340584 - Canceling a shortcut-launch from the launch selection dialog does not work
Summary: Canceling a shortcut-launch from the launch selection dialog does not work
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Debug (show other bugs)
Version: 3.4   Edit
Hardware: PC All
: P3 normal (vote)
Target Milestone: 3.8 M5   Edit
Assignee: Michael Rennie CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-03-21 12:52 EDT by Rüdiger Herrmann CLA
Modified: 2012-01-26 14:46 EST (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Rüdiger Herrmann CLA 2011-03-21 12:52:29 EDT
Steps to reproduce:
* open a class with a main method
* use a shortcut to launch it, i.e. Alt+Shift+X J on Windows or context menu -> Run As -> Java Application
* duplicate the launch config that was created by the previous step
* again, use a shortcut to launch the main method
* the 'Select Java Application' dialog appears, cancel this dialog
=> despite having canceled the operation, the application gets launched. As a side effect, yet another (3rd) launch config is created

This issue does also affects clients that use the JavaLaunchShortcut API
Comment 1 Michael Rennie CLA 2011-04-26 13:40:09 EDT
I think this would make a good RC1 candidate
Comment 2 Dani Megert CLA 2011-05-02 08:25:37 EDT
(In reply to comment #1)
> I think this would make a good RC1 candidate

-1. This is broken since 3.4 and not severe enough to be solved during RC*.
Comment 3 Michael Rennie CLA 2012-01-18 17:00:34 EST
The problem was in the JavaLaunchShortcut#launch(IType, String) method. we called out to findConfiguration, which will prompt if needed and we had no way to tell if the null we returned was because the user cancelled the search or there were no applicable configs, hence the new config each time and the always launching.

pushed fix to master: http://git.eclipse.org/c/jdt/eclipse.jdt.debug.git/commit/?id=3a98d09c7671f9966dff0c7958c7414d1c99edd8
Comment 4 Michael Rennie CLA 2012-01-26 14:46:41 EST
verified in I20120125-2200