File type association with Oxygen eclipse plugin
Having trouble installing Oxygen? Got a bug to report? Post it all here.
-
- Posts: 2
- Joined: Wed Jul 20, 2005 9:34 pm
File type association with Oxygen eclipse plugin
Post by AggieScott »
Here at A&M we use cocoon with eclipse and love the oxygen editor for all our XML stuff. However sometimes in our eclipse source tree we have xml files that do not end with ".xml". When eclipse tries to open these it will open them in with the standard eclipse java editor and not the oxygen plug-in editor. I most commonly find this with cocoon's ".xmap" but it affects other formats as well such as ".xconf".
Is there a way set what file types the eclipse oxygen plug-in recognizes?
Is there a way set what file types the eclipse oxygen plug-in recognizes?
-
- Posts: 2
- Joined: Wed Jul 20, 2005 9:34 pm
Post by AggieScott »
To answer my own question, it appears that you can edit the plugin.xml file for the Oxygen Eclipse plug-in such that it recognizes new file types.
To add new file types to the Oxygen XML Editor plug-in,
1) Open the plugin.xml configuration file for the oxygen plug-in.
2) Search for “extensionsâ€, every where you see an extension for “xml†add the new file type(s) you want. If you want to turn on all features for the particular file type there are about 10 locations that will need to be updated.
3) Reload the oxygen plug-in, I imagine there is a nice and easy way to do this but I couldn’t find where it is. The only way I could figure out how to do this is to remove the plug-in, just drag the directory to a new location. Start eclipse and the shutdown eclipse. Then move the plug-in back into the eclipse plug-in directory. When you start eclipse next it will recognize the new extensions.
I wish there was a better way to do this, but until then this way will work.
To add new file types to the Oxygen XML Editor plug-in,
1) Open the plugin.xml configuration file for the oxygen plug-in.
2) Search for “extensionsâ€, every where you see an extension for “xml†add the new file type(s) you want. If you want to turn on all features for the particular file type there are about 10 locations that will need to be updated.
3) Reload the oxygen plug-in, I imagine there is a nice and easy way to do this but I couldn’t find where it is. The only way I could figure out how to do this is to remove the plug-in, just drag the directory to a new location. Start eclipse and the shutdown eclipse. Then move the plug-in back into the eclipse plug-in directory. When you start eclipse next it will recognize the new extensions.
I wish there was a better way to do this, but until then this way will work.
-
- Posts: 2
- Joined: Thu Jul 21, 2005 5:08 am
- Location: Atlanta, Georgia
- Contact:
Thanks!
This helped me get html files working properly.
I am confused, however, since configuring through the preferences worked under version 6.0.0. In particular, the file associations under General/Editor could be set to associate an html with the XML editor and all was fine. Under 6.1.0 this still 'worked' in the sense that the Oxygen XML Editor icon was displayed by html files. However, the editor didn't highlight syntax, nor did tag completion work.
At any rate, your fix got me going again.
I am confused, however, since configuring through the preferences worked under version 6.0.0. In particular, the file associations under General/Editor could be set to associate an html with the XML editor and all was fine. Under 6.1.0 this still 'worked' in the sense that the Oxygen XML Editor icon was displayed by html files. However, the editor didn't highlight syntax, nor did tag completion work.
At any rate, your fix got me going again.
-
- Site Admin
- Posts: 2095
- Joined: Thu Jan 09, 2003 2:58 pm
Hi,
To refresh the plugin just start Eclipse passing -clean as a command line argument.
Eclipse has a problem isolating plugins one from the other when they register to handle the same type of file, there is a bug entry with this for some time already on the Eclipse bugzilla. In 6.1 we hope we fixed that but it seems that the association from Eclipse does not set everything to get the oXygen editors workig for new type of files. We plan to investigate this and until then there is the current workaround by editing the plugin.xml. Basically it is trading the fact that it did not work for the default files when there were other plugins installed handling the same file types with the fact that it needs manual edit in the plugin.xml for new file types.
Best Regards,
George
To refresh the plugin just start Eclipse passing -clean as a command line argument.
Eclipse has a problem isolating plugins one from the other when they register to handle the same type of file, there is a bug entry with this for some time already on the Eclipse bugzilla. In 6.1 we hope we fixed that but it seems that the association from Eclipse does not set everything to get the oXygen editors workig for new type of files. We plan to investigate this and until then there is the current workaround by editing the plugin.xml. Basically it is trading the fact that it did not work for the default files when there were other plugins installed handling the same file types with the fact that it needs manual edit in the plugin.xml for new file types.
Best Regards,
George
-
- Posts: 10
- Joined: Thu Jan 29, 2004 9:32 pm
- Contact:
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