|
Re: Extending XML Editor popup menu. [message #143449 is a reply to message #142661] |
Thu, 13 October 2005 14:55 |
|
John Buttitto wrote:
> I am trying to extend the popup menus on the default XML editor. I want
> to add a entry to the popup menu that allows me to transfer the selected
> text from the editor to an alternate view.
>
> If anyone has an example of how to add a popup menu entry to the default
> XML it would be appreciated.
http://help.eclipse.org/help31/index.jsp?topic=/org.eclipse. platform.doc.isv/guide/workbench_basicext_popupMenus.htm
contains information on how to register the action. The menu ID
used when editing XML is
"org.eclipse.core.runtime.xml.source.EditorContext" and your
delegate's selectionChanged(IAction action,
ISelection selection) method that should be given the
ITextSelection when your action delegate is invoked.
The
org.eclipse.wst.common.snippets.internal.actions.AddToSnippe tsEditorActionDelegate
class does something very similiar.
--
- Nitin
_
Nitin Dahyabhai
Eclipse Web Tools Platform
|
|
|
|
Powered by
FUDForum. Page generated in 0.03422 seconds