Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Web Tools Project (WTP) » Adding a menu contribution to XML Editor
Adding a menu contribution to XML Editor [message #186834] Tue, 23 January 2007 23:51 Go to next message
Eclipse User
Originally posted by: fakeaddress.brainkandy.org

Hello,

This question is similar to my prior question about opening up
StructuredTextEditor. In this case, what I'd like to do is add a popup
menu item so I may add a "Show In" submenu. (Show in Package Explorer
would be more than enough.)

Of course, my first thought is to figure out how to extend STE and found
the private method abstractTextEditorContextMenuAboutToShow. OK, it's
private.

I'm hoping someone might be able to save me from once again considering
between an enhancement request and/or duplicating StructuredTextEditor.

Thanks, Robert
Re: Adding a menu contribution to XML Editor [message #187077 is a reply to message #186834] Fri, 26 January 2007 08:15 Go to previous messageGo to next message
Nitin Dahyabhai is currently offline Nitin Dahyabhai
Messages: 2238
Registered: July 2009
Senior Member
Robert Konigsberg wrote:
> This question is similar to my prior question about opening up
> StructuredTextEditor. In this case, what I'd like to do is add a popup
> menu item so I may add a "Show In" submenu. (Show in Package Explorer
> would be more than enough.)
>
> Of course, my first thought is to figure out how to extend STE and found
> the private method abstractTextEditorContextMenuAboutToShow. OK, it's
> private.
>
> I'm hoping someone might be able to save me from once again considering
> between an enhancement request and/or duplicating StructuredTextEditor.

That looks like a standard org.eclipse.ui.popupMenus extension to
add a menu using the
"org.eclipse.core.runtime.xml.source.EditorContext" context.

--
Nitin Dahyabhai
Structured Source Editor


---
Nitin Dahyabhai
Eclipse WTP, IBM
Re: Adding a menu contribution to XML Editor [message #187174 is a reply to message #187077] Fri, 26 January 2007 22:06 Go to previous messageGo to next message
Eclipse User
Originally posted by: fakeaddress.brainkandy.org

Nitin, thank you very much for your help, in matters SSE and not. I'm
learning, I swear. :)

Nitin Dahyabhai wrote:
> Robert Konigsberg wrote:
>> This question is similar to my prior question about opening up
>> StructuredTextEditor. In this case, what I'd like to do is add a popup
>> menu item so I may add a "Show In" submenu. (Show in Package Explorer
>> would be more than enough.)
>>
>> Of course, my first thought is to figure out how to extend STE and
>> found the private method abstractTextEditorContextMenuAboutToShow. OK,
>> it's private.
>>
>> I'm hoping someone might be able to save me from once again
>> considering between an enhancement request and/or duplicating
>> StructuredTextEditor.
>
> That looks like a standard org.eclipse.ui.popupMenus extension to add a
> menu using the
> "org.eclipse.core.runtime.xml.source.EditorContext" context.
>
> --
> Nitin Dahyabhai
> Structured Source Editor
Re: Adding a menu contribution to XML Editor [message #187198 is a reply to message #187174] Sat, 27 January 2007 16:00 Go to previous messageGo to next message
Eclipse User
Originally posted by: konigsberg-at-g-m.ail-ddooott.com

Hooray! Thanks for your help.

So as you suggested, pretty much everything was a standard contribution to
the popupMenu extension. I am writing up a blog post with a sample project
to document this. Yeah, this is straightforward, but still.

One problem is that I'm trying to learn about SSE at the same time I'm
learning about Eclipse, and that's tricky.

One final question: how would I know about
org.eclipse.core.runtime.xml.source.EditorContext? Granted, if I google for
"org.eclipse.core.runtime.xml.source.EditorContext" I get a small number of
hits that tell me just that. Is this just a matter of pending documentation,
or am I looking for information in the wrong places?

Thanks again for all your help Nitin.

Robert

"Robert Konigsberg" <fakeaddress@brainkandy.org> wrote in message
news:45BAC1AA.6030509@brainkandy.org...
> Nitin, thank you very much for your help, in matters SSE and not. I'm
> learning, I swear. :)
>
> Nitin Dahyabhai wrote:
>> Robert Konigsberg wrote:
>>> This question is similar to my prior question about opening up
>>> StructuredTextEditor. In this case, what I'd like to do is add a popup
>>> menu item so I may add a "Show In" submenu. (Show in Package Explorer
>>> would be more than enough.)
>>>
>>> Of course, my first thought is to figure out how to extend STE and found
>>> the private method abstractTextEditorContextMenuAboutToShow. OK, it's
>>> private.
>>>
>>> I'm hoping someone might be able to save me from once again considering
>>> between an enhancement request and/or duplicating StructuredTextEditor.
>>
>> That looks like a standard org.eclipse.ui.popupMenus extension to add a
>> menu using the
>> "org.eclipse.core.runtime.xml.source.EditorContext" context.
>>
>> --
>> Nitin Dahyabhai
>> Structured Source Editor
Re: Adding a menu contribution to XML Editor [message #187273 is a reply to message #187198] Mon, 29 January 2007 10:33 Go to previous message
Nitin Dahyabhai is currently offline Nitin Dahyabhai
Messages: 2238
Registered: July 2009
Senior Member
Robert Konigsberg wrote:
> One final question: how would I know about
> org.eclipse.core.runtime.xml.source.EditorContext? Granted, if I google for
> "org.eclipse.core.runtime.xml.source.EditorContext" I get a small number of
> hits that tell me just that. Is this just a matter of pending documentation,
> or am I looking for information in the wrong places?


Your first hit on Google was probably the SSE component overview
page, at
http://www.eclipse.org/webtools/wst/components/sse/overview. html .
Under Extension Points, it mentions the formula (of sorts) that's
used to compute the editor related IDs, including those for the
context menus. We try to add documentation for finalized API as
well as we can, although I'll admit that we're pretty far behind in
terms of how much is covered.


--
Nitin Dahyabhai
Structured Source Editor


---
Nitin Dahyabhai
Eclipse WTP, IBM
Previous Topic:Servlet won't refresh
Next Topic:errors: can't resolve java.lang.Object and errors in xsd
Goto Forum:
  


Current Time: Sat Aug 02 04:50:40 EDT 2014

Powered by FUDForum. Page generated in 0.02577 seconds