Bug 80447 - Launch configs can not put on the toolbar
Summary: Launch configs can not put on the toolbar
Status: RESOLVED DUPLICATE of bug 51003
Alias: None
Product: Platform
Classification: Eclipse Project
Component: Debug (show other bugs)
Version: 3.1   Edit
Hardware: All All
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: Platform-Ant-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 105653 (view as bug list)
Depends on:
Blocks:
 
Reported: 2004-12-07 20:59 EST by Pete Nicholls CLA
Modified: 2006-03-06 13:08 EST (History)
8 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Pete Nicholls CLA 2004-12-07 20:59:50 EST
Want a way to define an external tool and provide an icon and have that show up 
on the toolbar without having to write a lot of java code.  Enterprise 
customers have existing tools (or tools that set up different environments) and 
want to have these show as icons on the toolbar.  This function was available 
in other products.  It also will eliminate the complaint about having too many 
mouse clicks to launch an external tool.  Would be nice if in the external 
tools dialog I could specify toolbar and provide an icon.
Comment 1 Darin Wright CLA 2004-12-08 10:16:24 EST
The launch history isn't sufficient (if you could pre-populate a workspace 
with the tool)?
Comment 2 Darin Wright CLA 2005-01-10 16:16:15 EST
Nothing planned for 3.1.

The requirements for this feature request need to be refined. Currently, 
action sets can be contributed to the workbench (buttons on the tool bar), and 
an action delegate could launch a config. However, we'd need more support for 
the workbench to allow for a config to have an optional button on the toolbar 
(currently, there is no way to programmatically add an action to the toolbar, 
just contribute via XML).  
Comment 3 Darin Wright CLA 2005-01-10 17:55:50 EST
Doug, is there any way to programmatically add an action to a page's toolbar?
Comment 4 Douglas Pollock CLA 2005-01-11 06:42:56 EST
What kind of page?  A page in a page book view?  Or a workbench page?  Could 
you be more descriptive (possibly with code fragments) of what you would like 
to do? 
 
Comment 5 Darin Wright CLA 2005-01-11 08:31:31 EST
This feature request requires the ability to programatically add an action to 
a workbench page or workbench window toolbar (not sure what the correct term 
is).

Pete, would the action be tied to a specific perspective (or perspectives)?
Comment 6 Pete Nicholls CLA 2005-01-11 10:03:35 EST
It does not really matter to the customers.  The external tool could be tied to 
a perspective(s) or simply be global.  
Comment 7 Darin Swanson CLA 2005-02-14 16:20:50 EST
Not planned for 3.1
Comment 8 Darin Wright CLA 2005-08-02 11:31:02 EDT
*** Bug 105653 has been marked as a duplicate of this bug. ***
Comment 9 Ed Burnette CLA 2005-12-08 12:16:11 EST
I could use this feature too. See also bug 29580 and bug 115673. Basically I'm looking for different ways to reduce the repetitive motion currently needed to launch things, especially external commands. It's a pain, literally, when having to alternate between two or three common launches all during the day.

This isn't Ant specific so it should probably go in the Platform/Debug box. CC'ing Darin W.
Comment 10 Darin Wright CLA 2005-12-08 12:50:02 EST
Yes, this is a launch framework issue. Moving to debug.
Comment 11 Darin Wright CLA 2005-12-08 12:51:52 EST
Doug, is there any API that would allow debug to contribute actions to a toolbar or menu programatically (sorry, I can't recall the last time I asked)?
Comment 12 Douglas Pollock CLA 2005-12-16 11:33:03 EST
Reading this bug, I believe you want something:
    (a) that appears in the top-level tool bar
    (b) whose text/icon/visibility will vary

The only way I can think of is to define an action set.  The variation of the text, icon and visibility will need to be controlled by the delegate.  Since it is likely that this will need to be done on start-up, you would have to (*shudder*) use the org.eclipse.ui.startup extension point.  This is a less than ideal solution.
Comment 13 Ed Burnette CLA 2005-12-21 12:28:55 EST
Launch commands get added dynamically to the drop-down menu for the Debug, Run, External, and Profile toolbar menus, and also to the Run > Run History, Run > Debug History, and Run > External Tools menus (hmm, why doesn't that one say history). Can they be added to the toolbar in a similar way, or do the menus not get generated until you click on them?
Comment 14 Darin Wright CLA 2006-01-03 16:44:17 EST
Doug, users want a way to add launch shortcuts to the toolbar dynamically. I.e. they want to go to the common tab of a launch config, or the "manage favorites" dialog, and add selected configs to the toolbar. Does an action set provide a dynamic number of actions? I looks static to me (i.e. I have to define an action set with all of its actions up front)?
Comment 15 Douglas Pollock CLA 2006-01-03 16:48:35 EST
I guess my thought was that you could define a block of N generic actions, whose visibility, label, icon, etc. would all be under control of the delegate.  It's not a great suggestion.
Comment 16 Darin Wright CLA 2006-01-09 14:37:38 EST
Doug, would it be possible for us to create a floating "Launch CoolBar" that the debug plug-in manages with a dynamic set of actions? I'm not sure what the rules/styles are governing the creation of toolbars.
Comment 17 Douglas Pollock CLA 2006-01-09 14:43:06 EST
I'm not sure what you mean by "floating".
Comment 18 Darin Wright CLA 2006-01-09 14:47:18 EST
I mean un-docked. However, perhaps that is not important to this problem. Can we create our own coolbar associated with a workbench window?
Comment 19 Douglas Pollock CLA 2006-01-09 18:42:48 EST
You are capable of doing anything you want, but it's just how much support the workbench is going to give.  In this case, I think you'll find there isn't much support.

There might be more support for this in Eclipse 3.2.
Comment 20 Tim Mak CLA 2006-01-16 14:36:10 EST
Is there any progress regarding this bug?  This is a feature that I am interested in as well.

From reading the bug, it seems the biggest concern is the fact that the variations of the Toolbar (text, icons, etc.) will need to be controlled by the delegate, which will have to be loaded upon startup in order to properly display the Toolbar items.  However, Ed mentions that these launch configurations are already dynamically added to the External Tools drop down menu, via the history.  They can also be added dynamically to the menu by selecting the "Display in Favourites Menu" option, which is found on the Common tab of each launch configuration.  Is there a way to leverage this existing framework, and perhaps use it to dynamically populate the Toolbar as well?(Basically I'm just raising Ed's question again).

If this feature is implemented, I think it would also be worthwhile to give users the ability to provide their own custom icons for their toolbar buttons.  Being able to differentiate between program launch configurations at a glance, is much more preferable than depending on the hover text.  
Comment 21 Darin Wright CLA 2006-01-18 11:21:01 EST
It looks like we could provide a limited number of "config actions" on the toolbar. However, when pressed, how would we know what mode to launch in? i.e. run vs. debug? 
Comment 22 Tim Mak CLA 2006-01-20 14:58:49 EST
It looks like you might be able ask the LaunchConfigurationManager for the LaunchHistory, and from there determine what LaunchGroup your specific configuration belongs to, and retrieve launch mode from there.  At least, that seems to be the way that the Organize Favourites action does it.

However, this bug was originally opened for the purpose of providing External Tool actions on the Toolbar.  If that is all we plan to support, then the launch mode will not be a big issue, since all the actions will have to be launched in run mode.  However, if you plan to add other types of launch actions as well, then I agree it's a valid issue.

There seems to be alot of discussion, and interest around this feature.  Will this be a planned item for 3.2?  
Comment 23 Tim Mak CLA 2006-01-23 17:58:39 EST
Even if the custom toolbar enhancement does not make it into 3.2, I think the ability to define your own icons for External Tool actions would be a useful feature to implement.  The change is relatively small, and it would be essential if custom actions are allowed on the toolbar in the near future.

I've already taken a look at this, and can provide an implementation of it in a patch.  This is a feature that I would like to see go out with 3.2.
Comment 24 Mary Komor CLA 2006-01-23 19:36:24 EST
I agree with Tim. At the very least, if Eclipse provides the ability to attach an icon to each external tools definition (this is all internal code), plugin providers can add some of the definitions (for e.g. only the "Favourites") to the tool bar if they wanted to. The attached icons can then be used to display the tool bar buttons. 

It will be great if we can get this initial implementation in 3.2. We can wait for the full fledged implementation in a later version if all the issues raised cannot be addressed quite yet. 
Comment 25 Darin Wright CLA 2006-01-24 12:29:24 EST
Due to time/resources limitations this will not be committed for 3.2. I would encourage those wanting the support to experiment with building the toolbar support in their own plug-in, using internal APIs from debug as required. The intent of this would be to flesh out the function/issues and then eventually push the support down to the platform.
Comment 26 Darin Wright CLA 2006-03-06 13:07:57 EST
open to mark as dup.
Comment 27 Darin Wright CLA 2006-03-06 13:08:16 EST
Dup

*** This bug has been marked as a duplicate of 51003 ***