Extensions Actions disarmed in Oxygen Component
Posted: Tue Apr 02, 2013 7:06 pm
Hi, i'm stil using Oxygen Component to create a custom standalone application.
I'm trying to integrate Oxygen 14.2 but i have troubles with extensions actions, they are always disarmed (disabled).
I'm using the code provided in the javadoc to get the extension actions and i add them to a JToolBar.
Here is a piece of code :
Another problem is : what happened if the current page is the Text Page, which is now available ? should i remove the actions from the toolbar?
I founded in this forum (http://www.oxygenxml.com/forum/post2359 ... led#p23597) that the actions would be contextual to the caret position, but this was not in the release note, i miss some documentation.
I hope that the solution that consist to implement a caret listener and test each xpath context of each action is not the right way.
Regards,
Benoît.
I'm trying to integrate Oxygen 14.2 but i have troubles with extensions actions, they are always disarmed (disabled).
I'm using the code provided in the javadoc to get the extension actions and i add them to a JToolBar.
Here is a piece of code :
Code: Select all
List<JToolBar> toolBarList = ((WSAuthorComponentEditorPage)oxygenComponent.getAuthorComponentProvider().getWSEditorAccess().getCurrentPage()).createExtensionActionsToolbars();
for(JToolBar jToolBar : toolBarList) {
for(int i=0; i<=jToolBar.getComponentCount(); i++) {
final Component component = jToolBar.getComponent(i);
add(component);
}
}
I founded in this forum (http://www.oxygenxml.com/forum/post2359 ... led#p23597) that the actions would be contextual to the caret position, but this was not in the release note, i miss some documentation.
I hope that the solution that consist to implement a caret listener and test each xpath context of each action is not the right way.
Regards,
Benoît.