Eclipse, Ant, and XML association

Having trouble installing Oxygen? Got a bug to report? Post it all here.
bdemchak
Posts: 2
Joined: Fri Apr 29, 2011 1:10 am

Eclipse, Ant, and XML association

Post by bdemchak »

Hi --

I'm happily using XML Editor 12.1, build 2011031114 ... almost.

After using XML Editor for a while, I'm turning back to my Eclipse (v3.4) development and have noticed that XML Editor seems to have completely taken ownership of the .XML suffix.

This is bad if my Ant files are .XML build files (as, of course, they are). I mean for these files to have the Ant Editor as their default editor. More importantly, though, I don't seem to be able to associate them with an Eclipse Run Configuration for Ant. (Before XML Editor came along, I could simply right click on my build file, and select Run. Doing so now doesn't associate the run with Ant anymore.)

Has anyone else had this problem?? Any idea how to regain control of my Ant builds??
adrian
Posts: 2879
Joined: Tue May 17, 2005 4:01 pm

Re: Eclipse, Ant, and XML association

Post by adrian »

Hello,

I can confirm that there is indeed a conflict between the Ant plugin and the Oxygen plugin with regard to XML files.
After installing Oxygen the Ant plugin no longer recognizes the build files. Only 'build.xml'(the file name) is still recognized as an Ant file.

I have tried to manually set file names or file patterns in the Ant plugin settings(Windows -> Preferences -> Ant) but it seems to always ignore them(even without Oxygen installed).

A workaround for this problem is to use Run -> External Tools -> External Tools Configurations... and create a new Ant Build launch configuration.

I've added this to our issue tracking tool and we'll investigate and let you know what we found out.

Regards,
Adrian
Adrian Buza
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
bdemchak
Posts: 2
Joined: Fri Apr 29, 2011 1:10 am

Re: Eclipse, Ant, and XML association

Post by bdemchak »

Thanks.

While this is the solution I found, too, it helps a lot to have it confirmed by you.

I'm quite happy with XML Editor and am likely to recommend it for others in our group. If I do, though, is there any installation options I should recommend so that others in my group don't incur this Eclipse issue? (I'm quite happy to have XML Editor and Eclipse be and remain separate.)

If you find a solution for this, please put me on the list of interested parties.
adrian
Posts: 2879
Joined: Tue May 17, 2005 4:01 pm

Re: Eclipse, Ant, and XML association

Post by adrian »

I thought you were using the Oxygen Eclipse plugin(Go to Help -> About in Eclipse and check if there's an Oxygen logo there). Did I misunderstand?

Are you using the standalone edition of Oxygen XML Editor instead? I don't see how the standalone could affect Eclipse in the same way. They are completely separate, Eclipse even has its own associations distinct from the ones in the OS.

Regards,
Adrian
Adrian Buza
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
adrian
Posts: 2879
Joined: Tue May 17, 2005 4:01 pm

Re: Eclipse, Ant, and XML association

Post by adrian »

Hi again,

We found a simple solution for this, and you can also apply it to your installed Oxygen Eclipse plugin.

Navigate to the Oxygen plugin folder, e.g. <eclipse>\plugins\com.oxygenxml.editor_12.1.0.v2011031114 and edit the plugin.xml file with a text editor. Search for: file-extensions="xml,
You should find an XML block like this:
<extension point="org.eclipse.core.contenttype.contentTypes">
<content-type
base-type="org.eclipse.core.runtime.xml"
priority="high"
file-extensions="xml,vxml,xtm,xhtml,fo,mathml,svg,wssr,wssc,dita,ditamap,bookmap,ditaval,mml,ncx,opf"
id="XmlFile" name="oXygen XML">
<describer class="com.oxygenxml.editor.editors.xml.XMLContentDescriber"/>
</content-type>
</extension>
Change the value of the priority attribute from high to low: priority="low"

CRITICAL: After modifying plugin.xml, make sure that the next time you run Eclipse you use the -clean command line argument: eclipse -clean
This forces Eclipse to clear its caches and reload the plugin configuration files(one of which you've just modified).

Regards,
Adrian
Adrian Buza
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
adrian
Posts: 2879
Joined: Tue May 17, 2005 4:01 pm

Re: Eclipse, Ant, and XML association

Post by adrian »

Hello,

This problem has been resolved in version 12.2 of Oxygen.

Regards,
Adrian
Adrian Buza
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
Post Reply