mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-12 22:27:32 +00:00
Retrieved true containing type of method calls in hover info (handled inheritance case)
This commit is contained in:
1 parent
7b77c1935f
commit
275a5f10c9
1 file changed
+7
@@ -621,6 +621,13 @@ public class TokenHoverInfo {
|
||||
TypeInfo containingType = null;
|
||||
if (callInfo != null) {
|
||||
containingType = callInfo.getReceiverType();
|
||||
|
||||
//Checks true containing type from resolved method (handles inheritance cases)
|
||||
if (callInfo.getResolvedMethod() != null) {
|
||||
TypeInfo trueContainingType = callInfo.getResolvedMethod().getContainingType();
|
||||
if (trueContainingType != null)
|
||||
containingType = trueContainingType;
|
||||
}
|
||||
}
|
||||
if (containingType == null && methodInfo != null) {
|
||||
containingType = methodInfo.getContainingType();
|
||||
|
||||
Reference in new issue
Block a user