<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<div class="moz-cite-prefix">Hi Thomas,<br>
<br>
Form a selection plugin you could just present a dialog with the
possible choices when the plugin is activated. If you want to
customize the menu then you would probably have to implement an
workspace access plugin. More information about this type of
plugin can be found here:<br>
<br>
<a class="moz-txt-link-freetext"
href="http://www.oxygenxml.com/doc/ug-editor/concepts/workspace-access-plugin.html">http://www.oxygenxml.com/doc/ug-editor/concepts/workspace-access-plugin.html</a><br>
<br>
On the applicationStarted() callback you will have to obtain
access to an WSEditor (for example using
StandalonePluginWorkspace.getEditorAccess()). You should also
listen for notifications when a new editor is opened. Once you
have a WSEditor instance you can use it to obtain the current page
(through WSEditor.getCurrentPage()). This will either be an
instance of WSAuthorEditorPageBase (if you are in author mode) or
an instance of WSTextEditorPage (if you are in text mode). Now you
can use one of the addPopUpMenuCustomizer() methods you've already
identified. The editor page offers API to detect the current
selection, for example :
WSTextBasedEditorPage.getSelectionStart().<br>
<br>
Please let us know if you require additional information.<br>
<br>
Best regards, <br>
Alex <br>
<span class="moz-txt-tag">-- <br>
</span>Alex Jitianu <br>
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
<br>
<a class="moz-txt-link-freetext" href="http://www.oxygenxml.com">http://www.oxygenxml.com</a>
<br>
<br>
<br>
On 26-Oct-12 11:00 PM, Thomas, Alexander wrote:<br>
</div>
<blockquote
cite="mid:123E92A27B82E844AA501B2E72C57A4973FE69BA@e14mbx10n.Enterprise.emory.net"
type="cite">
<meta http-equiv="Content-Type" content="text/html;
charset=ISO-8859-1">
<div><dt>I have a selection plugin that can be activated either by
<ctrl> + <shift> + N OR <right click> >
Plugins > PluginName.</dt>
<dt><br>
</dt>
<dt><br>
</dt>
<dt>I want to add the ability to dynamicaly create a menu with
choices of things to do with the selection that will both work
with the click and the shortcut key.</dt>
<dt><br>
</dt>
<dt>I think I want to use <a moz-do-not-send="true"
href="http://www.oxygenxml.com/InstData/Editor/Plugins/javadoc/ro/sync/exml/workspace/api/editor/page/author/WSAuthorEditorPageBase.html#addPopUpMenuCustomizer%28ro.sync.ecss.extensions.api.structure.AuthorPopupMenuCustomizer%29"><b>addPopUpMenuCustomizer(AuthorPopupMenuCustomizer)</b></a>
in ro.sync.exml.workspace.api.editor.page.author.<a
moz-do-not-send="true"
href="http://www.oxygenxml.com/InstData/Editor/Plugins/javadoc/ro/sync/exml/workspace/api/editor/page/author/WSAuthorEditorPageBase.html"
title="interface in
ro.sync.exml.workspace.api.editor.page.author">WSAuthorEditorPageBase</a></dt>
<dt>OR</dt>
<dt><a moz-do-not-send="true"
href="http://www.oxygenxml.com/InstData/Editor/Plugins/javadoc/ro/sync/exml/workspace/api/editor/page/text/WSTextEditorPage.html#addPopUpMenuCustomizer%28ro.sync.exml.workspace.api.editor.page.text.TextPopupMenuCustomizer%29"><b>addPopUpMenuCustomizer(TextPopupMenuCustomizer)</b></a>
in ro.sync.exml.workspace.api.editor.page.text.<a
moz-do-not-send="true"
href="http://www.oxygenxml.com/InstData/Editor/Plugins/javadoc/ro/sync/exml/workspace/api/editor/page/text/WSTextEditorPage.html"
title="interface in
ro.sync.exml.workspace.api.editor.page.text">WSTextEditorPage</a></dt>
<dt><br>
</dt>
<dt>But I am not sure if either of these are the correct
directions to go in.</dt>
<dt><br>
</dt>
<dt>How would I accomplish such a task?</dt>
</div>
<br>
<hr> <font color="Gray" face="Arial" size="1"><br>
This e-mail message (including any attachments) is for the sole
use of<br>
the intended recipient(s) and may contain confidential and
privileged<br>
information. If the reader of this message is not the intended<br>
recipient, you are hereby notified that any dissemination,
distribution<br>
or copying of this message (including any attachments) is
strictly<br>
prohibited.<br>
<br>
If you have received this message in error, please contact<br>
the sender by reply e-mail message and destroy all copies of the<br>
original message (including attachments).<br>
</font> <br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
oXygen-user mailing list
<a class="moz-txt-link-abbreviated" href="mailto:oXygen-user@oxygenxml.com">oXygen-user@oxygenxml.com</a>
<a class="moz-txt-link-freetext" href="http://www.oxygenxml.com/mailman/listinfo/oxygen-user">http://www.oxygenxml.com/mailman/listinfo/oxygen-user</a>
</pre>
</blockquote>
<br>
<br>
</body>
</html>