Context Menu Customization
Post here questions and problems related to editing and publishing DITA content.
-
- Posts: 37
- Joined: Mon Jul 14, 2014 9:48 am
Context Menu Customization
Hi Team,
We are trying to customize some context menu items in oxygen 20.1 version.
Example: Inspect, Options, Insert -> Insert Entity
We tried creating an external jar plug in but couldn't edit the context menu.
We also checked plugin.xml file from oxygen 20.1 package. But we could not edit the context menu.
Could you please suggest a way to customize the context menu items.
Thanks in advance!
Regards,
SaiTeja
We are trying to customize some context menu items in oxygen 20.1 version.
Example: Inspect, Options, Insert -> Insert Entity
We tried creating an external jar plug in but couldn't edit the context menu.
We also checked plugin.xml file from oxygen 20.1 package. But we could not edit the context menu.
Could you please suggest a way to customize the context menu items.
Thanks in advance!
Regards,
SaiTeja
-
- Posts: 9434
- Joined: Fri Jul 09, 2004 5:18 pm
Re: Context Menu Customization
Hi,
I'm pasting below the same answer I gave to the email you sent to the forum admin email address:
I need more details in order to help. Can you maybe attach the plugin you worked on? Or at least tell me about what API you tried to use in order to control the contextual menu.
Does your plugin use a Workspace Access plugin extension?
There is a "addMenusAndToolbarsContributorCustomizer" API which allows you to customize the popup menu both for the Text and Author editing modes:
https://github.com/oxygenxml/sample-plu ... nsion.java
Regards,
Radu
I'm pasting below the same answer I gave to the email you sent to the forum admin email address:
I need more details in order to help. Can you maybe attach the plugin you worked on? Or at least tell me about what API you tried to use in order to control the contextual menu.
Does your plugin use a Workspace Access plugin extension?
There is a "addMenusAndToolbarsContributorCustomizer" API which allows you to customize the popup menu both for the Text and Author editing modes:
https://github.com/oxygenxml/sample-plu ... nsion.java
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
-
- Posts: 37
- Joined: Mon Jul 14, 2014 9:48 am
Re: Context Menu Customization
Hi,
We are doing our customization using maven and creating plugin using maven install.
After creating the maven project we edited the oxygen-sample-eclipse-plugin.
We are using the following APIs in our code
With using the above APIs we are able to create the plugin.
But now the changes are not reflecting.
Please help. Thanks in advance.
Regards,
SaiTeja
We are doing our customization using maven and creating plugin using maven install.
After creating the maven project we edited the oxygen-sample-eclipse-plugin.
We are using the following APIs in our code
Code: Select all
AuthorPopupMenuCustomizer popUpCustomizer = new AuthorPopupMenuCustomizer()
WSEditorPage currentPage = editorAccess.getCurrentPage();
PluginWorkspace pluginWorkspace = PluginWorkspaceProvider.getPluginWorkspace();
URL[] allEditorLocations = pluginWorkspace.getAllEditorLocations(PluginWorkspace.MAIN_EDITING_AREA);
WSEditor editorAccess = pluginWorkspace.getEditorAccess(allEditorLocations[i], PluginWorkspace.MAIN_EDITING_AREA);
But now the changes are not reflecting.
Please help. Thanks in advance.
Regards,
SaiTeja
-
- Posts: 9434
- Joined: Fri Jul 09, 2004 5:18 pm
Re: Context Menu Customization
Dear SaiTeja,
I need some actual code samples to reflect what you are doing on your side.
What are you doing with the popup menu customizer? Do you add it to the Author page using this API ro.sync.exml.workspace.api.editor.page.author.WSAuthorEditorPageBase.addPopUpMenuCustomizer(AuthorPopupMenuCustomizer)?
Maybe it would be easier for you to use this API:
Something like:
Regards,
Radu
I need some actual code samples to reflect what you are doing on your side.
What are you doing with the popup menu customizer? Do you add it to the Author page using this API ro.sync.exml.workspace.api.editor.page.author.WSAuthorEditorPageBase.addPopUpMenuCustomizer(AuthorPopupMenuCustomizer)?
Maybe it would be easier for you to use this API:
Code: Select all
ro.sync.exml.workspace.api.standalone.StandalonePluginWorkspace.addMenusAndToolbarsContributorCustomizer(MenusAndToolbarsContributorCustomizer)
Code: Select all
public void applicationStarted(StandalonePluginWorkspace pluginWorkspaceAccess) {
pluginWorkspaceAccess.addMenusAndToolbarsContributorCustomizer(new MenusAndToolbarsContributorCustomizer() {
@Override
public void customizeAuthorPageExtensionMenu(JMenu extensionMenu,
AuthorAccess authorAccess) {
//
}
/**
* @see ro.sync.exml.workspace.api.standalone.actions.MenusAndToolbarsContributorCustomizer#customizeAuthorPopUpMenu(javax.swing.JPopupMenu, ro.sync.ecss.extensions.api.AuthorAccess)
*/
@Override
public void customizeAuthorPopUpMenu(JPopupMenu popUp, AuthorAccess authorAccess) {
//TODO customize the Author popup menu here
}
/**
* @see ro.sync.exml.workspace.api.standalone.actions.MenusAndToolbarsContributorCustomizer#customizeAuthorBreadcrumbPopUpMenu(javax.swing.JPopupMenu, ro.sync.ecss.extensions.api.AuthorAccess, ro.sync.ecss.extensions.api.node.AuthorNode)
*/
@Override
public void customizeAuthorBreadcrumbPopUpMenu(JPopupMenu popUp,
AuthorAccess authorAccess, AuthorNode currentNode) {
//
}
/**
* @see ro.sync.exml.workspace.api.standalone.actions.MenusAndToolbarsContributorCustomizer#customizeAuthorOutlinePopUpMenu(javax.swing.JPopupMenu, ro.sync.ecss.extensions.api.AuthorAccess)
*/
@Override
public void customizeAuthorOutlinePopUpMenu(JPopupMenu popUp, AuthorAccess authorAccess) {
//
}
@Override
public void customizeAuthorPageExtensionToolbar(ToolbarInfo toolbarInfo,
AuthorAccess authorAccess) {
//
}
});
}
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
Return to “DITA (Editing and Publishing DITA Content)”
Jump to
- Oxygen XML Editor/Author/Developer
- ↳ Feature Request
- ↳ Common Problems
- ↳ DITA (Editing and Publishing DITA Content)
- ↳ SDK-API, Frameworks - Document Types
- ↳ DocBook
- ↳ TEI
- ↳ XHTML
- ↳ Other Issues
- Oxygen XML Web Author
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Content Fusion
- ↳ Feature Request
- ↳ Common Problems
- Oxygen JSON Editor
- ↳ Feature Request
- ↳ Common Problems
- Oxygen PDF Chemistry
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Feedback
- ↳ Feature Request
- ↳ Common Problems
- Oxygen XML WebHelp
- ↳ Feature Request
- ↳ Common Problems
- XML
- ↳ General XML Questions
- ↳ XSLT and FOP
- ↳ XML Schemas
- ↳ XQuery
- NVDL
- ↳ General NVDL Issues
- ↳ oNVDL Related Issues
- XML Services Market
- ↳ Offer a Service