Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » debugging menu contributions
debugging menu contributions [message #335652] Sun, 19 April 2009 14:54 Go to next message
Eclipse UserFriend
Originally posted by: marc.esher.comcast.net

All,
I've got a plugin trying to contribute ecf docshare to the popup menu of a
specific editor. I *think* I have the contextID of the editor correct, but I
can't be sure b/c it's not specified in the plugin.xml anywhere. it's a
commercial editor.

Here's what I have in my plugin xml:

<extension point="org.eclipse.ui.menus">
<menuContribution
locationURI="popup:#com.adobe.flexbuilder.editors.mxml.MXMLCodeContext ">
<dynamic
class=" org.eclipse.ecf.internal.provisional.docshare.menu.DocShareR osterMenuContributionItem "
id="org.miz.mxmldocsharecontribution">
</dynamic>
</menuContribution>
</extension>

And I have all (I think) the required dependencies set up correctly in the
manifest. Still, the menu never gets added.

I'm wondering: is there a way to debug when something isn't added to the
popup menu? Or, is there a way to definitively get the proper popup
locationURI for any editor? I'm fairly certain that the menu is not being
contributed because when I set a breakpoint in the
DocShareRosterMenuContributionItem, it never trips. It does catch on other
editors where DocShare is working successfully, however.

Any help learning how to debug the guts of this thing is most appreciated.

marc
Re: debugging menu contributions [message #335663 is a reply to message #335652] Mon, 20 April 2009 14:39 Go to previous messageGo to next message
Paul Webster is currently offline Paul WebsterFriend
Messages: 6859
Registered: July 2009
Location: Ottawa
Senior Member

If you use ALT+SHIFT+F1 in the editor it will give you a list of active
menu contribution identifiers. This is the list that you can contribute
to use popup:

PW


--
Paul Webster
http://wiki.eclipse.org/Platform_Command_Framework
http://wiki.eclipse.org/Command_Core_Expressions
http://wiki.eclipse.org/Menu_Contributions
http://wiki.eclipse.org/Menus_Extension_Mapping
http://help.eclipse.org/ganymede/index.jsp?topic=/org.eclips e.platform.doc.isv/guide/workbench.htm


Re: debugging menu contributions [message #335776 is a reply to message #335652] Wed, 29 April 2009 12:24 Go to previous messageGo to next message
Remo Loetscher is currently offline Remo LoetscherFriend
Messages: 18
Registered: July 2009
Junior Member
Hi marc

To debug this kind of problems I've developed an eclipse rcp inspection
plugin called yari (yet another rcp inspector). You will find it on
sourceforge (http://yari.wiki.sourceforge.net/).

To find the identifier:
Open the view YARI->Eclipse Inspector. Inspect the current editor by
pushing the smiley and click on the editor part.
In the tree navigation of the Eclipse Inspector view open "Workbench" ->
"Part's Site". The property "contextMenuIDs" holds the correct menu
contribution identifiers. Double click on it to see all elements.

hth,

remo

Marc E wrote:
> All,
> I've got a plugin trying to contribute ecf docshare to the popup menu
> of a specific editor. I *think* I have the contextID of the editor
> correct, but I can't be sure b/c it's not specified in the plugin.xml
> anywhere. it's a commercial editor.
>
> Here's what I have in my plugin xml:
>
> <extension point="org.eclipse.ui.menus">
> <menuContribution
> locationURI="popup:#com.adobe.flexbuilder.editors.mxml.MXMLCodeContext ">
> <dynamic
> class=" org.eclipse.ecf.internal.provisional.docshare.menu.DocShareR osterMenuContributionItem "
>
> id="org.miz.mxmldocsharecontribution">
> </dynamic>
> </menuContribution>
> </extension>
>
> And I have all (I think) the required dependencies set up correctly in
> the manifest. Still, the menu never gets added.
>
> I'm wondering: is there a way to debug when something isn't added to the
> popup menu? Or, is there a way to definitively get the proper popup
> locationURI for any editor? I'm fairly certain that the menu is not
> being contributed because when I set a breakpoint in the
> DocShareRosterMenuContributionItem, it never trips. It does catch on
> other editors where DocShare is working successfully, however.
>
> Any help learning how to debug the guts of this thing is most appreciated.
>
> marc
Re: debugging menu contributions [message #335828 is a reply to message #335776] Sat, 02 May 2009 18:46 Go to previous message
Eclipse UserFriend
Originally posted by: marc.esher.comcast.net

Thanks for the help guys. It's quite valuable.

Marc


"Remo Loetscher" <remo.loetscher@postfinance.ch> wrote in message
news:49f846e1$1@news.post.ch...
> Hi marc
>
> To debug this kind of problems I've developed an eclipse rcp inspection
> plugin called yari (yet another rcp inspector). You will find it on
> sourceforge (http://yari.wiki.sourceforge.net/).
>
> To find the identifier:
> Open the view YARI->Eclipse Inspector. Inspect the current editor by
> pushing the smiley and click on the editor part.
> In the tree navigation of the Eclipse Inspector view open "Workbench" ->
> "Part's Site". The property "contextMenuIDs" holds the correct menu
> contribution identifiers. Double click on it to see all elements.
>
> hth,
>
> remo
>
> Marc E wrote:
>> All,
>> I've got a plugin trying to contribute ecf docshare to the popup menu of
>> a specific editor. I *think* I have the contextID of the editor correct,
>> but I can't be sure b/c it's not specified in the plugin.xml anywhere.
>> it's a commercial editor.
>>
>> Here's what I have in my plugin xml:
>>
>> <extension point="org.eclipse.ui.menus">
>> <menuContribution
>> locationURI="popup:#com.adobe.flexbuilder.editors.mxml.MXMLCodeContext ">
>> <dynamic
>> class=" org.eclipse.ecf.internal.provisional.docshare.menu.DocShareR osterMenuContributionItem "
>> id="org.miz.mxmldocsharecontribution">
>> </dynamic>
>> </menuContribution>
>> </extension>
>>
>> And I have all (I think) the required dependencies set up correctly in
>> the manifest. Still, the menu never gets added.
>>
>> I'm wondering: is there a way to debug when something isn't added to the
>> popup menu? Or, is there a way to definitively get the proper popup
>> locationURI for any editor? I'm fairly certain that the menu is not
>> being contributed because when I set a breakpoint in the
>> DocShareRosterMenuContributionItem, it never trips. It does catch on
>> other editors where DocShare is working successfully, however.
>>
>> Any help learning how to debug the guts of this thing is most
>> appreciated.
>>
>> marc
Previous Topic:"Build site" debugging
Next Topic:Set focus in properties view
Goto Forum:
  


Current Time: Sat Nov 09 05:02:04 GMT 2024

Powered by FUDForum. Page generated in 0.03844 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top