Q regarding order of contributed menus to popup menus [message #331698] |
Wed, 17 September 2008 06:33 |
Eclipse User |
|
|
|
Originally posted by: no.ddress.now
So I am able to add a menu to the JDT Editor and Outline popup menus
and, functionally, they work.
The problem is that the menu location in the popup menu is not
consistant for path="group.show". For the JDT Editor, my menu is being
added immeditely *above* "Show In" and for the JDT Outline, it is
immediately *below* "Show In".
If I specify path="additions" for both, then my menu shows up
immediately above "Run" in the JDT Editor popup menu and immediately
below "Restore from local history" in the Outline popup menu.
Is there a way to enforce/ensure consistent placement of my menu? Or,
is there something incorrect about my configuration?
<extension
point="org.eclipse.ui.popupMenus">
<viewerContribution
id="net.certiv.visualization.cgv.callgraphActions"
targetID="#CompilationUnitEditorContext">
<menu
id="callGraphEditorMenu"
label="Call Graph"
path="group.show">
<separator name="group1" />
</menu>
<action
...
</action>
</viewerContribution>
<objectContribution
adaptable="false"
id="net.certiv.visualization.cgv.callgraphActions1"
objectClass="org.eclipse.jdt.core.IMember">
<menu
id="callGraphViewMenu"
label="Call Graph"
path="group.show">
<separator name="group2" />
</menu>
<action
...
</action>
</objectContribution>
</extension>
Thanks,
Gerald
|
|
|
|
Re: Q regarding order of contributed menus to popup menus [message #331728 is a reply to message #331724] |
Thu, 18 September 2008 14:30 |
Eclipse User |
|
|
|
Originally posted by: no.ddress.now
In article <gatnis$fj6$1@build.eclipse.org>, pwebster@ca.ibm.com
says...
> Gerald Rosenberg wrote:
> > Is there a way to enforce/ensure consistent placement of my menu? Or,
> > is there something incorrect about my configuration?
>
> With object and viewer contributions, the order of processing is
> non-deterministic. You can only work around this by using groups to
> specify order, but 2 contributions at the same "group" can be added in
> any order (that includes your menu vs the Show In menu).
>
> There are some potential hacks available in 3.3 and 3.4, but I'm not
> sure if they are a good idea.
>
> PW
Thanks, Paul.
Is there any documentation at all on the 3.4 hack? Not sure which is
worse, the hack or having UI elements show in inconsistant locations.
Best,
Gerald
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.03082 seconds