From e32e63242be1091f8288766d6faad316ad979482 Mon Sep 17 00:00:00 2001 From: Relintai Date: Sat, 18 Feb 2023 14:36:51 +0100 Subject: [PATCH] Moved ScriptEditor and ScriptEditorPlugin to a new editor subfolder. --- editor/connections_dialog.cpp | 2 +- editor/editor_data.cpp | 2 +- editor/editor_data.h | 2 +- editor/editor_export.cpp | 2 +- editor/editor_help.cpp | 2 +- editor/editor_node.cpp | 2 +- editor/editor_plugin.cpp | 2 +- editor/editor_resource_picker.cpp | 2 +- editor/editor_run.cpp | 2 +- editor/plugins/canvas_item_editor_plugin.cpp | 2 +- editor/plugins/spatial_editor_plugin.cpp | 2 +- editor/scene_tree_dock.cpp | 2 +- editor/scene_tree_editor.cpp | 2 +- editor/settings_config_dialog.cpp | 2 +- main/main.cpp | 2 +- modules/code_editor/SCsub | 7 ++++--- modules/code_editor/code_editor.cpp | 4 ++-- modules/code_editor/{ => editor}/script_editor.cpp | 7 ++++--- modules/code_editor/{ => editor}/script_editor.h | 2 +- modules/code_editor/{ => editor}/script_editor_plugin.cpp | 7 ++++--- modules/code_editor/{ => editor}/script_editor_plugin.h | 0 modules/code_editor/register_types.cpp | 5 +++-- modules/code_editor/script_text_editor.cpp | 3 +-- modules/code_editor/text_editor.cpp | 2 +- modules/code_editor/text_editor.h | 6 +++--- modules/cscript/register_types.cpp | 2 +- modules/gdscript/register_types.cpp | 2 +- 27 files changed, 40 insertions(+), 37 deletions(-) rename modules/code_editor/{ => editor}/script_editor.cpp (99%) rename modules/code_editor/{ => editor}/script_editor.h (99%) rename modules/code_editor/{ => editor}/script_editor_plugin.cpp (98%) rename modules/code_editor/{ => editor}/script_editor_plugin.h (100%) diff --git a/editor/connections_dialog.cpp b/editor/connections_dialog.cpp index 556b9dc4b..0ba1a07d5 100644 --- a/editor/connections_dialog.cpp +++ b/editor/connections_dialog.cpp @@ -75,7 +75,7 @@ #include "modules/modules_enabled.gen.h" #ifdef MODULE_CODE_EDITOR_ENABLED -#include "modules/code_editor/script_editor.h" +#include "modules/code_editor/editor/script_editor.h" #endif static Node *_find_first_script(Node *p_root, Node *p_node) { diff --git a/editor/editor_data.cpp b/editor/editor_data.cpp index b0a974759..1a5e5c122 100644 --- a/editor/editor_data.cpp +++ b/editor/editor_data.cpp @@ -46,7 +46,7 @@ #include "modules/modules_enabled.gen.h" #ifdef MODULE_CODE_EDITOR_ENABLED -#include "modules/code_editor/script_editor.h" +#include "modules/code_editor/editor/script_editor.h" #endif class Resource; diff --git a/editor/editor_data.h b/editor/editor_data.h index 876b1f0db..adfb0b947 100644 --- a/editor/editor_data.h +++ b/editor/editor_data.h @@ -55,7 +55,7 @@ #include "modules/modules_enabled.gen.h" #ifdef MODULE_CODE_EDITOR_ENABLED -#include "modules/code_editor/script_editor_plugin.h" +#include "modules/code_editor/editor/script_editor_plugin.h" #endif class ConfigFile; diff --git a/editor/editor_export.cpp b/editor/editor_export.cpp index 49d66ca20..a96439527 100644 --- a/editor/editor_export.cpp +++ b/editor/editor_export.cpp @@ -60,7 +60,7 @@ #include "modules/modules_enabled.gen.h" #ifdef MODULE_CODE_EDITOR_ENABLED -#include "modules/code_editor/script_editor.h" +#include "modules/code_editor/editor/script_editor.h" #endif static int _get_pad(int p_alignment, int p_n) { diff --git a/editor/editor_help.cpp b/editor/editor_help.cpp index 1c18c91ab..ac97189e7 100644 --- a/editor/editor_help.cpp +++ b/editor/editor_help.cpp @@ -66,7 +66,7 @@ #include "modules/modules_enabled.gen.h" #ifdef MODULE_CODE_EDITOR_ENABLED -#include "modules/code_editor/script_editor.h" +#include "modules/code_editor/editor/script_editor.h" #endif #define CONTRIBUTE_URL vformat("%s/community/contributing/updating_the_class_reference.html", VERSION_DOCS_URL) diff --git a/editor/editor_node.cpp b/editor/editor_node.cpp index c728db343..763e084c7 100644 --- a/editor/editor_node.cpp +++ b/editor/editor_node.cpp @@ -193,7 +193,7 @@ #include "modules/modules_enabled.gen.h" #ifdef MODULE_CODE_EDITOR_ENABLED -#include "modules/code_editor/script_editor.h" +#include "modules/code_editor/editor/script_editor.h" #include "modules/code_editor/script_text_editor.h" #include "modules/code_editor/text_editor.h" #endif diff --git a/editor/editor_plugin.cpp b/editor/editor_plugin.cpp index f53173e1d..478734bf8 100644 --- a/editor/editor_plugin.cpp +++ b/editor/editor_plugin.cpp @@ -77,7 +77,7 @@ #include "modules/modules_enabled.gen.h" #ifdef MODULE_CODE_EDITOR_ENABLED -#include "modules/code_editor/script_editor.h" +#include "modules/code_editor/editor/script_editor.h" #endif class ConfigFile; diff --git a/editor/editor_resource_picker.cpp b/editor/editor_resource_picker.cpp index f94e12529..1db096f9b 100644 --- a/editor/editor_resource_picker.cpp +++ b/editor/editor_resource_picker.cpp @@ -72,7 +72,7 @@ #include "modules/modules_enabled.gen.h" #ifdef MODULE_CODE_EDITOR_ENABLED -#include "modules/code_editor/script_editor.h" +#include "modules/code_editor/editor/script_editor.h" #include "modules/code_editor/script_editor_base.h" #endif diff --git a/editor/editor_run.cpp b/editor/editor_run.cpp index 121a17e11..2d9f26ae0 100644 --- a/editor/editor_run.cpp +++ b/editor/editor_run.cpp @@ -45,7 +45,7 @@ #include "modules/modules_enabled.gen.h" #ifdef MODULE_CODE_EDITOR_ENABLED -#include "modules/code_editor/script_editor.h" +#include "modules/code_editor/editor/script_editor.h" #endif EditorRun::Status EditorRun::get_status() const { diff --git a/editor/plugins/canvas_item_editor_plugin.cpp b/editor/plugins/canvas_item_editor_plugin.cpp index 37899961b..7f1e8a1d5 100644 --- a/editor/plugins/canvas_item_editor_plugin.cpp +++ b/editor/plugins/canvas_item_editor_plugin.cpp @@ -103,7 +103,7 @@ #include "modules/modules_enabled.gen.h" #ifdef MODULE_CODE_EDITOR_ENABLED -#include "modules/code_editor/script_editor.h" +#include "modules/code_editor/editor/script_editor.h" #endif // Min and Max are power of two in order to play nicely with successive increment. diff --git a/editor/plugins/spatial_editor_plugin.cpp b/editor/plugins/spatial_editor_plugin.cpp index 3b03e4e6c..75c5017fc 100644 --- a/editor/plugins/spatial_editor_plugin.cpp +++ b/editor/plugins/spatial_editor_plugin.cpp @@ -102,7 +102,7 @@ #include "modules/modules_enabled.gen.h" #ifdef MODULE_CODE_EDITOR_ENABLED -#include "modules/code_editor/script_editor.h" +#include "modules/code_editor/editor/script_editor.h" #endif #define DISTANCE_DEFAULT 4 diff --git a/editor/scene_tree_dock.cpp b/editor/scene_tree_dock.cpp index 5f88af47c..d88684ae1 100644 --- a/editor/scene_tree_dock.cpp +++ b/editor/scene_tree_dock.cpp @@ -99,7 +99,7 @@ #include "modules/modules_enabled.gen.h" #ifdef MODULE_CODE_EDITOR_ENABLED -#include "modules/code_editor/script_editor.h" +#include "modules/code_editor/editor/script_editor.h" #endif void SceneTreeDock::_nodes_drag_begin() { diff --git a/editor/scene_tree_editor.cpp b/editor/scene_tree_editor.cpp index 6591520f2..32f35a547 100644 --- a/editor/scene_tree_editor.cpp +++ b/editor/scene_tree_editor.cpp @@ -67,7 +67,7 @@ #include "modules/modules_enabled.gen.h" #ifdef MODULE_CODE_EDITOR_ENABLED -#include "modules/code_editor/script_editor.h" +#include "modules/code_editor/editor/script_editor.h" #include "modules/code_editor/script_editor_base.h" #endif diff --git a/editor/settings_config_dialog.cpp b/editor/settings_config_dialog.cpp index 007694e92..f4bf34207 100644 --- a/editor/settings_config_dialog.cpp +++ b/editor/settings_config_dialog.cpp @@ -70,7 +70,7 @@ #include "modules/modules_enabled.gen.h" #ifdef MODULE_CODE_EDITOR_ENABLED -#include "modules/code_editor/script_editor.h" +#include "modules/code_editor/editor/script_editor.h" #endif void EditorSettingsDialog::ok_pressed() { diff --git a/main/main.cpp b/main/main.cpp index 962765fae..1670e9dec 100644 --- a/main/main.cpp +++ b/main/main.cpp @@ -86,7 +86,7 @@ #include "modules/modules_enabled.gen.h" #ifdef MODULE_CODE_EDITOR_ENABLED -#include "modules/code_editor/script_editor.h" +#include "modules/code_editor/editor/script_editor.h" #endif /* Static members */ diff --git a/modules/code_editor/SCsub b/modules/code_editor/SCsub index d681e9227..38c238d0f 100644 --- a/modules/code_editor/SCsub +++ b/modules/code_editor/SCsub @@ -7,15 +7,16 @@ env_mlp = env.Clone() sources = [ "register_types.cpp", "code_editor.cpp", - "script_editor_plugin.cpp", "script_text_editor.cpp", "text_editor.cpp", - "script_editor_quick_open.cpp", "script_editor_base.cpp", - "script_editor.cpp", "connection_info_dialog.cpp", "goto_line_dialog.cpp", "find_replace_bar.cpp", + "script_editor_quick_open.cpp", + + "editor/script_editor_plugin.cpp", + "editor/script_editor.cpp", ] env_mlp.add_source_files(env.modules_sources, sources) diff --git a/modules/code_editor/code_editor.cpp b/modules/code_editor/code_editor.cpp index c437fa46c..6bb9c4b92 100644 --- a/modules/code_editor/code_editor.cpp +++ b/modules/code_editor/code_editor.cpp @@ -63,11 +63,11 @@ #include "scene/resources/dynamic_font.h" #include "scene/resources/font.h" #include "scene/resources/texture.h" -#include "script_editor_plugin.h" #include "find_replace_bar.h" #include "goto_line_dialog.h" -#include "script_editor.h" + +#include "editor/script_editor.h" /*** CODE EDITOR ****/ diff --git a/modules/code_editor/script_editor.cpp b/modules/code_editor/editor/script_editor.cpp similarity index 99% rename from modules/code_editor/script_editor.cpp rename to modules/code_editor/editor/script_editor.cpp index ecaf91a92..4c3f09ba8 100644 --- a/modules/code_editor/script_editor.cpp +++ b/modules/code_editor/editor/script_editor.cpp @@ -90,9 +90,10 @@ #include "scene/resources/text_file.h" #include "scene/resources/texture.h" #include "scene/scene_string_names.h" -#include "script_editor_quick_open.h" -#include "script_text_editor.h" -#include "text_editor.h" + +#include "../script_editor_quick_open.h" +#include "../script_text_editor.h" +#include "../text_editor.h" #include "modules/modules_enabled.gen.h" diff --git a/modules/code_editor/script_editor.h b/modules/code_editor/editor/script_editor.h similarity index 99% rename from modules/code_editor/script_editor.h rename to modules/code_editor/editor/script_editor.h index cde447755..9501f4994 100644 --- a/modules/code_editor/script_editor.h +++ b/modules/code_editor/editor/script_editor.h @@ -52,7 +52,7 @@ #include "core/variant/variant.h" #include "core/containers/vector.h" -#include "script_editor_base.h" +#include "../script_editor_base.h" class Button; class ConfigFile; diff --git a/modules/code_editor/script_editor_plugin.cpp b/modules/code_editor/editor/script_editor_plugin.cpp similarity index 98% rename from modules/code_editor/script_editor_plugin.cpp rename to modules/code_editor/editor/script_editor_plugin.cpp index 43ec9b413..34a5c928a 100644 --- a/modules/code_editor/script_editor_plugin.cpp +++ b/modules/code_editor/editor/script_editor_plugin.cpp @@ -89,9 +89,10 @@ #include "scene/resources/text_file.h" #include "scene/resources/texture.h" #include "scene/scene_string_names.h" -#include "script_editor_quick_open.h" -#include "script_text_editor.h" -#include "text_editor.h" + +#include "../script_editor_quick_open.h" +#include "../script_text_editor.h" +#include "../text_editor.h" #include "script_editor.h" diff --git a/modules/code_editor/script_editor_plugin.h b/modules/code_editor/editor/script_editor_plugin.h similarity index 100% rename from modules/code_editor/script_editor_plugin.h rename to modules/code_editor/editor/script_editor_plugin.h diff --git a/modules/code_editor/register_types.cpp b/modules/code_editor/register_types.cpp index 2d25c2b58..4f23ed7bc 100644 --- a/modules/code_editor/register_types.cpp +++ b/modules/code_editor/register_types.cpp @@ -1,12 +1,13 @@ #include "register_types.h" -#include "script_editor_plugin.h" +#include "editor/script_editor_plugin.h" +#include "editor/script_editor.h" #include "script_text_editor.h" #include "text_editor.h" #include "script_editor_base.h" -#include "script_editor.h" + void register_code_editor_types(ModuleRegistrationLevel p_level) { if (p_level == MODULE_REGISTRATION_LEVEL_SCENE) { diff --git a/modules/code_editor/script_text_editor.cpp b/modules/code_editor/script_text_editor.cpp index 72b1c460d..5e99e1c2e 100644 --- a/modules/code_editor/script_text_editor.cpp +++ b/modules/code_editor/script_text_editor.cpp @@ -68,11 +68,10 @@ #include "scene/main/node.h" #include "scene/main/scene_tree.h" #include "scene/resources/texture.h" -#include "script_editor_plugin.h" #include "script_editor_quick_open.h" #include "connection_info_dialog.h" -#include "script_editor.h" +#include "editor/script_editor.h" #include "goto_line_dialog.h" #include "find_replace_bar.h" diff --git a/modules/code_editor/text_editor.cpp b/modules/code_editor/text_editor.cpp index c78621618..a2aea3753 100644 --- a/modules/code_editor/text_editor.cpp +++ b/modules/code_editor/text_editor.cpp @@ -50,7 +50,7 @@ #include "scene/resources/text_file.h" #include "scene/resources/texture.h" -#include "script_editor.h" +#include "editor/script_editor.h" #include "goto_line_dialog.h" #include "find_replace_bar.h" diff --git a/modules/code_editor/text_editor.h b/modules/code_editor/text_editor.h index 07f738f76..ebf22a231 100644 --- a/modules/code_editor/text_editor.h +++ b/modules/code_editor/text_editor.h @@ -32,16 +32,16 @@ #include "script_editor_base.h" -#include "core/math/color.h" +#include "code_editor.h" #include "core/containers/list.h" #include "core/containers/rb_map.h" +#include "core/containers/vector.h" +#include "core/math/color.h" #include "core/object/object.h" #include "core/object/reference.h" #include "core/object/resource.h" #include "core/string/ustring.h" #include "core/variant/variant.h" -#include "core/containers/vector.h" -#include "code_editor.h" class Control; class HBoxContainer; diff --git a/modules/cscript/register_types.cpp b/modules/cscript/register_types.cpp index bf11f313f..f97e2e18f 100644 --- a/modules/cscript/register_types.cpp +++ b/modules/cscript/register_types.cpp @@ -51,7 +51,7 @@ Ref resource_saver_cscript; #include "editor/editor_settings.h" #ifdef MODULE_CODE_EDITOR_ENABLED -#include "modules/code_editor/script_editor.h" +#include "modules/code_editor/editor/script_editor.h" #endif class EditorExportCScript : public EditorExportPlugin { diff --git a/modules/gdscript/register_types.cpp b/modules/gdscript/register_types.cpp index c913f3149..e587bfeee 100644 --- a/modules/gdscript/register_types.cpp +++ b/modules/gdscript/register_types.cpp @@ -51,7 +51,7 @@ Ref resource_saver_gd; #include "editor/gdscript_highlighter.h" #ifdef MODULE_CODE_EDITOR_ENABLED -#include "modules/code_editor/script_editor.h" +#include "modules/code_editor/editor/script_editor.h" #endif class EditorExportGDScript : public EditorExportPlugin {