mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-12 21:17:32 +00:00
Fixed HoverInfo not being created for method declarations (as MethodInfo was never assigned to mark creation)
This commit is contained in:
1 parent
25800e9c3d
commit
50165677c7
1 file changed
+12
-2
@@ -1267,10 +1267,20 @@ public class ScriptDocument {
|
||||
continue;
|
||||
}
|
||||
|
||||
// Find the corresponding MethodInfo created in parseMethodDeclarations
|
||||
int methodDeclStart = m.start();
|
||||
MethodInfo methodInfo = null;
|
||||
for (MethodInfo method : methods) {
|
||||
if (method.getDeclarationOffset() == methodDeclStart) {
|
||||
methodInfo = method;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// Return type
|
||||
marks.add(new ScriptLine.Mark(m.start(1), m.end(1), TokenType.TYPE_DECL));
|
||||
// Method name
|
||||
marks.add(new ScriptLine.Mark(m.start(2), m.end(2), TokenType.METHOD_DECL));
|
||||
// Method name with MethodInfo metadata
|
||||
marks.add(new ScriptLine.Mark(m.start(2), m.end(2), TokenType.METHOD_DECL, methodInfo));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user