Community
Participate
Working Groups
I've been told in the newsgroup that though ObjectActionContribution supports style="pulldown", the latest documentation for 2.1 doesn't list "pulldown" as a supported API value. I don't have the latest docs to verify this. It works well and we need this because we need to add a dynamic menu to the object popup menu. We can't predefine what will be on the submenu until we know what was selected. This style is the only way we can add a dynamic menu. We had done it in 2.0.x by making our ObjectActionDelegate into a MenuCreator and setting that MenuCreator into the ActionDelegate, but in 2.1 this was broken because Action couldn't be changed to a drop-down if it wasn't created as a dropdown. This broke us, so we found the stle="pulldown" which is exactly what we needed. Thanks, Rich
To be clear, this Object contribution needs tp be contributed through plugin.xml, that is why we couldn't create it as a pulldown through code. That is why we want to use the style="pulldown" from the plugin.xml.
We never intended to support the contribution of dynamic submenus, since that requires activating the contributing plugin. However, the breaking change to your old way of doing things was unintentional. This situation is similar to our desire to allow items to be dynamically added/removed in action sets, but to have the Workbench remember the items, so that plugins do not need to be eagerly activated. It would help to know more details of what you're trying to do here. What kind of submenu and items are you trying to present?
This basically having to do with the same dynamic menu that I am talking about in this bug: http://bugs.eclipse.org/bugs/show_bug.cgi?id=11114 So you can look there to see all of the details. They go hand-in-hand. That bug report was about isDynamic() now returning false for our pulldowns, while this one is about not being able to create a pulldown at all anymore without using style="pulldown", but they are both about the same topic, having dynamic object contribution menus. We are using the <visibility>/<filter> stuff to make sure our contributions aren't even activated until absolutely necessary, so eager dynamic menus wouldn't occur. Thanks, Rich
To be looked at in 2.2 stream
*** This bug has been marked as a duplicate of 12757 ***