Bug 574127 - ANT View shows hidden target from included build file that is overwritten
Summary: ANT View shows hidden target from included build file that is overwritten
Status: NEW
Alias: None
Product: Platform
Classification: Eclipse Project
Component: Ant (show other bugs)
Version: 4.19   Edit
Hardware: PC Windows 10
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Platform-Ant-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-06-10 07:46 EDT by M H CLA
Modified: 2021-06-14 06:55 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description M H CLA 2021-06-10 07:46:58 EDT
The function "Hide internal targets" in the ANT view basically works, i.e. all targets beginning with a "-" character are hidden.

This also works with hidden targets that exist in another ANT file that is "imported" from the project ANT file.

But it doesn't work if such a target is "overwritten" in the project ANT file. Example:

ANT_include.xml:

<target name="-setClasspath"> .... </target>


Project_build.xml:

<import file="../ANT_include.xml"/> 
<target name="-setClasspath"> .... </target>


So the target is basically "overwritten". The reason is, that ANT_include.xml has lots of targets that are dependen on this "-setClasspath" target, but the concrete implementation of teh target is done in the project ANT files (that include ANT_include.xml). So the same target name needs to be in ANT_include.xml and teh concrete project ANT file.

The Eclipse ANT view now shows 

"include.-setClasspath [from import ../ANT_include.xml]"

even though this (these) targets are hidden!
Comment 1 Sarika Sinha CLA 2021-06-14 06:55:07 EDT
Cannot prioritize this with other commitments around but 
If someone can provide a quality patch for the fix, we can look at it.