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

Bug 359456

Summary: Ant Editor does not recognize extension points as valid targets
Product: [Eclipse Project] Platform Reporter: Wolfgang Gruber <arcolf>
Component: AntAssignee: Platform-Ant-Inbox <platform-ant-inbox>
Status: RESOLVED DUPLICATE QA Contact:
Severity: normal    
Priority: P3 CC: satyam.kandula
Version: 3.7.1   
Target Milestone: 3.8 M2   
Hardware: PC   
OS: Windows 7   
Whiteboard:

Description Wolfgang Gruber CLA 2011-09-29 13:14:38 EDT
Overview:

Ant has an extension point system which allows to define extension-points and add targets to these extension-points. See https://ant.apache.org/manual/targets.html#extension-points for a detailed description.

The ant editor in Eclipse does not recognize the extension-point as valid target name if you add it to the dependencies of a target (depends="extensionPointName"). It marks the line as erroneous.

Steps to Reproduce: 

1. Create a build.xml

2. Add the following content:

<?xml version="1.0" encoding="UTF-8"?>
<project name="bug">
	
	<target name="run" depends="extPoint">
		<echo message="doing work" />
	</target>
	
	<extension-point name="extPoint" />
	
	<target name="useExtPoint_1" extensionOf="extPoint">
		<echo message="Ext Point called" />
	</target>
	
	<target name="useExtPoint_2" extensionOf="extPoint">
		<echo message="Ext Point called" />
	</target>
</project>

4. Open the build.xml with the ant editor

Actual Results:

The ant editor marks the line with "<target name="run" [..]" as erroneous. The error message is "Target extPoint does not exist in this project"

Expected Results:

The line should not be marked as erroneous because extPoint is an extension point and valid in the depends-attribute. If you run the run-target, it works as expected and calls the targets of the extension point.
Comment 1 Satyam Kandula CLA 2011-09-29 22:14:21 EDT
This has been fixed in 3.8M2.

*** This bug has been marked as a duplicate of bug 324625 ***