SDK usage

Post here questions and problems related to oXygen frameworks/document types.
nagang
Posts: 34
Joined: Mon Jul 14, 2014 9:48 am

SDK usage

Post by nagang » Thu Sep 04, 2014 12:59 pm

Hello,

I have Eclipse with oxygen plug-in and I have downloaded the oxygen SDK but I am confusing on how to use this SDK for creating plug-ins for oxygen customization

Do I need any more to develop this plug-ins?

Please provide the complete details

Thank you!!

Regards,
Navaneetha

cristi_talau
Posts: 247
Joined: Thu Sep 04, 2014 4:22 pm

Re: SDK usage

Post by cristi_talau » Thu Sep 04, 2014 4:44 pm

Hello,

Starting from version 16.0, oXygen provides the SDK as a Maven archetype. You can use it to create projects for any kind of oXygen customization including plugins for the standalone distribution, plugins Eclipse IDE integration, frameworks. More details about all kinds of customizations can be found on the SDK page http://oxygenxml.com/oxygen_sdk.html.

I assume you want to develop plugins for the oXygen standalone distribution. Is it right?

First, you have to create a starting project from our SDK (details at http://oxygenxml.com/oxygen_sdk_maven.html). This project contains everything you need to start developing any kind of oXygen customization. It also contains a set of sample plugins that you can use as a starting point.

There is also a chapter in our user guide about plugins development: http://oxygenxml.com/doc/ug-editor/#top ... ugins.html.

Also, note that the oXygen Eclipse plugin is a flavour of the oXygen editor to the Eclipse platform. It does not have the ability of creating oXygen plugins.

Best,
Cristi

nagang
Posts: 34
Joined: Mon Jul 14, 2014 9:48 am

Re: SDK usage

Post by nagang » Fri Sep 05, 2014 11:43 am

Hello,

Can we use the plug-ins developed in the oxygen plug-in installed in Eclipse

Regards,
Navaneetha

cristi_talau
Posts: 247
Joined: Thu Sep 04, 2014 4:22 pm

Re: SDK usage

Post by cristi_talau » Fri Sep 05, 2014 3:10 pm

Hello,

In order to integrate with the oXygen Eclipse plugin you should develop another Eclipse plugin which communicates with the oXygen plugin. You have to declare a dependency between your plugin and the oXygen plugin by adding a "Require-Bundle: com.oxygenxml.editor" entry in your MANIFEST.MF file. There is an example manifest file in the SDK project. You can find more details about that here [1].

So, you have to develop a regular eclipse plugin and use the oXygen API. As pointed out here [2], you can use the PluginWorkspaceProvider.getPluginWorkspace() as an entry point to access oXygen plugin functionality.

Best,
Cristi

[1] http://www.oxygenxml.com/oxygen_sdk.htm ... ntegration
[2] http://www.oxygenxml.com/doc/ug-editor/ ... _view.html

nagang
Posts: 34
Joined: Mon Jul 14, 2014 9:48 am

Re: SDK usage

Post by nagang » Tue Sep 09, 2014 1:06 pm

Hi,

We have installed maven and tried to create the start up project using commandline option. But we were unsuccessful. We are getting the below error while executing the commandline option provided in the link "http://oxygenxml.com/oxygen_sdk_maven.html"

"[ERROR] No plugin found for prefix 'archetype' in the current project and in the plugin groups [org.apache.maven.plugins, org.codehaus.mojo] available from the repositories"

We have added the code for <profiles> tag in the 'settings.xml' file. But we do not know what all details to provide in <proxy> tag.

Please help us in resolving this issue.

Regards,
Navaneetha

cristi_talau
Posts: 247
Joined: Thu Sep 04, 2014 4:22 pm

Re: SDK usage

Post by cristi_talau » Tue Sep 09, 2014 2:45 pm

Hello,

The error you are getting seems to be related to network connectivity. Maven requires an Internet connection in order to download the archetype from the Maven central repository.

In order to troubleshoot the networking problem please check the following things:
- The <proxy> tag should be added only if your company uses a proxy to connect to the internet. The tags inside should be populated with the details of your proxy configuration. Contact a network administrator to give you these details.
- Your firewall does not block the maven process from accessing the internet.

In order to reduce the problem you can also try to generate a simple Maven project that is independent on the oXygen SDK. The command line should be:

Code: Select all

mvn archetype:generate -DgroupId=com.mycompany.app -DartifactId=my-app -DarchetypeArtifactId=maven-archetype-quickstart -DinteractiveMode=false

If you still cannot get it working, try running Maven with -X (debugging output) and send us the output.

Best,
Cristi

nagang
Posts: 34
Joined: Mon Jul 14, 2014 9:48 am

Re: SDK usage

Post by nagang » Wed Sep 10, 2014 1:41 pm

Hello,

Thanks for the reply.

Now we could create the start up project and are able to see sample plugins.

Now we want to use the plugin "oxygen-sample-plugin-impose-options". For this, as it says in the README.txt, we have created one 'template' folder with "options.xml" and "application.layout" inside the folder "oxygen-sample-plugin-impose-options". But we don't know how to install this plug-in and how it works in oxygen.

We have followed the steps mentioned in the url http://oxygenxml.com/doc/ug-editor/#tas ... lugin.html, but we are not able to make it work properly. We are getting error as "java.lang.ClassNotFoundException
C:\Program Files\Oxygen XML Author 16\plugins\oxygen-sample-plugin-impose-options - myGroup.imposeoptions.ImposeOptionsPluginExtension"
while starting oxygen after doing the mentioned steps. Also after opening Help->Manage Add-ons, the mentioned plugin is shown as installed but not working. If I try to install again, it is showing some more java errors.

Please let us know whether we missed any steps in adding the plugin in oxygen.

Regards,
Navaneetha

cristi_talau
Posts: 247
Joined: Thu Sep 04, 2014 4:22 pm

Re: SDK usage

Post by cristi_talau » Wed Sep 10, 2014 3:59 pm

Hello,

First of all please make sure that the "options.xml" and "application.layout" are not inside the "template" folder; they should be next to it.

Secondly, I noticed a bug in our SDK. The options.xml and application.layout and the template folder don't get included in the plugin artifact. In order to fix this please add the following lines in the "<fileSets>" tag in the oxygen-sample-plugins/assembly.xml file:

Code: Select all

<fileSet>
<directory>/</directory>
<outputDirectory>/</outputDirectory>
<includes>
<include>templates/*</include>
<include>options.xml</include>
<include>application.layout</include>
</includes>
</fileSet>
This bug will be corrected in the next release - oXygen 16.1 - which is due in a couple of weeks.

The last thing I wanted to mention is that in order to deploy the plugin you have to first build it running

Code: Select all

mvn clean package
in the "oxygen-sample-plugin-impose-options" directory, and then unarchive the resulting artifact (located at "oxygen-sample-plugin-impose-options/target/oxygen-sample-plugin-impose-options-*-plugin.jar") in the "plugins" folder of the oXygen install directory. The error you mentioned seem to be caused by the entire project folder of the plugin being copied there.

You can also find instructions about how to deploy the plugins in the "oxygen-sample-plugins/README.html" file in the SDK project.

Best,
Cristi

Post Reply