Importing new profiling attributes on the fly Eclipse Oxygen XML Editor

Oxygen general issues.
llecaroz
Posts: 2
Joined: Tue Jan 08, 2013 4:58 pm

Importing new profiling attributes on the fly Eclipse Oxygen XML Editor

Post by llecaroz »

Hello,
Because the profiling attributes can be modified at everytime by an author in its eclipse and because we need all users oxygen configuration (eclipse settings on user's computers) to be updated we need a way to update automatically these settings on each user's computers !

We cannot ask to our users to click manually on the "Import from DITAVAL" in the profiling attributes preferences of Eclipse :(

So we need to find a way to automatically perform this on the fly.

I tried to export the global options and to modify the list of profiling attributes and next to re-import it from the "-Dcom.oxygenxml.default.options". But this works only after having clicked on "Restore default" in the Profiling attributes preferences.

So, at this time, I don't have any way to force the Eclipse Oxygen XML to take in account on the fly, some new profiling attributes without a user intervention !

I took a look in the Oxygen XML APIs but I was unable to find a way to force by programming an import of some new profiling attributes :( ?

So, is there a way to force an update without any user intervention of the profiling attributes with or without using the Oxygen XML APIs ?

Our need:
1° We have only one author allowed into creating/modifying a list of profiling attributes.
2° All other users have to use only the profiling attributes created by user 1°
3° Profiling attributes list written by user 1° & used by users 2° must be imported automatically without any user intervention (so by XML Oxygen APIs, Command line, ...) ?

I will really appreciate your feedback or a help from your part on a way to implement a such workflow,
Thanks a lot in advance
Louis Lecaroz
llecaroz
Posts: 2
Joined: Tue Jan 08, 2013 4:58 pm

Re: Importing new profiling attributes on the fly Eclipse Oxygen XML Editor

Post by llecaroz »

In fact the only way, as the -Dcom.oxygenxml.default.options is not taken in account except if you click on reset to default value, is to modify the values in <Eclipse Workspace>\.metadata\.plugins\org.eclipse.core.runtime\.settings\com.oxygenxml.editor.prefs !!!!

but I will have to close & restart Eclipse to have XML Oxygen consuming the new profiling attributes added in the user preferences !

Any other way to modify by API profiling attributes without restarting Eclipse ?
Or in general, which other potential solutions could I use ?

really thx in advance
Best Regards
Louis
adrian
Posts: 2879
Joined: Tue May 17, 2005 4:01 pm

Re: Importing new profiling attributes on the fly Eclipse Oxygen XML Editor

Post by adrian »

Hello,

To answer your initial question:
So, is there a way to force an update without any user intervention of the profiling attributes with or without using the Oxygen XML APIs ?
No, that's not possible, not for the Oxygen Eclipse plugin.

For the standalone Edition of Oxygen it is possible (though not recommended) if they are kept in the Project Options and everyone works with the same project file. When a user changes a project option (e.g. a profiling attribute), the others using the same project file will be notified that the project file has been changed externally and prompted to reload it on the fly.
However, please note that this is not a recommended scenario because it can be a source of annoyance for the users. It's also possible that some of the users won't reload the file and this will cause their next option or project change to overwrite the current changes (that they haven't reloaded).
We generally recommend using a version control system (e.g. SVN) for the project file.

The -Dcom.oxygenxml.default.options parameter is only meant to set the initial options, but once the user has modified some of these options, the initial option values are no longer relevant (unless you reset these options).
So it could work with -Dcom.oxygenxml.default.options, but only if the users never modify directly any of the profiling options (attributes/condition sets). If they do, they'll have to reset them to get back on the default options file.

Regards,
Adrian
Adrian Buza
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
Radu
Posts: 9446
Joined: Fri Jul 09, 2004 5:18 pm

Re: Importing new profiling attributes on the fly Eclipse Oxygen XML Editor

Post by Radu »

Hi Louis,

And now the question remains what can we do in a future version to help you.
There are two possible improvements (we've got both of them already registered from past user requests).
Which one would you prefer?

1) Allowing each document type (from the Document Type Association Preferences page) to specify its own set of profiling conditions.
As the document type comes with the Oxygen plugin, you could have an internal update site which would be used by everybody to install plugins which have the document type modified to specify the set of profiling conditions.

2) Right now via the Oxygen Eclipse (and Standalone) API you have this method:

Code: Select all

ro.sync.exml.workspace.api.PluginWorkspaceProvider.getPluginWorkspace()
We could consider to add to the ro.sync.exml.workspace.api.Workspace API a method like: setObjectProperty(String, Object) which would allow you to dynamically change general plugin options.

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
Post Reply