Community
Participate
Working Groups
The problem is that the String keys returned by ITypeBinding.getKey don't seem to include the name of the outer class. This generally is not a problem, except in the case that we have multiple classes with the same name in the same package. In the TestClassesWithSameName project, we have a normal class Test, along with several nested classes called Test, yet they all have the same key. I've included a testKeys project which is designed to be run as a plugin project, with TestClassesWithSameName in the run-time workspace.
Created attachment 9914 [details] testKeys plugin project
Created attachment 9915 [details] TestClassesWithSameName
I think replacing getName() with this.binding.constantPoolName() in the getKey() of a TypeBinding would fix it.
Using the constant pool name, it returns: test0545/First$Test test0545/Second$Test test0545/Third$Test test0545/Test I think this is the expected answer according to the comment on IBinding.getKey().
Fixed and released in HEAD. Regression test added.
Verified for 3.0M9