mirror of
https://github.com/godotengine/godot.git
synced 2025-10-19 16:03:29 +00:00
Merge pull request #96693 from HolonProduction/annotation-arg-hint
Autocompletion: Add arghint for annotations
This commit is contained in:
commit
0b2446101c
2 changed files with 14 additions and 7 deletions
|
@ -864,7 +864,8 @@ static void _get_directory_contents(EditorFileSystemDirectory *p_dir, HashMap<St
|
|||
}
|
||||
}
|
||||
|
||||
static void _find_annotation_arguments(const GDScriptParser::AnnotationNode *p_annotation, int p_argument, const String p_quote_style, HashMap<String, ScriptLanguage::CodeCompletionOption> &r_result) {
|
||||
static void _find_annotation_arguments(const GDScriptParser::AnnotationNode *p_annotation, int p_argument, const String p_quote_style, HashMap<String, ScriptLanguage::CodeCompletionOption> &r_result, String &r_arghint) {
|
||||
r_arghint = _make_arguments_hint(p_annotation->info->info, p_argument, true);
|
||||
if (p_annotation->name == SNAME("@export_range")) {
|
||||
if (p_argument == 3 || p_argument == 4 || p_argument == 5) {
|
||||
// Slider hint.
|
||||
|
@ -3186,7 +3187,7 @@ static void _find_call_arguments(GDScriptParser::CompletionContext &p_context, c
|
|||
break;
|
||||
}
|
||||
const GDScriptParser::AnnotationNode *annotation = static_cast<const GDScriptParser::AnnotationNode *>(completion_context.node);
|
||||
_find_annotation_arguments(annotation, completion_context.current_argument, quote_style, options);
|
||||
_find_annotation_arguments(annotation, completion_context.current_argument, quote_style, options, r_call_hint);
|
||||
r_forced = true;
|
||||
} break;
|
||||
case GDScriptParser::COMPLETION_BUILT_IN_TYPE_CONSTANT_OR_STATIC_METHOD: {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue