Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » Java Development Tools (JDT) » Resolving bindings in createAST
Resolving bindings in createAST [message #258117] Thu, 15 January 2009 23:47 Go to next message
Joel Ossher is currently offline Joel OssherFriend
Messages: 3
Registered: July 2009
Junior Member
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 23:54 Go to previous messageGo to next message
Joel Ossher is currently offline Joel OssherFriend
Messages: 3
Registered: July 2009
Junior Member
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] Fri, 16 January 2009 01:57 Go to previous messageGo to next message
Olivier Thomann is currently offline Olivier ThomannFriend
Messages: 518
Registered: July 2009
Senior Member
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] Tue, 20 January 2009 00:48 Go to previous messageGo to next message
Joel Ossher is currently offline Joel OssherFriend
Messages: 3
Registered: July 2009
Junior Member
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] Tue, 20 January 2009 01:52 Go to previous message
Olivier Thomann is currently offline Olivier ThomannFriend
Messages: 518
Registered: July 2009
Senior Member
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: Fri Apr 19 20:22:51 GMT 2024

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

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

Back to the top