diff options
Diffstat (limited to 'editor/plugins')
-rw-r--r-- | editor/plugins/script_editor_plugin.cpp | 12 | ||||
-rw-r--r-- | editor/plugins/script_text_editor.cpp | 20 | ||||
-rw-r--r-- | editor/plugins/script_text_editor.h | 4 | ||||
-rw-r--r-- | editor/plugins/shader_editor_plugin.cpp | 2 | ||||
-rw-r--r-- | editor/plugins/shader_editor_plugin.h | 2 |
5 files changed, 21 insertions, 19 deletions
diff --git a/editor/plugins/script_editor_plugin.cpp b/editor/plugins/script_editor_plugin.cpp index 2da5978fab..bbaf2bef98 100644 --- a/editor/plugins/script_editor_plugin.cpp +++ b/editor/plugins/script_editor_plugin.cpp @@ -1348,7 +1348,7 @@ void ScriptEditor::_menu_option(int p_option) { } if (script != nullptr) { - const Vector<DocData::ClassDoc> &documentations = script->get_documentation(); + Vector<DocData::ClassDoc> documentations = script->get_documentation(); for (int j = 0; j < documentations.size(); j++) { const DocData::ClassDoc &doc = documentations.get(j); if (EditorHelp::get_doc_data()->has_doc(doc.name)) { @@ -1361,7 +1361,7 @@ void ScriptEditor::_menu_option(int p_option) { EditorNode::get_singleton()->save_resource_as(resource); if (script != nullptr) { - const Vector<DocData::ClassDoc> &documentations = script->get_documentation(); + Vector<DocData::ClassDoc> documentations = script->get_documentation(); for (int j = 0; j < documentations.size(); j++) { const DocData::ClassDoc &doc = documentations.get(j); EditorHelp::get_doc_data()->add_doc(doc); @@ -2464,7 +2464,7 @@ void ScriptEditor::save_current_script() { } if (script != nullptr) { - const Vector<DocData::ClassDoc> &documentations = script->get_documentation(); + Vector<DocData::ClassDoc> documentations = script->get_documentation(); for (int j = 0; j < documentations.size(); j++) { const DocData::ClassDoc &doc = documentations.get(j); if (EditorHelp::get_doc_data()->has_doc(doc.name)) { @@ -2486,7 +2486,7 @@ void ScriptEditor::save_current_script() { } if (script != nullptr) { - const Vector<DocData::ClassDoc> &documentations = script->get_documentation(); + Vector<DocData::ClassDoc> documentations = script->get_documentation(); for (int j = 0; j < documentations.size(); j++) { const DocData::ClassDoc &doc = documentations.get(j); EditorHelp::get_doc_data()->add_doc(doc); @@ -2537,7 +2537,7 @@ void ScriptEditor::save_all_scripts() { } if (script != nullptr) { - const Vector<DocData::ClassDoc> &documentations = script->get_documentation(); + Vector<DocData::ClassDoc> documentations = script->get_documentation(); for (int j = 0; j < documentations.size(); j++) { const DocData::ClassDoc &doc = documentations.get(j); if (EditorHelp::get_doc_data()->has_doc(doc.name)) { @@ -2549,7 +2549,7 @@ void ScriptEditor::save_all_scripts() { EditorNode::get_singleton()->save_resource(edited_res); //external script, save it if (script != nullptr) { - const Vector<DocData::ClassDoc> &documentations = script->get_documentation(); + Vector<DocData::ClassDoc> documentations = script->get_documentation(); for (int j = 0; j < documentations.size(); j++) { const DocData::ClassDoc &doc = documentations.get(j); EditorHelp::get_doc_data()->add_doc(doc); diff --git a/editor/plugins/script_text_editor.cpp b/editor/plugins/script_text_editor.cpp index 30ca1c605f..c1b0a32fc7 100644 --- a/editor/plugins/script_text_editor.cpp +++ b/editor/plugins/script_text_editor.cpp @@ -684,12 +684,12 @@ void ScriptEditor::_update_modified_scripts_for_external_editor(Ref<Script> p_fo } } -void ScriptTextEditor::_code_complete_scripts(void *p_ud, const String &p_code, List<ScriptCodeCompletionOption> *r_options, bool &r_force) { +void ScriptTextEditor::_code_complete_scripts(void *p_ud, const String &p_code, List<ScriptLanguage::CodeCompletionOption> *r_options, bool &r_force) { ScriptTextEditor *ste = (ScriptTextEditor *)p_ud; ste->_code_complete_script(p_code, r_options, r_force); } -void ScriptTextEditor::_code_complete_script(const String &p_code, List<ScriptCodeCompletionOption> *r_options, bool &r_force) { +void ScriptTextEditor::_code_complete_script(const String &p_code, List<ScriptLanguage::CodeCompletionOption> *r_options, bool &r_force) { if (color_panel->is_visible()) { return; } @@ -771,7 +771,7 @@ void ScriptTextEditor::_lookup_symbol(const String &p_symbol, int p_row, int p_c _goto_line(p_row); switch (result.type) { - case ScriptLanguage::LookupResult::RESULT_SCRIPT_LOCATION: { + case ScriptLanguage::LOOKUP_RESULT_SCRIPT_LOCATION: { if (result.script.is_valid()) { emit_signal(SNAME("request_open_script_at_line"), result.script, result.location - 1); } else { @@ -779,10 +779,10 @@ void ScriptTextEditor::_lookup_symbol(const String &p_symbol, int p_row, int p_c goto_line_centered(result.location - 1); } } break; - case ScriptLanguage::LookupResult::RESULT_CLASS: { + case ScriptLanguage::LOOKUP_RESULT_CLASS: { emit_signal(SNAME("go_to_help"), "class_name:" + result.class_name); } break; - case ScriptLanguage::LookupResult::RESULT_CLASS_CONSTANT: { + case ScriptLanguage::LOOKUP_RESULT_CLASS_CONSTANT: { StringName cname = result.class_name; bool success; while (true) { @@ -798,11 +798,11 @@ void ScriptTextEditor::_lookup_symbol(const String &p_symbol, int p_row, int p_c emit_signal(SNAME("go_to_help"), "class_constant:" + result.class_name + ":" + result.class_member); } break; - case ScriptLanguage::LookupResult::RESULT_CLASS_PROPERTY: { + case ScriptLanguage::LOOKUP_RESULT_CLASS_PROPERTY: { emit_signal(SNAME("go_to_help"), "class_property:" + result.class_name + ":" + result.class_member); } break; - case ScriptLanguage::LookupResult::RESULT_CLASS_METHOD: { + case ScriptLanguage::LOOKUP_RESULT_CLASS_METHOD: { StringName cname = result.class_name; while (true) { @@ -817,7 +817,7 @@ void ScriptTextEditor::_lookup_symbol(const String &p_symbol, int p_row, int p_c emit_signal(SNAME("go_to_help"), "class_method:" + result.class_name + ":" + result.class_member); } break; - case ScriptLanguage::LookupResult::RESULT_CLASS_ENUM: { + case ScriptLanguage::LOOKUP_RESULT_CLASS_ENUM: { StringName cname = result.class_name; StringName success; while (true) { @@ -833,9 +833,11 @@ void ScriptTextEditor::_lookup_symbol(const String &p_symbol, int p_row, int p_c emit_signal(SNAME("go_to_help"), "class_enum:" + result.class_name + ":" + result.class_member); } break; - case ScriptLanguage::LookupResult::RESULT_CLASS_TBD_GLOBALSCOPE: { + case ScriptLanguage::LOOKUP_RESULT_CLASS_TBD_GLOBALSCOPE: { emit_signal(SNAME("go_to_help"), "class_global:" + result.class_name + ":" + result.class_member); } break; + default: { + } } } else if (ProjectSettings::get_singleton()->has_autoload(p_symbol)) { // Check for Autoload scenes. diff --git a/editor/plugins/script_text_editor.h b/editor/plugins/script_text_editor.h index 1e2284b403..5c3a66404e 100644 --- a/editor/plugins/script_text_editor.h +++ b/editor/plugins/script_text_editor.h @@ -162,8 +162,8 @@ protected: void _update_bookmark_list(); void _bookmark_item_pressed(int p_idx); - static void _code_complete_scripts(void *p_ud, const String &p_code, List<ScriptCodeCompletionOption> *r_options, bool &r_force); - void _code_complete_script(const String &p_code, List<ScriptCodeCompletionOption> *r_options, bool &r_force); + static void _code_complete_scripts(void *p_ud, const String &p_code, List<ScriptLanguage::CodeCompletionOption> *r_options, bool &r_force); + void _code_complete_script(const String &p_code, List<ScriptLanguage::CodeCompletionOption> *r_options, bool &r_force); void _load_theme_settings(); void _set_theme_for_script(); diff --git a/editor/plugins/shader_editor_plugin.cpp b/editor/plugins/shader_editor_plugin.cpp index dbe6ca192c..070f1fac1e 100644 --- a/editor/plugins/shader_editor_plugin.cpp +++ b/editor/plugins/shader_editor_plugin.cpp @@ -222,7 +222,7 @@ static ShaderLanguage::DataType _get_global_variable_type(const StringName &p_va return (ShaderLanguage::DataType)RS::global_variable_type_get_shader_datatype(gvt); } -void ShaderTextEditor::_code_complete_script(const String &p_code, List<ScriptCodeCompletionOption> *r_options) { +void ShaderTextEditor::_code_complete_script(const String &p_code, List<ScriptLanguage::CodeCompletionOption> *r_options) { _check_shader_mode(); ShaderLanguage sl; diff --git a/editor/plugins/shader_editor_plugin.h b/editor/plugins/shader_editor_plugin.h index b1391e4f66..600b14362e 100644 --- a/editor/plugins/shader_editor_plugin.h +++ b/editor/plugins/shader_editor_plugin.h @@ -65,7 +65,7 @@ protected: static void _bind_methods(); virtual void _load_theme_settings() override; - virtual void _code_complete_script(const String &p_code, List<ScriptCodeCompletionOption> *r_options) override; + virtual void _code_complete_script(const String &p_code, List<ScriptLanguage::CodeCompletionOption> *r_options) override; public: virtual void _validate_script() override; |