"Dynamic" toolbar

<oXygen/> general issues.
Vincent
Posts: 52
Joined: Thu Dec 15, 2011 7:56 pm

"Dynamic" toolbar

Post by Vincent » Mon Jan 30, 2012 5:58 pm

Hello,

Is there any way (with the SDK), to make the author toolbar "dynamic" ?

Actually, I want my toolbar to be different depending the context of the caret in the XML Tree.

I have a list of action I want to propose to my users only when he can use it...

That would be awesome in term of customization !

Vincent

Radu
Posts: 7103
Joined: Fri Jul 09, 2004 5:18 pm

Re: "Dynamic" toolbar

Post by Radu » Tue Jan 31, 2012 10:30 am

Hi Vincent,

No, the Author toolbar cannot be made dynamic using the Author SDK, the mounted Author operations are fixed.

But using our Plugins API:

http://www.oxygenxml.com/oxygen_sdk.htm ... er_Plugins

you could implement a Workspace Access plugin type.

Such a plugin allows you to add a toolbar components customizer:

Code: Select all

ro.sync.exml.workspace.api.standalone.StandalonePluginWorkspace.addToolbarComponentsCustomizer(ToolbarComponentsCustomizer)
Then on the Author toolbar you could try to mount a JPanel in which dynamically you would change the actions based on the caret position.

Using a Workspace Access plugin you can also add your custom toolbar (or view) to Oxygen.

The sample Java class included in the Plugins SDK

Code: Select all

ro.sync.sample.plugin.workspace.CustomWorkspaceAccessPluginExtension
contains some sample code about this.

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com

Vincent
Posts: 52
Joined: Thu Dec 15, 2011 7:56 pm

Re: "Dynamic" toolbar

Post by Vincent » Tue Jan 31, 2012 12:07 pm

Thank you Radu,

I will take a look on it and I think I'll be quickly back with further questions !


Vincent.

SSC
Posts: 206
Joined: Thu Dec 01, 2011 4:22 pm
Location: Hamburg, Germany

Re: "Dynamic" toolbar

Post by SSC » Wed Feb 29, 2012 11:59 am

Hello,

is there something similar to the ro.sync.exml.workspace.api.standalone.StandalonePluginWorkspace.addToolbarComponentsCustomizer(ToolbarComponentsCustomizer) method for the eclipse plugin of oxygen?
In former discussions you already told me that the internal toolbar of an Oxygen editor cannot be modified in the eclipse version.
At that time my aim was to remove items from the internal toolbar.
Now I´d like to know, if the internal toolbar can be appeded by custom items.
I ask this because we currently do not use the main Coolbar of Eclipse in order to save free space on the screen, so that I would for instance like to include the save action in the internal toolbar of the Editor.

Regards,

Simon
Simon Scholz
vogella GmbH
http://www.vogella.com

Radu
Posts: 7103
Joined: Fri Jul 09, 2004 5:18 pm

Re: "Dynamic" toolbar

Post by Radu » Wed Feb 29, 2012 2:05 pm

Hi Simon,

Sorry but we currently do not have such API.
We'll see if we can add such API and update the forum entry when I have more details.

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com

Radu
Posts: 7103
Joined: Fri Jul 09, 2004 5:18 pm

Re: "Dynamic" toolbar

Post by Radu » Fri Oct 19, 2012 2:40 pm

Hi,

Oxygen 14.1 was released and it contains this Eclipse extension API:
com.oxygenxml.editor.editors.ActionBarContributorCustomizer

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com

Vincent
Posts: 52
Joined: Thu Dec 15, 2011 7:56 pm

Re: "Dynamic" toolbar

Post by Vincent » Thu Dec 06, 2012 6:16 pm

Radu wrote:Hi,

Oxygen 14.1 was released and it contains this Eclipse extension API:
com.oxygenxml.editor.editors.ActionBarContributorCustomizer

Regards,
Radu

Hi,

Do you have documentation for this extension ?
The javadoc link doesn't seem to work :
http://www.oxygenxml.com/InstData/Edito ... mizer.html


Thank you,
Vincent.

Radu
Posts: 7103
Joined: Fri Jul 09, 2004 5:18 pm

Re: "Dynamic" toolbar

Post by Radu » Thu Dec 06, 2012 6:21 pm

Hi Vincent,

This customizer interface is for the Oxygen plugin for Eclipse.
Basically if you had another Eclipse plugin, in its plugin.xml you would have some code like:

Code: Select all

<extension point="com.oxygenxml.editor.actionBarContributorCustomizer">
<implementation class="my.package.CustomActionBarContributorCustomizer"/>;
</extension>
The code for the customizer is this one:

Code: Select all

public abstract class ActionBarContributorCustomizer {

/**
* Customize the actions before they are contributed to the main Document menu (XML or XSL, or XSD, etc).
*
* @param actions The list of original actions.
* @return The list of modified actions.
*/
public abstract List<IAction> customizeActionsContributedToDocumentMenu(List<IAction> actions);

/**
* Customize the actions before they are contributed to the main Document toolbar.
*
* @param actions The list of original actions.
* @return The list of modified actions.
*/
public abstract List<IAction> customizeActionsContributedToDocumentToolbar(List<IAction> actions);

/**
* Customize an internal coolbar for a cetain author page. This callback may be received more than once for the
* same document so please make sure that you do not add the same action twice.
*
* @param coolbar The internal coolbar after the fixed actions have been added.
* @param authorEditorPage The current author editor page.
*/
public abstract void customizeAuthorPageInternalCoolbar(CoolBar coolbar, WSAuthorEditorPage authorEditorPage);
}
I'll see if we can also fix the Javadoc link on the website.

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com

Post Reply