Send command line option for plugin
Post here questions and problems related to oXygen frameworks/document types.
-
- Posts: 1
- Joined: Mon Feb 24, 2014 7:47 pm
Send command line option for plugin
We've made a plugin to load data from web services.
Is it possible to open Oxygen and send an id to the plugin with command line ?
Ex:
Thanks
Is it possible to open Oxygen and send an id to the plugin with command line ?
Ex:
Code: Select all
$ oxygen.sh myPlugin=<id>
-
- Posts: 9434
- Joined: Fri Jul 09, 2004 5:18 pm
Re: Send command line option for plugin
Hi,
Oxygen is a Java application. A Java application can be started with a set of properties (which can then be read from the Java code using System.getProperty) and with a set of program arguments.
If you look inside the OXYGEN_INSTALL_DIR/oxygen.sh, the system properties are sent hard coded like:
while the program arguments are read from the command line. Unfortunately there is no way for a plugin to have access to the program arguments while it could have access to the system properties using constructs like System.getProperty("com.oxygenxml.MultipleInstances").
You will probably need to make your own version of the oxygen.sh which interprets the list of additional command line parameters as system properties for the java process.
Another possible workaround would be for your plugin to open a socket on some predetermined port and to send to it commands from the exterior via that opened port.
Regards,
Radu
Oxygen is a Java application. A Java application can be started with a set of properties (which can then be read from the Java code using System.getProperty) and with a set of program arguments.
If you look inside the OXYGEN_INSTALL_DIR/oxygen.sh, the system properties are sent hard coded like:
Code: Select all
-Dcom.oxygenxml.MultipleInstances=true
You will probably need to make your own version of the oxygen.sh which interprets the list of additional command line parameters as system properties for the java process.
Another possible workaround would be for your plugin to open a socket on some predetermined port and to send to it commands from the exterior via that opened port.
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
-
- Posts: 9434
- Joined: Fri Jul 09, 2004 5:18 pm
Re: Send command line option for plugin
Hi,
Oxygen 16.0 was just released.
Starting with Oxygen 16.0 you will be able to invoke a command line like:
and the application will start with a system property named myPlugin set to id which a started plugin can read from the system properties map.
Regards,
Radu
Oxygen 16.0 was just released.
Starting with Oxygen 16.0 you will be able to invoke a command line like:
Code: Select all
$ oxygen.sh -DoxymyPlugin=id
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
Return to “SDK-API, Frameworks - Document Types”
Jump to
- Oxygen XML Editor/Author/Developer
- ↳ Feature Request
- ↳ Common Problems
- ↳ DITA (Editing and Publishing DITA Content)
- ↳ SDK-API, Frameworks - Document Types
- ↳ DocBook
- ↳ TEI
- ↳ XHTML
- ↳ Other Issues
- Oxygen XML Web Author
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Content Fusion
- ↳ Feature Request
- ↳ Common Problems
- Oxygen JSON Editor
- ↳ Feature Request
- ↳ Common Problems
- Oxygen PDF Chemistry
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Feedback
- ↳ Feature Request
- ↳ Common Problems
- Oxygen XML WebHelp
- ↳ Feature Request
- ↳ Common Problems
- XML
- ↳ General XML Questions
- ↳ XSLT and FOP
- ↳ XML Schemas
- ↳ XQuery
- NVDL
- ↳ General NVDL Issues
- ↳ oNVDL Related Issues
- XML Services Market
- ↳ Offer a Service