Skip to main content



      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 03:02 Go to next message
Eclipse UserFriend
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
Re: Correct way to override/enrich XML editor commands? [message #519758 is a reply to message #518819] Tue, 09 March 2010 15:58 Go to previous messageGo to next message
Eclipse UserFriend
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
Re: Correct way to override/enrich XML editor commands? [message #520828 is a reply to message #519758] Mon, 15 March 2010 10:04 Go to previous message
Eclipse UserFriend
Thanks for the highlight!
Seems I have first to learn a bit about retargetable actions Smile
Best,
Previous Topic:WSDL 2.0?
Next Topic:how to install 'JSF Facelets Tools Project'
Goto Forum:
  


Current Time: Sun Jul 06 20:48:17 EDT 2025

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

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

Back to the top