Skip to main content



      Home
Home » Language IDEs » ServerTools (WTP) » Contributing actions to XML editor popup/context menu
Contributing actions to XML editor popup/context menu [message #222648] Tue, 14 October 2008 16:44 Go to next message
Eclipse UserFriend
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 19:57 Go to previous messageGo to next message
Eclipse UserFriend
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
Re: Contributing actions to XML editor popup/context menu [message #223283 is a reply to message #223276] Thu, 30 October 2008 02: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: Fri Jul 04 02:55:43 EDT 2025

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

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

Back to the top