Page 1 of 1

FEATURE REQUEST: .ant file and framework association

Posted: Wed Nov 22, 2017 1:48 pm
by bwbohl
When I create a new ANT file it's created with the suffix .xml and the corresponding ANT framework is called due to it's association rules. Besides the file extension .ant being registered in the preferences this does not work for .ant files. This is a pity as in the project pane the icon is even set to an ANT icon and one assumes that everything will be working fine. Nonetheless there will be no schema validation and consequently no content completion assistance.

The current association rule for the framework has wildcards in every field except local root, being set to: "project"

Adding a second association rule with wildcards except as above and "*.ant" in filename will fix the above problem.

Re: FEATURE REQUEST: .ant file and framework association

Posted: Wed Nov 22, 2017 5:03 pm
by Radu
Hi,

As far as I know most ANT build files have the ".xml" extension. Is this ".ant" extension something you are personally using or is it a best practice recommended by the Apache ANT team and used also by others?
In the Oxygen Preferences->"File Types" there is an "ANT build patterns" field which you should also change to match your ANT file extension.

Regards,
Radu

Re: FEATURE REQUEST: .ant file and framework association

Posted: Fri Nov 24, 2017 2:19 pm
by bwbohl
Dear Radu,

I was assuming that the filetype I found in oXygen Editor's preferences was shipped with the application. Also, because in Project-View the file was shown with a custom file icon (showing a little ant).
You might be able to check that way easier than me ;-)

It could be, that I set it up because I had encountered a build.ant file somewhere, though. But if so, that must have been in way back ages…
I checked with the Apache ANT documentation and I didn't find it mentioned there. Neither does ANT recognise a build.ant file as build file. On command-line execution of

Code: Select all

ant
in the directory of a build.ant file ANT will complain that there is no build.xml present…

The file-icon makes me wonder though…
Is there a possibility to associate this icon with build.xml files that are ant files?

Re: FEATURE REQUEST: .ant file and framework association

Posted: Fri Nov 24, 2017 4:42 pm
by Radu
Hi,

Somehow when we enhanced the ANT support in Oxygen we added to the Preferences-"File Types" page a mapping between the "ant" extension and the "ANT Editor". We probably should not have done this, anyway the name of the build file is not that important, but by default the "ant" process assumes it is "build.xml".
What Oxygen version are you using? I started testing with Oxygen 19.1, working with files called "build.ant" and both the validation and content completion work for me.

Regards,
Radu

Re: FEATURE REQUEST: .ant file and framework association

Posted: Mon Nov 27, 2017 1:48 pm
by bwbohl
Hi Radu,

I'm using oXygen 18.1 on macOS Sierra, see signature ;-)

atb
Benjamin