Bug 22642 - [Contributions] widgets: Support for combo boxes in action sets
Summary: [Contributions] widgets: Support for combo boxes in action sets
Status: RESOLVED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 2.0   Edit
Hardware: All All
: P3 enhancement with 1 vote (vote)
Target Milestone: 3.3   Edit
Assignee: Paul Webster CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 75943
  Show dependency tree
 
Reported: 2002-08-21 11:25 EDT by Simon Arsenault CLA
Modified: 2007-08-07 08:47 EDT (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Simon Arsenault CLA 2002-08-21 11:25:43 EDT
See bug 21885 for more details.
Comment 1 Johannes Koller CLA 2004-07-14 03:45:17 EDT
Are combo boxes supported in action sets now? 
I cant find anything else about that. Is this feature implemented? and if not
will it ever be impelemented?
Comment 2 Douglas Pollock CLA 2004-07-14 10:41:27 EDT
No, they are not implemented. 
Comment 3 Ed Burnette CLA 2005-10-19 09:12:00 EDT
I was trying to do an Eclipse version of
http://platform.netbeans.org/tutorials/nbm-google.html but ran into one little
problem: I couldn't find a way to override the way the visual control for the
action was created. In the NB example, they play a little trick that they define
an action as a button and then override the method that actually creates the
control to use a composite instead. I didn't see the equivalent trick on
Eclipse, nor did the Action class allow anything but Button, CheckBox, Radio,
and DropDown.

This example shows that a Coolbar can have a combo box:
http://www.java2s.com/ExampleCode/SWT-JFace-Eclipse/CoolBarTest.htm
It does it like so:
    CoolItem item2 = new CoolItem(coolbar, SWT.NONE);
    item2.setControl(createCombo(coolbar));

SWT snippet 58 does something similar with ToolBar:
http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet58.java?rev=HEAD&content-type=text/vnd.viewcvs-markup
It does it by creating a separator and then resetting the widget to be the Combo
control:
	ToolBar bar = new ToolBar (shell, SWT.BORDER);
	ToolItem sep = new ToolItem (bar, SWT.SEPARATOR);
	Combo combo = new Combo (bar, SWT.READ_ONLY);
	combo.pack ();
	sep.setWidth (combo.getSize ().x);
	sep.setControl (combo);

But both of these methods are only useful for RCP apps where I control the
CoolBar/ToolBar creation. I need to contribute a CoolBar/Toolbar item in the
IDE, which means I need it to be an Action.

I also want to add controls (images, text, buttons, combos) to the IDE status
bar; would that be a different request or can actions go down there?
Comment 4 Nick Edgar CLA 2005-10-19 09:21:54 EDT
See also bug 26797 (combo contribution from editors).
Comment 5 Douglas Pollock CLA 2005-10-19 10:35:10 EDT
Ed: I would strongly encourage you to look at the contributions proposal 
(http://dev.eclipse.org/viewcvs/index.cgi/~checkout~/platform-ui-home/R3_1/contributions-proposal/requestForComments.html).  
In particular, you should look at the <widget> element in org.eclipse.ui.menus 
extension point, and the IWidget interface. 
 
Comment 6 Michael Van Meekeren CLA 2006-04-21 13:56:47 EDT
Moving Dougs bugs
Comment 7 Paul Webster CLA 2007-04-05 19:01:46 EDT
Assigning to component owner
PW
Comment 8 Paul Webster CLA 2007-06-20 12:25:01 EDT
combo boxes can now be added to toolbars using the menu contribution mechanism.

PW
Comment 9 Peter Severin CLA 2007-08-07 03:51:10 EDT
So how come all the interesting tags (such as group, widget, etc) are all marked as deprecated in org.eclipse.ui.menus extension point documentation?
Comment 10 Paul Webster CLA 2007-08-07 08:47:32 EDT
(In reply to comment #9)
> So how come all the interesting tags (such as group, widget, etc) are all
> marked as deprecated in org.eclipse.ui.menus extension point documentation?
> 

They aren't used.  The menu contribution mechanism is more general than what was envisioned in 3.2.

Check out the org.eclipse.ui.examples.contribution plugin as outlined in http://help.eclipse.org/help33/index.jsp?topic=/org.eclipse.platform.doc.isv/guide/workbench_cmd.htm for an example.

PW