Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » how can I add a popup action to an existing text editor?
how can I add a popup action to an existing text editor? [message #90128] Mon, 07 July 2003 20:04 Go to next message
Eclipse UserFriend
Originally posted by: ludin.swissonline.ch

Hello everybody,

I am trying to add an action to the
popup menu of the default text editor.

I found an example which does something
similar, but not quite what I want (the ReadmeTool),
it uses a self-created editor where it adds
something to the popup menu.

How do I do that on the existing editors?

There's a Help document about popup menus
which mentions the targetID of a viewerContribution.
It reads:
"The targetID specifies the view whose popup menu will be altered."

At this point I am stuck.
Which would be the correct targetID for my problem?


Dani
Re: how can I add a popup action to an existing text editor? [message #90376 is a reply to message #90128] Tue, 08 July 2003 07:43 Go to previous message
Eclipse UserFriend
Originally posted by: tom.eicher.gmx.ch.nodomain

Dani,

finding the right targetID is somewhat tricky... One way to find them is by
looking at the code in the various editors, and search for calls to
AbstractTextEditor.setEditorContextMenuId(String):

Editor ContextMenuId
ClassFileEditor #ClassFileEditorContext
CompilationUnitEditor #CompilationUnitEditorContext
TextEditor #TextEditorContext

HTH, Tom


"dani" <ludin@swissonline.ch> wrote in message
news:becjnh$c9q$1@eclipse.org...
> Hello everybody,
>
> I am trying to add an action to the
> popup menu of the default text editor.
>
> I found an example which does something
> similar, but not quite what I want (the ReadmeTool),
> it uses a self-created editor where it adds
> something to the popup menu.
>
> How do I do that on the existing editors?
>
> There's a Help document about popup menus
> which mentions the targetID of a viewerContribution.
> It reads:
> "The targetID specifies the view whose popup menu will be altered."
>
> At this point I am stuck.
> Which would be the correct targetID for my problem?
>
>
> Dani
>
>
Previous Topic:About IField get it's value!Thx
Next Topic:"plugin was unable to instantiate class2"
Goto Forum:
  


Current Time: Wed Jul 17 11:29:39 GMT 2024

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

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

Back to the top