Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 72598

Summary: "*.ant" file association does not provide syntax coloring
Product: [Eclipse Project] Platform Reporter: Darin Swanson <Darin_Swanson>
Component: AntAssignee: Jared Burns <jared_burns>
Status: VERIFIED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: kai-uwe_maetzel, oimoim
Version: 3.0   
Target Milestone: 3.1 M3   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description Darin Swanson CLA 2004-08-25 11:04:43 EDT
If a file association is set up for *.ant files with the Ant editor everything 
appears to work correctly EXCEPT that you get no syntax coloring.
Comment 1 Darin Swanson CLA 2004-08-25 16:11:19 EDT
Ant document setup is only applied to files that have Ant buildfile content 
(which is only determined for .xml files) or those extensions that are 
specifically registered in the ant ui plugin.xml. This is a friend of bug 
64707.

What meaning does it have for a user to specify an extension to be associated 
with an editor if the document setup participants are not applied? Is there 
something better the Ant integration is missing here?
Comment 2 Kai-Uwe Maetzel CLA 2004-08-26 04:41:37 EDT
No, this is a real problem. (Stated as one of our major cross team issues.) 
With the advances in content types we will run into this kind of problem more 
and more. Editors in general are actually designed for documents/files of a 
particular content types or a set of content types. As there used to be no 
notion of content type in eclipse, the file extension to editor mapping was 
introduced. Now that eclise knows content types, we have more and more 
extension that are registered per content type. As soon as the user defines a 
new file extension to edtior (or whatsoever) mapping, which does not overlap 
with built-in knowledge of file extension to content type mapping, all those 
extensions will not be installed. Unfortunately, Darin, right now there is not 
much what you can do to solve the problem at your end.
Comment 3 Darin Swanson CLA 2004-09-16 08:19:06 EDT
*** Bug 74045 has been marked as a duplicate of this bug. ***
Comment 4 Darin Swanson CLA 2004-09-16 11:45:44 EDT
As a workaround you can add "ant" as an extension in the extension points for 
documentCreation and documentSetup in the plugin.xml for the 
org.eclipse.ant.ui plugin. Restart eclipse using -clean to pick up the changes.

I am going to add this extension as several users seem to use it.
Comment 5 Darin Swanson CLA 2004-10-21 15:24:39 EDT
Kai has provided a workaround
Comment 6 Darin Swanson CLA 2004-10-22 14:02:26 EDT
Fixed in the AntEditorDocumentProvider.createFileInfo

Left a TODO to find if the underlying support is fixed to handle these cases.
Comment 7 Darin Swanson CLA 2004-10-22 14:02:43 EDT
Please verify Jared.
Comment 8 Darin Swanson CLA 2004-10-22 14:03:29 EDT
Note that *.ant is not the required test case as this extension has been added 
to the Ant Ui doc extensions. I used *.kai :-)
Comment 9 Jared Burns CLA 2004-10-25 20:22:45 EDT
Verified.