You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-07 12:30:27 +00:00
Merge pull request #85196 from HolonProduction/completion-filter-groups
Filter groups and categories from autocompletion
This commit is contained in:
@@ -1083,6 +1083,12 @@ static void _find_identifiers_in_base(const GDScriptCompletionIdentifier &p_base
|
|||||||
List<PropertyInfo> members;
|
List<PropertyInfo> members;
|
||||||
scr->get_script_property_list(&members);
|
scr->get_script_property_list(&members);
|
||||||
for (const PropertyInfo &E : members) {
|
for (const PropertyInfo &E : members) {
|
||||||
|
if (E.usage & (PROPERTY_USAGE_CATEGORY | PROPERTY_USAGE_GROUP | PROPERTY_USAGE_SUBGROUP)) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
if (E.name.contains("/")) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
int location = p_recursion_depth + _get_property_location(scr->get_class_name(), E.name);
|
int location = p_recursion_depth + _get_property_location(scr->get_class_name(), E.name);
|
||||||
ScriptLanguage::CodeCompletionOption option(E.name, ScriptLanguage::CODE_COMPLETION_KIND_MEMBER, location);
|
ScriptLanguage::CodeCompletionOption option(E.name, ScriptLanguage::CODE_COMPLETION_KIND_MEMBER, location);
|
||||||
r_result.insert(option.display, option);
|
r_result.insert(option.display, option);
|
||||||
@@ -1152,7 +1158,7 @@ static void _find_identifiers_in_base(const GDScriptCompletionIdentifier &p_base
|
|||||||
List<PropertyInfo> pinfo;
|
List<PropertyInfo> pinfo;
|
||||||
ClassDB::get_property_list(type, &pinfo);
|
ClassDB::get_property_list(type, &pinfo);
|
||||||
for (const PropertyInfo &E : pinfo) {
|
for (const PropertyInfo &E : pinfo) {
|
||||||
if (E.usage & (PROPERTY_USAGE_GROUP | PROPERTY_USAGE_CATEGORY)) {
|
if (E.usage & (PROPERTY_USAGE_CATEGORY | PROPERTY_USAGE_GROUP | PROPERTY_USAGE_SUBGROUP)) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if (E.name.contains("/")) {
|
if (E.name.contains("/")) {
|
||||||
@@ -1213,6 +1219,9 @@ static void _find_identifiers_in_base(const GDScriptCompletionIdentifier &p_base
|
|||||||
}
|
}
|
||||||
|
|
||||||
for (const PropertyInfo &E : members) {
|
for (const PropertyInfo &E : members) {
|
||||||
|
if (E.usage & (PROPERTY_USAGE_CATEGORY | PROPERTY_USAGE_GROUP | PROPERTY_USAGE_SUBGROUP)) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
if (!String(E.name).contains("/")) {
|
if (!String(E.name).contains("/")) {
|
||||||
ScriptLanguage::CodeCompletionOption option(E.name, ScriptLanguage::CODE_COMPLETION_KIND_MEMBER);
|
ScriptLanguage::CodeCompletionOption option(E.name, ScriptLanguage::CODE_COMPLETION_KIND_MEMBER);
|
||||||
if (GDScriptParser::theme_color_names.has(E.name)) {
|
if (GDScriptParser::theme_color_names.has(E.name)) {
|
||||||
|
|||||||
Reference in New Issue
Block a user