Skip to main content



      Home
Home » Language IDEs » Java Development Tools (JDT) » Resolving bindings in createAST
Resolving bindings in createAST [message #258117] Thu, 15 January 2009 18:47 Go to next message
Eclipse UserFriend
Hello,

I'm trying to use the Eclipse JDT to perform some dependency analysis on
programs where all the dependencies cannot be resolved.

I've been using ASTParser with the
Re: Resolving bindings in createAST [message #258121 is a reply to message #258117] Thu, 15 January 2009 18:54 Go to previous messageGo to next message
Eclipse UserFriend
Well, accidentally posted the message before it was complete and I can't
figure out how to edit it, so here's the proper version.

Hello,

I'm trying to use the Eclipse JDT to perform some dependency analysis on
programs where all the dependencies cannot be resolved.

I've been using ASTParser's createAST with setStatementsRecovery,
setResolveBindings and setBindingsRecovery all set to true. This work
great most of the time, except that I've found one case in which the
ASTParser just gives up and does not resolve any of the bindings even
partially.

This occurs when there is a jar file referenced by the file that has a
missing dependency, and you get the error "Pb(324) The type XXXX cannot be
resolved. It is indirectly referenced from required .class files."

I was wondering if there was any way to force the ASTParser to resolve as
many of the bindings as it can even in the face of this error. I tried
setting the compiler options CORE_JAVA_BUILD_INVALID_CLASSPATH and
CORE_INCOMPLETE_CLASSPATH, but that had no effect.

Thanks!
Re: Resolving bindings in createAST [message #258125 is a reply to message #258121] Thu, 15 January 2009 20:57 Go to previous messageGo to next message
Eclipse UserFriend
Joel Ossher a écrit :
> I've been using ASTParser's createAST with setStatementsRecovery,
> setResolveBindings and setBindingsRecovery all set to true. This work
> great most of the time, except that I've found one case in which the
> ASTParser just gives up and does not resolve any of the bindings even
> partially.
>
> This occurs when there is a jar file referenced by the file that has a
> missing dependency, and you get the error "Pb(324) The type XXXX cannot
> be resolved. It is indirectly referenced from required .class files."
>
> I was wondering if there was any way to force the ASTParser to resolve
> as many of the bindings as it can even in the face of this error. I
> tried setting the compiler options CORE_JAVA_BUILD_INVALID_CLASSPATH and
> CORE_INCOMPLETE_CLASSPATH, but that had no effect.
Did you set up a java project ?
Even if you setResolveBindings to true, you need to provide a context
for the binding resolution.
--
Olivier
Re: Resolving bindings in createAST [message #258182 is a reply to message #258125] Mon, 19 January 2009 19:48 Go to previous messageGo to next message
Eclipse UserFriend
Olivier Thomann wrote:

> Joel Ossher a écrit :
> Did you set up a java project ?
> Even if you setResolveBindings to true, you need to provide a context
> for the binding resolution.
> --
> Olivier
Yup, the project is properly set up as a Java one. Everything works great
with binding resolution, except in the case that a jar on the classpath is
itself missing a dependency. Then the binding resolution just terminates,
rather than doing a best-effort attempt.

I'm looking to see if there is a way to change this behavior, so that an
attempt is made even under the existence of this error.

-Joel
Re: Resolving bindings in createAST [message #258186 is a reply to message #258182] Mon, 19 January 2009 20:52 Go to previous message
Eclipse UserFriend
Joel Ossher a écrit :
> Yup, the project is properly set up as a Java one. Everything works
> great with binding resolution, except in the case that a jar on the
> classpath is itself missing a dependency. Then the binding resolution
> just terminates, rather than doing a best-effort attempt.
Please open a bug report against JDT/core with complete steps to
reproduce. Provide build id, examples, expected results and current results.

Thanks,

Olivier
Previous Topic:programatically cascade refactorings
Next Topic:Follow up on Java 6 blog on in.relation.to about Java 6 processors
Goto Forum:
  


Current Time: Sun Apr 20 03:48:55 EDT 2025

Powered by FUDForum. Page generated in 0.04564 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top