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

Bug 174759

Summary: ant editor breaks on imported build files
Product: [Eclipse Project] Platform Reporter: Wolfram Kroll <kroll>
Component: AntAssignee: Michael Rennie <Michael_Rennie>
Status: VERIFIED FIXED QA Contact:
Severity: major    
Priority: P3 CC: anthonychen, Darin_Swanson, davidcorley, Davy.Toch, markrubbish, zdenek.ziegler
Version: 3.2.1   
Target Milestone: 3.3 M6   
Hardware: PC   
OS: All   
Whiteboard:

Description Wolfram Kroll CLA 2007-02-20 07:33:51 EST
Since 3.2.1 the Ant editor has a problem with import statements in ant build files. Eclipse versions affected:
- 3.2.1
- 3.2.2
- 3.3M4
- 3.3M5

tested on Linux GTK x86 32bit and Windows XP 32bit.

build.xml:
<?xml version="1.0" encoding="UTF-8"?>
<project name="ant-editor-bug">
	<import file="imported.xml"/>
</project>

imported.xml:
<?xml version="1.0" encoding="UTF-8"?>
<project name="imported">
	<target name="t"/>
</project>

I open build.xml in the ant editor. The outline shows:
- ant-editor-bug
  |
  +- import imported.xml
  |
  +- t [from import imported.xml]

The I change some whitespace in the build.xml. I wait for a second. Then, the outline shows:

- ant-editor-bug
  |
  +- import imported.xml [from null]
  |
  +- t [from import imported.xml [from null]]

Furthermore,
- it is now impossible to navigate using the outline,
- the editor does not auto-indent.
Comment 1 Wolfram Kroll CLA 2007-02-20 07:36:38 EST
Raising severity: because of this bug I am unable to edit all (our) ant build scripts with imports.
Comment 2 Darin Swanson CLA 2007-02-20 10:33:31 EST
Investigate for 3.3
Comment 3 Darin Swanson CLA 2007-02-27 08:41:06 EST
This problem was introduced with the fix for bug 143008.
We are reusing the ProjectHelper but not ensuring that the buildfile is set (or reset) after parsing an imported file.

Fixed in AntModel to reset the buildfile for the ProjectHelper.
Comment 4 Darin Swanson CLA 2007-02-27 08:41:41 EST
Please verify Michael.
Comment 5 Darin Swanson CLA 2007-02-27 10:07:20 EST
*** Bug 161377 has been marked as a duplicate of this bug. ***
Comment 6 Darin Swanson CLA 2007-03-16 16:38:29 EDT
*** Bug 165559 has been marked as a duplicate of this bug. ***
Comment 7 Darin Swanson CLA 2007-04-23 16:10:32 EDT
*** Bug 179154 has been marked as a duplicate of this bug. ***
Comment 8 Darin Swanson CLA 2007-06-01 11:50:10 EDT
*** Bug 190444 has been marked as a duplicate of this bug. ***
Comment 9 Michael Rennie CLA 2007-08-30 17:10:21 EDT
verified