Community
Participate
Working Groups
20020917 A ITypeBinding can be asked if it is from source (isFromSource). I now need to find this source file. It is possible to do this using IJavaProject and search for the type. However, as the compiler already knows the path, it would be convenient if a method 'getSourceFilePath' would exist.
API question should be sent to Jim.
A binding doesn't remember where it came from. A source lookup action need to be perfomed using existing JavaModel API: IJavaProject#findType(String packageName, String typeQualifiedName) throws JavaModelException; Isn't this enough ?
That's how I do it, it works. I was thinking the binding would know the source location (it knows that it's from source), so we could avoid eventual problems with findType not finding a non public top level typ.
As I said, the binding doesn't keep this information. Ok to close?
closing