mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-13 05:27:37 +00:00
Checked static context
This commit is contained in:
1 parent
3172e6673f
commit
f0770fb7fc
1 file changed
+11
-3
+11
-3
@@ -137,8 +137,12 @@ public class JavaAutocompleteProvider implements AutocompleteProvider {
|
||||
}
|
||||
}
|
||||
|
||||
for (MethodInfo method : receiverType.syntheticMethods)
|
||||
for (MethodInfo method : receiverType.syntheticMethods) {
|
||||
if (isStaticContext && !Modifier.isStatic(method.getModifiers()))
|
||||
continue;
|
||||
|
||||
items.add(AutocompleteItem.fromMethod(method, context.methodsOnly));
|
||||
}
|
||||
|
||||
// Add fields (skip if methodsOnly is true - but the filtering will be done in getSuggestions)
|
||||
if (!context.methodsOnly) {
|
||||
@@ -154,8 +158,12 @@ public class JavaAutocompleteProvider implements AutocompleteProvider {
|
||||
}
|
||||
}
|
||||
|
||||
for (FieldInfo field : receiverType.syntheticFields)
|
||||
items.add(AutocompleteItem.fromField(field));
|
||||
for (FieldInfo field : receiverType.syntheticFields) {
|
||||
if (isStaticContext && !Modifier.isStatic(field.getModifiers()))
|
||||
continue;
|
||||
|
||||
items.add(AutocompleteItem.fromField(field));
|
||||
}
|
||||
}
|
||||
|
||||
// Add nested types (inner classes/interfaces) in static context
|
||||
|
||||
Reference in new issue
Block a user