mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-12 21:17:32 +00:00
syntheticMethods Autocomplete logic needed for ObjectLiterals and InnerCallableScopes proper functioning
This commit is contained in:
1 parent
70510cf224
commit
8b00733ddf
1 file changed
+7
-4
+7
-4
@@ -114,16 +114,19 @@ public class JSAutocompleteProvider extends JavaAutocompleteProvider {
|
||||
return;
|
||||
}
|
||||
|
||||
Set<String> syntheticMethodNames = new HashSet<>();
|
||||
for (MethodInfo method : receiverType.getSyntheticMethods()) {
|
||||
syntheticMethodNames.add(method.getName());
|
||||
if (isStaticContext && !method.isStatic()) continue;
|
||||
items.add(AutocompleteItem.fromMethod(method, context.methodsOnly));
|
||||
}
|
||||
for (FieldInfo field : receiverType.getSyntheticFields()) {
|
||||
if (!context.methodsOnly) {
|
||||
if (isStaticContext && !field.isStatic()) continue;
|
||||
if (syntheticMethodNames.contains(field.getName())) continue;
|
||||
items.add(AutocompleteItem.fromField(field));
|
||||
}
|
||||
}
|
||||
for (MethodInfo method : receiverType.getSyntheticMethods()) {
|
||||
if (isStaticContext && !method.isStatic()) continue;
|
||||
items.add(AutocompleteItem.fromMethod(method, context.methodsOnly));
|
||||
}
|
||||
|
||||
JSTypeInfo jsTypeInfo = receiverType.getJSTypeInfo();
|
||||
if (jsTypeInfo != null) {
|
||||
|
||||
Reference in new issue
Block a user