You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-06 12:20:30 +00:00
New Code Completion
-=-=-=-=-=-=-=-=-=- -Massive improvement to code completion -Argument hinting for functions If you manage to out-smart the code-completion in a situation where completion should be possible to guess, let me know. Please enter the commit message for your changes. Lines starting
This commit is contained in:
@@ -487,6 +487,7 @@ FindReplaceDialog::FindReplaceDialog() {
|
||||
|
||||
vb->add_child(error_label);
|
||||
|
||||
|
||||
set_hide_on_ok(false);
|
||||
|
||||
}
|
||||
@@ -507,15 +508,19 @@ void CodeTextEditor::_text_changed() {
|
||||
}
|
||||
|
||||
void CodeTextEditor::_code_complete_timer_timeout() {
|
||||
if (!is_visible())
|
||||
return;
|
||||
if (enable_complete_timer)
|
||||
text_editor->query_code_comple();
|
||||
}
|
||||
|
||||
void CodeTextEditor::_complete_request(const String& p_request, int p_line) {
|
||||
void CodeTextEditor::_complete_request() {
|
||||
|
||||
List<String> entries;
|
||||
_code_complete_script(text_editor->get_text(),p_request,p_line,&entries);
|
||||
_code_complete_script(text_editor->get_text_for_completion(),&entries);
|
||||
// print_line("COMPLETE: "+p_request);
|
||||
if (entries.size()==0)
|
||||
return;
|
||||
Vector<String> strs;
|
||||
strs.resize(entries.size());
|
||||
int i=0;
|
||||
@@ -555,7 +560,7 @@ void CodeTextEditor::_on_settings_change() {
|
||||
|
||||
// AUTO BRACE COMPLETION
|
||||
text_editor->set_auto_brace_completion(
|
||||
EDITOR_DEF("text_editor/auto_brace_complete", false)
|
||||
EDITOR_DEF("text_editor/auto_brace_complete", true)
|
||||
);
|
||||
|
||||
code_complete_timer->set_wait_time(
|
||||
@@ -632,6 +637,8 @@ CodeTextEditor::CodeTextEditor() {
|
||||
text_editor->connect("request_completion", this,"_complete_request");
|
||||
Vector<String> cs;
|
||||
cs.push_back(".");
|
||||
cs.push_back(",");
|
||||
cs.push_back("(");
|
||||
text_editor->set_completion(true,cs);
|
||||
idle->connect("timeout", this,"_text_changed_idle_timeout");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user