DZone Forums
Go Back   DZone Forums > Community > Tools & IDEs > Eclipse
Reload this Page Dynamic Drop-Down Command in 3.3+
Notices
Reply
 
LinkBack Thread Tools Display Modes
  (#1 (permalink)) Old
Member
 
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Join Date: Sep 2008
Default Dynamic Drop-Down Command in 3.3+ - 09-22-2008, 05:11 PM

Hey Everyone,

I'm in the process of converting a plug-in from the old actionSet extensions to the new commands. One of these commands acts like a dynamic pulldown menu on the toolbar (think of the run-button in the Eclipse IDE and how it adds and sorts by the most recently ran run configuration.) This was a little tricky to figure out using actions, but it turns out you implement IWorkbenchWindowPulldownDelegate which has a getMenu method.

Now as for the command version, I've set pulldown to true which will give me the drop-down look without the actual menu. I've tried implementing IElementUpdater and I was able to perform element.setDropDownId("testMenu"); which set the command to a pre-existing menu extension. This had several problems. One, it was only executed once updateElement() was called, two I couldn't get to this menu to add new items, and three I'm not sure if this is the right way to go about it.

If anyone knows the correct way to do this let me know. It seems like every example on the internet dictates a pull-down command that has a predefined (static) menu.
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Eclipse RCP drag and drop montassis Eclipse 0 01-07-2009 08:06 PM
Junit test cases for a plugin failing when run from command line. sahuabinash Eclipse 0 09-17-2008 06:11 AM
How can i execute a console command from JAVA2SE code? waqarhassan Java 1 05-23-2008 02:50 PM
My widgets gets palced in new row on drag & drop in Visual Editor pratibha Eclipse 1 03-12-2008 12:53 AM
drag-n-drop match gumstic Java 0 02-26-2008 06:16 AM


Copyright 1997-2009, DZone, Inc.
vBulletin Skin developed by: vBStyles.com