Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Web Tools Project (WTP) » Contributing actions to XML editor popup/context menu
Contributing actions to XML editor popup/context menu [message #222648] Tue, 14 October 2008 20:44 Go to next message
Hallvard Traetteberg is currently offline Hallvard TraettebergFriend
Messages: 601
Registered: July 2009
Location: Trondheim, Norway
Senior Member
Hi,

I'm trying to extend the XML editor with some custom action in the popup menu
for Element objects (selection). I've been able to get my actions to show up in
the context menu for Element tree nodes, with the following markup:

<objectContribution
id="org.eclipse.xswt.popupMenus.objectContribution"
objectClass="org.w3c.dom.Element"
>

There's also markup for menus and actions, but I believe it is this markup that
relates the menus/actions to the selection of org.w3c.dom.Element objects.

However, the menus/actions only show up in the source and outline view. I.e.
when I right click on a tag in the source view or an element node in the outline
view, the (same) actions are there. But when I right click on element node in
the design view, the actions never appear. (BTW, the actions themselves work well).

So I wonder what is wrong? Aren't the tree nodes in the design view org.w3c.dom
objects? Doesn't the context menu in the design viewer use the standard
mechanism for populating the menu?

Hallvard
Re: Contributing actions to XML editor popup/context menu [message #223276 is a reply to message #222648] Wed, 29 October 2008 23:57 Go to previous messageGo to next message
Nitin Dahyabhai is currently offline Nitin DahyabhaiFriend
Messages: 2341
Registered: July 2009
Senior Member
Hallvard Trætteberg wrote:
> So I wonder what is wrong? Aren't the tree nodes in the design view
> org.w3c.dom objects? Doesn't the context menu in the design viewer use
> the standard mechanism for populating the menu?

They are DOM objects, but no, the design page's context menu is not
registered for plug-in contribution. Please open an RFE to do so.

--
---
Nitin Dahyabhai
Eclipse WTP Source Editing
IBM Rational


---
Nitin Dahyabhai
Eclipse WTP, IBM
Re: Contributing actions to XML editor popup/context menu [message #223283 is a reply to message #223276] Thu, 30 October 2008 06:12 Go to previous message
Eclipse UserFriend
Originally posted by: dcarver.starstandard.org

Nitin Dahyabhai wrote:
> Hallvard Trætteberg wrote:
>> So I wonder what is wrong? Aren't the tree nodes in the design view
>> org.w3c.dom objects? Doesn't the context menu in the design viewer use
>> the standard mechanism for populating the menu?
>
> They are DOM objects, but no, the design page's context menu is not
> registered for plug-in contribution. Please open an RFE to do so.
>

You might be able to do some contributions using the
org.eclipse.ui.menus extension point the the
popup:org.eclipse.ui.menus.any location.

Dave
Previous Topic:Question on setting up a static web project
Next Topic:Contributing a Web service CLIENT runtime with UI in WTP
Goto Forum:
  


Current Time: Thu Dec 18 21:50:25 GMT 2014

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

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