Page 1 of 1

Deploying/installing multipe plugins as one package

Posted: Tue May 20, 2014 4:01 pm
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?

Re: Deploying/installing multipe plugins as one package

Posted: Tue May 20, 2014 4:38 pm
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

Re: Deploying/installing multipe plugins as one package

Posted: Tue May 20, 2014 5:53 pm
by Hydrogen
That makes sense, thank you!

Re: Deploying/installing multipe plugins as one package

Posted: Tue May 20, 2014 9:38 pm
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?

Re: Deploying/installing multipe plugins as one package

Posted: Wed May 21, 2014 9:53 am
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