Eclipse Community Forums - RDF feed
https://www.eclipse.org/forums/
Eclipse Community ForumsAdding a menu contribution to XML Editor
https://www.eclipse.org/forums/index.php/mv/msg/59065/186834/#msg_186834
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]]>2007-01-24T04:51:26-00:00Re: Adding a menu contribution to XML Editor
https://www.eclipse.org/forums/index.php/mv/msg/59065/187077/#msg_187077
> 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 Dahyabhai2007-01-26T13:15:15-00:00Re: Adding a menu contribution to XML Editor
https://www.eclipse.org/forums/index.php/mv/msg/59065/187174/#msg_187174
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]]>2007-01-27T03:06:18-00:00Re: Adding a menu contribution to XML Editor
https://www.eclipse.org/forums/index.php/mv/msg/59065/187198/#msg_187198
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]]>2007-01-27T21:00:04-00:00Re: Adding a menu contribution to XML Editor
https://www.eclipse.org/forums/index.php/mv/msg/59065/187273/#msg_187273
> 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.