Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » Java Development Tools (JDT) » No ITypeBinding found for TypeDeclaration
No ITypeBinding found for TypeDeclaration [message #1844975] Fri, 01 October 2021 12:02 Go to next message
Kanak Das is currently offline Kanak DasFriend
Messages: 1
Registered: October 2021
Junior Member
I was trying to get ITypeBinding of AdvancedPreferences class in the following file using eclipse JDT(core version 3.23).

https://github.com/adblockplus/adblockplusandroid/blob/master/src/org/adblockplus/android/AdvancedPreferences.java#L48

The TypeDeclaration of this class is found from CompilationUnit. But when I tried to get type bindings for the TypeDeclaration, null is returned.

I am using the following snippet to fetch binding.

ITypeBinding binding = typeDec.resolveBinding();

Is there any particular reason why ITypeBinding can be returned null in the above case?
Re: No ITypeBinding found for TypeDeclaration [message #1845059 is a reply to message #1844975] Tue, 05 October 2021 05:05 Go to previous message
Jay Arthanareeswaran is currently offline Jay ArthanareeswaranFriend
Messages: 128
Registered: July 2009
Senior Member
The Javadoc for resolveBinding() has this:
* Note that bindings are generally unavailable unless requested when the
* AST is being built.

Can you tell us how you are building the AST?
Previous Topic:Create an update site from JDT
Next Topic:Eclipse 2021-06: BW system mapping file
Goto Forum:
  


Current Time: Thu Apr 25 17:48:51 GMT 2024

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

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

Back to the top