Skip to content

Commit

Permalink
Fix testTypeDeclaration12 and others
Browse files Browse the repository at this point in the history
Signed-off-by: Rob Stryker <stryker@redhat.com>
  • Loading branch information
Rob Stryker committed Dec 2, 2024
1 parent 9f6f4cc commit d0be67c
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,13 @@ public IJavaElement getJavaElement() {
return type.getType("", 1);
}
}

if( this.typeSymbol.owner instanceof MethodSymbol) {
if (getDeclaringMethod() != null && getDeclaringMethod().getJavaElement() instanceof IMethod method) {
// TODO find proper occurenceCount (eg checking the source range)
return method.getType(this.typeSymbol.name.toString(), 1);
}
}

JavaFileObject jfo = classSymbol == null ? null : classSymbol.sourcefile;
ITypeRoot typeRoot = null;
if (jfo != null) {
Expand Down

0 comments on commit d0be67c

Please sign in to comment.