Adding a menu contribution to XML Editor [message #186834] |
Wed, 24 January 2007 04:51  |
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 13:15   |
Eclipse User |
|
|
|
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 #187174 is a reply to message #187077] |
Sat, 27 January 2007 03:06   |
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 21:00   |
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 15:33  |
Eclipse User |
|
|
|
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
|
|
|
Powered by
FUDForum. Page generated in 0.76153 seconds