Deploying/installing multipe plugins as one package

Post here questions and problems related to oXygen frameworks/document types.
Hydrogen
Posts: 15
Joined: Fri Jan 27, 2012 11:40 am

Deploying/installing multipe plugins as one package

Post by Hydrogen »

Hi,

First I'd like to say i appreciate the add-on deployment feature of Oxygen. My users can easily add and update the plugins I create via Help->Manage add-ons...

Now I want to create some plugins that depend on each other. I.e. each of them is not useful without the other. They will share one or more java classes. I would like the users to see them as one installable unit in the manage add-ons dialog.

Is that possible? How?

It is not hard to put all the class-files into one jar. That jar could then be included in the install jar. However I would need separate plugin.xml files for each plugin as they would differ on the value of the class attribute of the extension element (at a minimum). Apparently the name of the plugin.xml file is fixed. Is that true?
alex_jitianu
Posts: 1016
Joined: Wed Nov 16, 2005 11:11 am

Re: Deploying/installing multipe plugins as one package

Post by alex_jitianu »

Hi,

A plugin in Oxygen is really more like a container consisting in one or more extensions:

Code: Select all


<plugin 
id="com.oxygenxml.plugin.WorkspaceAccess"
name="CustomWorkspaceAccess"
class="com.oxygenxml.sdksamples.workspace.WorkspaceAccessPlugin">

<extension type="WorkspaceAccess"
class="com.ext.WorkspaceAccessPluginExtension"/>
<extension type="OptionPage" class="com.ext.OptionPagePluginExtension"></extension>
</plugin>
So you could have one plugin, with one plugin.xml descriptor that declares all the componential extensions. As far as the add-ons system goes, currently it's not possible for an add-on declare as requiring another add-on. But I don't think you need such a feature anymore, right? (having the possibility to group all the functionality into one plugin)

Best regards,
Alex
Hydrogen
Posts: 15
Joined: Fri Jan 27, 2012 11:40 am

Re: Deploying/installing multipe plugins as one package

Post by Hydrogen »

That makes sense, thank you!
Hydrogen
Posts: 15
Joined: Fri Jan 27, 2012 11:40 am

Re: Deploying/installing multipe plugins as one package

Post by Hydrogen »

This seems to work but there is a little catch. Both extensions are given the same name (the name of the plugin) on the plugins submenu of the context menu.

Is there a way I can give each extension a name?
alex_jitianu
Posts: 1016
Joined: Wed Nov 16, 2005 11:11 am

Re: Deploying/installing multipe plugins as one package

Post by alex_jitianu »

Hello,

The extension element from plugin.xml has an actionName attribute. If present, it will be preferred as the name of the action from the context menu.

Best regards,
Alex
Post Reply