Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » ServerTools (WTP) » Correct way to override/enrich XML editor commands?(How to deal _properly_ with existing commands?)
Correct way to override/enrich XML editor commands? [message #518819] Fri, 05 March 2010 08:02 Go to next message
Yves Monier is currently offline Yves MonierFriend
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 Go to previous messageGo to next message
Nitin Dahyabhai is currently offline Nitin DahyabhaiFriend
Messages: 4425
Registered: July 2009
Senior Member

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
Re: Correct way to override/enrich XML editor commands? [message #520828 is a reply to message #519758] Mon, 15 March 2010 14:04 Go to previous message
Yves Monier is currently offline Yves MonierFriend
Messages: 9
Registered: November 2009
Junior Member
Thanks for the highlight!
Seems I have first to learn a bit about retargetable actions Smile
Best,


Yves Monier
Previous Topic:WSDL 2.0?
Next Topic:how to install 'JSF Facelets Tools Project'
Goto Forum:
  


Current Time: Tue Mar 19 05:57:19 GMT 2024

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

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

Back to the top