Page 1 of 1
Add plugin in our application
Posted: Wed Jul 31, 2024 1:12 pm
by Isabelle
Hello All,
We use oxygen sdk 26 and we want to add plugin to our application.
Can you explain me where to place the plugin in order to use it from our application.
Thank you
Regards,
Isabelle
Re: Add plugin in our application
Posted: Wed Jul 31, 2024 1:56 pm
by Radu
Hi Isabelle,
We do not guarantee that plugins built for the Oxygen desktop will run with the Oxygen Author Component.
There was this topic in our user's manual about doing this with the Oxygen SDK:
https://www.oxygenxml.com/doc/versions/ ... ugins.html
From what I looked in our code the same folder where you place framework directories can also contain plugin directories and the Author Component should load the plugins from it.
Regards,
Radu
Re: Add plugin in our application
Posted: Thu Aug 01, 2024 7:25 pm
by Isabelle
Hi,
Thanks to the system properties
com.oxygenxml.editor.plugins.dir, we found where to place our plugin.
For our tests, we use
oxygen-sample-swing-component.
We try to add this plugin
Oxygen AI Positron Assistant (
https://www.oxygenxml.com/doc/versions/ ... itron.html).
We have created a folder
plugins inside the folder
frameworks.
Then, in
plugins folder, we have
plugin.dtd,
plugin.xml and a
folder that contains the content of oxygen-ai-positron-addon.zip.
If we use
plugin.xml with this content :
Code: Select all
<?xml version="1.0" encoding="UTF-8"?>
<!-- The plugin.dtd file is located in the OXYGEN_INSATALL_DIR/plugins directory -->
<!DOCTYPE plugin SYSTEM "../plugin.dtd">
<plugin
id="oxygen.ai.positron.addon1"
name="Oxygen AI Positron Assistant dans plugins"
description="This addon uses the Oxygen AI Positron service to help technical documentation writers generate content."
version="2.1.0"
vendor="Syncro Soft"
class="com.oxygenxml.positron.plugin.PositronPlugin">
<runtime>
<library name="oxygen-ai-positron-addon-2.1.0/oxygen-ai-positron-addon-2.1.0.jar" scope="global"/>
</runtime>
</plugin>
We have a
java.lang.ClassNotFoundException on
com.oxygenxml.positron.plugin.PositronPlugin
But if we use
plugin.xml with this content :
Code: Select all
<?xml version="1.0" encoding="UTF-8"?>
<!-- The plugin.dtd file is located in the OXYGEN_INSATALL_DIR/plugins directory -->
<!DOCTYPE plugin SYSTEM "../plugin.dtd">
<plugin
id="oxygen.ai.positron.addon1"
name="Oxygen AI Positron Assistant dans plugins"
description="This addon uses the Oxygen AI Positron service to help technical documentation writers generate content."
version="2.1.0"
vendor="Syncro Soft">
<runtime>
<library name="oxygen-ai-positron-addon-2.1.0/oxygen-ai-positron-addon-2.1.0.jar" scope="global"/>
</runtime>
</plugin>
We have no error, but
getPluginViewCustomizers() as 0 element.
Can you explain us what to do to fix that.
Thanks,
Regards,
Isabelle
Re: Add plugin in our application
Posted: Fri Aug 02, 2024 9:56 am
by Radu
Hi Isabelle,
What does that "oxygen-ai-positron-addon-2.1.0.jar" contain inside it? It might actually be an entire plugin folder bundled there along with its proper plugin.xml. Did you obtain the JAR from our add-on update site? If you you should unpack it and used the unpacked folder as the plugin folder as it contains the proper plugin.xml and a lot of JAR libraries referenced in the plugin.xml.
Also if you actually want to bundle and distribute our AI Positron plugin with the Author Component which is part of your solution we might be stepping in some legal aspects as well. I will try to clarify if this is allowed.
Regards,
Radu
Re: Add plugin in our application
Posted: Fri Aug 02, 2024 11:16 am
by Isabelle
Hi,
Radu wrote: ↑Fri Aug 02, 2024 9:56 am
Did you obtain the JAR from our add-on update site?
Yes, in the url i have mentioned there is a link to download a zip file which contains 2 elements
Radu wrote: ↑Fri Aug 02, 2024 9:56 am
If you you should unpack it and used the unpacked folder as the plugin folder as it contains the proper plugin.xml and a lot of JAR libraries referenced in the plugin.xml.
So, if I understand correctly, we have to unpack the file
oxygen-ai-positron-addon-2.1.0-plugin.jar and put the content of
oxygen-ai-positron-addon-2.1.0 folder in our
plugins folder. Am I right ?
Radu wrote: ↑Fri Aug 02, 2024 9:56 am
Also if you actually want to bundle and distribute our AI Positron plugin with the Author Component which is part of your solution we might be stepping in some legal aspects as well. I will try to clarify if this is allowed.
No, it was just for test on our side.
We juste took one of your add on on this page
https://www.oxygenxml.com/addons/marketplace.html
Our goal is to create our own add-on.
Regards,
Isabelle
Re: Add plugin in our application
Posted: Fri Aug 02, 2024 11:19 am
by Radu
Hi Isabelle,
if I understand correctly, we have to unpack the file oxygen-ai-positron-addon-2.1.0-plugin.jar and put the content of oxygen-ai-positron-addon-2.1.0 folder in our plugins folder. Am I right ?
Yes. That is the actual plugin folder.
Ok, if you decide to bundle our add-on you can let me know and we can look into the legal aspects.
You do not actually need to create the AI functionality as an Oxygen plugin, you can just add the side view and actions around the Author Component from your own Java code which uses the Author Component in your solution.
Regards,
Radu