Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Web Tools Project (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: 2337
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 WTP, IBM
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: Sat Nov 29 01:39:50 GMT 2014

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

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