Correct way to override/enrich XML editor commands? [message #518819] |
Fri, 05 March 2010 08:02 |
Yves Monier Messages: 9 Registered: November 2009 |
Junior Member |
|
|
Hello,
My plugin is based on WTP's xml editor for an xml-based language, for which I would need an F3 command similar to the Java editor'one (ie. "Open declaration")
Standard xml editor F3 is "open selection". What is the best, state of the art way to replace it with my "open declaration" implementation?
Also, how to add new, specific commands for my language, so that they appear in the different menus (menu bar, editor popup menu) near the F3 menu item?
Thanks in advance for your help,
Yves
Yves Monier
|
|
|
Re: Correct way to override/enrich XML editor commands? [message #519758 is a reply to message #518819] |
Tue, 09 March 2010 20:58 |
|
Yves Monier wrote:
> My plugin is based on WTP's xml editor for an xml-based language, for
> which I would need an F3 command similar to the Java editor'one (ie.
> "Open declaration")
>
> Standard xml editor F3 is "open selection". What is the best, state of
> the art way to replace it with my "open declaration" implementation?
>
> Also, how to add new, specific commands for my language, so that they
> appear in the different menus (menu bar, editor popup menu) near the F3
> menu item?
>
> Thanks in advance for your help,
Your editor's action bar contributor would have to retarget the text
editor's
org.eclipse.wst.sse.ui.internal.actions.StructuredTextEditor ActionConstants.ACTION_NAME_OPEN_FILE
action. By default, the
org.eclipse.ui.workbench.texteditor.hyperlinkDetectors extension
point is used to find what to open, so a hyperlink detector that can
link to your declaration may do the job by itself.
Menu IDs are listed at http://wiki.eclipse.org/Table_of_WTP_IDs
--
Nitin Dahyabhai
Eclipse WTP Source Editing
IBM Rational
_
Nitin Dahyabhai
Eclipse Web Tools Platform
|
|
|
|
Powered by
FUDForum. Page generated in 0.03194 seconds