Page 1 of 1

Programmatically adding XML catalog?

Posted: Thu Mar 23, 2006 6:44 am
by jruud
Is there a way to programmatically add an XML catalog file to Oxygen from an Eclipse plugin? We would like our application (an Eclipse plugin) to automatically add our own catalog file to Oxygen if the Oxygen plugin is available (the existence check is the easy part). Ideally the change would not be persisted (the catalog file would only be added "in memory"), but a persistent change that may or may not require a restart of Eclipse would also be acceptable. However, in the latter case there must be a way to prevent the same catalog file from being added more than once. Is this currently possible, or are there any plans of supporting something similar in a future release?

Thanks, John

Posted: Thu Mar 23, 2006 12:02 pm
by sorin_ristache
Hello,

In the current version there is the possibility of modifying the default XML catalog of <oXygen/> presented below the checkbox "Use default catalog" available in Window -> Preferences -> oXygen / XML / XML Catalog. The default catalog is located in [Eclipse-install-folder]/plugins/com.oxygenxml.editor_7.1.0/frameworks/catalog.xml and can be modified by other plugin for example by adding a new entry nextCatalog. A future version of the plugin can define an extension point where other plugins can contribute XML catalogs that are added to the catalogs presented in Window -> Preferences -> oXygen / XML / XML Catalog and are used only in the current session of Eclipse, that is they are not saved in the user preferences for future sessions. I added this on our bugzilla but it does not have a top priority. To increase the priority we need more user demands or a business case.

Regards,
Sorin

Posted: Thu Mar 23, 2006 7:12 pm
by jruud
Thanks Sorin, as you suggested manually manipulating the file should work. As for a future extension point I think I would need an API for programmatic access as well, as my plugin can't depend on Oxygen being present (while I'm not sure if fragments etc. may a possible workaround for this)

John