ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael Rennie <Michael_Ren...@ca.ibm.com>
Subject Re: DO NOT REPLY [Bug 49659] [regression] Project.getReference(key) no longer returns certain references
Date Wed, 15 Dec 2010 18:43:53 GMT

Antoine Levy-Lambert <antoine@gmx.de> wrote on 2010/12/15 10:59:35 AM:

>
> My guess is that in ant 1.8.x it is only legal to use references which
> have already been defined at execution time.
>
> So the eclipse integration would need to execute the build to find which
> references are legally usable in a given target.

This would not work for Eclipse.

Given a snippet like:

<project default="1">
      <path id="project.class.path">
            <pathelement location="lib/" />
            <pathelement path="${java.class.path}/" />
            <pathelement path="${additional.path}" />
      </path>

      <target name="1">
            <path id="project.class.path2">
                  <path refid="project.class.path" />
            </path>
      </target>
</project>

Prior to Ant 1.8.x we could successfully look up project.class.path and
project.class.path2 without having to execute anything,
which would allow us to show variable pop-ups, provide content assist, etc.
Executing the build file after each save, each invocation of content
assist,
each value hover, each edit is not realistic.

>
> Maybe the eclipse platform integration would need a special executor
> which would only execute type definitions. It would not work 100%
> because a task can create an instance of a fileset and assign it a refid
> and this executor would not run the task.

We could definitely look into it.

>
> Or maybe the better option is to say that it is impossible to predict
> which refids will be legal in a given target and do not show lists of
> possible choices ?

This could lead to a loss of functionality in the Eclipse Ant editor that
we would like to avoid.

>
> Regards,
>
> Antoine
>

Perhaps there is just a newer code path I am not aware of to look up
UnknownElements by their id?

Thanks,
Michael Rennie
Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message