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

Bug 324625

Summary: Ant editor does not support the "extension-point" feature
Product: [Eclipse Project] Platform Reporter: Andrey Pavlenko <andrey.a.pavlenko>
Component: AntAssignee: Satyam Kandula <satyam.kandula>
Status: VERIFIED FIXED QA Contact:
Severity: enhancement    
Priority: P3 CC: arcolf, daniel_megert, Michael_Rennie, niels, satyam.kandula
Version: 3.7Flags: Michael_Rennie: review+
Target Milestone: 3.8 M2   
Hardware: PC   
OS: Windows 7   
Whiteboard: readme
Bug Depends on: 302296    
Bug Blocks:    
Attachments:
Description Flags
Patch for ant1.6.2.dtd
none
A patch
none
Proposed patch + regression test
none
Proposed patch + regression test none

Description Andrey Pavlenko CLA 2010-09-07 04:21:01 EDT
Build Identifier: 3.6.0

The Ant Editor does not support the "extension-point" feature, introduced in Ant 1.8. This functionality is required for Ant 1.8.* and Eclipse integration (https://bugs.eclipse.org/bugs/show_bug.cgi?id=302296).

Reproducible: Always

Steps to Reproduce:
1. Install org.apache.ant_1.8.1.zip from https://bugs.eclipse.org/bugs/show_bug.cgi?id=302296
2. Execute the following build script:

<project default="ep-B">

    <target name="A" />

    <extension-point name="ep-B" depends="A" />

    <target name="B" extensionOf="ep-B" depends="D" />

    <target name="C" depends="ep-B" />

    <target name="D" />

</project>
Comment 1 Andrey Pavlenko CLA 2010-09-07 04:27:27 EDT
Created attachment 178301 [details]
Patch for ant1.6.2.dtd

This patch covers the content assist related issue.
Comment 2 Satyam Kandula CLA 2011-07-28 12:29:37 EDT
Created attachment 200545 [details]
A patch

Michael, Please look at the patch and give me your comments.
Comment 3 Satyam Kandula CLA 2011-08-01 07:42:04 EDT
Created attachment 200651 [details]
Proposed patch + regression test

This patch also fixes Shift+F2 on extension-point also. 
Also note that both this patch and the patch in comment 2 are on top of the patch given in comment 1. 

With this patch, I think the only left over now is having a template for extension-point.
Comment 4 Michael Rennie CLA 2011-08-02 11:12:51 EDT
The patch works nicely. The only issue I found was that you do not get a completion proposal for "extension-point" when you activate content assist on a blank line.

Consider the following example:

<?xml version="1.0" encoding="UTF-8"?>
<project name="project" default="default">
    <description>
            test project
    </description>
  
    <target name="default" description="test target">
    </target>
</project>

Steps
1. place the caret on line 6 (the blank line)
2. do not type anything
3. activate content assist
4. start typing extension-point

I would expect one of the proposals to be 'extension-point'.
Comment 5 Satyam Kandula CLA 2011-08-02 12:03:11 EDT
(In reply to comment #4)
Mike, nice-catch. I will update a new patch shortly.
Comment 6 Satyam Kandula CLA 2011-08-02 12:13:17 EDT
Created attachment 200745 [details]
Proposed patch + regression test

Updated the fix to support getting the extension-point in the content-assist.
Comment 7 Michael Rennie CLA 2011-08-08 12:02:23 EDT
Works perfectly. Applied to HEAD.
Comment 8 Michael Rennie CLA 2011-08-08 12:02:36 EDT
verified.
Comment 9 Satyam Kandula CLA 2011-09-29 22:14:21 EDT
*** Bug 359456 has been marked as a duplicate of this bug. ***