Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 89178

Summary: [launching] Open Properties dialog by clicking "Run As..." with Ctrl key
Product: [Eclipse Project] JDT Reporter: Eugene Kuleshov <ekuleshov>
Component: DebugAssignee: Darin Wright <darin.eclipse>
Status: VERIFIED FIXED QA Contact:
Severity: enhancement    
Priority: P3 CC: andy, jimisola, markus.kell.r, Michael_Rennie
Version: 3.1   
Target Milestone: 3.4 M2   
Hardware: PC   
OS: All   
Whiteboard:
Attachments:
Description Flags
proposed fix
none
API patch
none
small update none

Description Eugene Kuleshov CLA 2005-03-26 21:36:56 EST
This is already working from Run/Debug history dropdown. However it is often
necessary to specify few properties for a newly created run configuration. 

It will be nice if you can select file/resource in Package view and then choose
Run/Debug->Run As... from popup menu with Ctrl key pressed and get properties
dialog open for your convenience.
Comment 1 Darin Wright CLA 2005-03-30 17:49:31 EST
Would require API change/enhancement to ILaunchShortcut. The shortcut is 
passed the selection to launch and determines which existing launch config to 
re-use if any. We'd need to pass the corresponding Event along with the 
request to run, so the shortcut could decide what to do with the modifier. Or, 
we'd have to ask the short cut to provide us with the associated launch config 
(if there is one).

Deferred. API freeze is upon us.
Comment 2 Eugene Kuleshov CLA 2006-09-02 12:20:47 EDT
Please consider this as an usability enhancement for 3.3
Comment 3 Michael Rennie CLA 2006-09-11 15:35:56 EDT
Created attachment 49870 [details]
proposed fix

This is a proposed fix, containing a new interface to extend for shortcuts called ILaunchShortcut2, which provides two new methods getAssociatedLaunchConfig(ISelection) and getAssociatedLaunchConfig(IEditorPart).

One of the main issues with this fix is consistency. As we do not provide all of the launch shortcuts, Ctrl clicking will work for some but not others
Comment 4 Michael Rennie CLA 2006-12-05 17:11:38 EST
Created attachment 55079 [details]
API patch

This patch improves over the other, by promoting two new API classes for clients to implement: AbstractLaunchShortcut in debug.ui and AbstractJavaLaunchShortcut in jdt.debug.ui.
Comment 5 Michael Rennie CLA 2006-12-05 17:29:58 EST
Created attachment 55080 [details]
small update

same patch as before but with a small update to LaunchShortcutExtension
Comment 6 Michael Rennie CLA 2007-02-09 15:16:26 EST
resolving as later, no plans for this for 3.3
Comment 7 Darin Wright CLA 2007-06-08 12:44:34 EDT
Re-open to consider in 3.4
Comment 8 Michael Rennie CLA 2007-09-07 10:41:38 EDT
using  the 'smart' framework from context launching, Ctrl+Clicking is supported for launch shortcuts without any additional API.

This is how it works:

1. if the Run As item is a config, the dialog is opened on it
2. if the Run As item is a shortcut the launch dialog is opened on what would be contextually launched; in the event there is nothing to be launched or multiple items, the launch dialog is opened to the associated configuration type being selected. Failing those options the launch dialog is opened with no preselection made.
3. if for any reason an error occurs in trying to open the launch dialog or compute what to open on, execution is delegated to the actions' run method 

fixed in HEAD
Comment 9 Michael Rennie CLA 2007-09-07 10:43:14 EDT
please verify Darin W
Comment 10 Darin Wright CLA 2007-09-18 14:52:57 EDT
Verified.
Comment 11 Curtis Windatt CLA 2007-09-20 11:20:03 EDT
*** Bug 53567 has been marked as a duplicate of this bug. ***