Renamed the code_editor module to editor_code_editor.

This commit is contained in:
Relintai 2023-02-18 15:31:58 +01:00
parent 65c91c6899
commit a14821587f
48 changed files with 100 additions and 100 deletions

View File

@ -74,8 +74,8 @@
#include "modules/modules_enabled.gen.h" #include "modules/modules_enabled.gen.h"
#ifdef MODULE_CODE_EDITOR_ENABLED #ifdef MODULE_EDITOR_CODE_EDITOR_ENABLED
#include "modules/code_editor/script_editor.h" #include "modules/editor_code_editor/script_editor.h"
#endif #endif
static Node *_find_first_script(Node *p_root, Node *p_node) { static Node *_find_first_script(Node *p_root, Node *p_node) {
@ -816,7 +816,7 @@ void ConnectionsDock::_go_to_script(TreeItem &item) {
return; return;
} }
#ifdef MODULE_CODE_EDITOR_ENABLED #ifdef MODULE_EDITOR_CODE_EDITOR_ENABLED
if (script.is_valid() && ScriptEditor::get_singleton()->script_goto_method(script, c.method)) { if (script.is_valid() && ScriptEditor::get_singleton()->script_goto_method(script, c.method)) {
editor->call("_editor_select", EditorNode::EDITOR_SCRIPT); editor->call("_editor_select", EditorNode::EDITOR_SCRIPT);
} }

View File

@ -45,8 +45,8 @@
#include "modules/modules_enabled.gen.h" #include "modules/modules_enabled.gen.h"
#ifdef MODULE_CODE_EDITOR_ENABLED #ifdef MODULE_EDITOR_CODE_EDITOR_ENABLED
#include "modules/code_editor/script_editor.h" #include "modules/editor_code_editor/script_editor.h"
#endif #endif
class Resource; class Resource;
@ -557,7 +557,7 @@ void EditorData::remove_scene(int p_idx) {
current_edited_scene--; current_edited_scene--;
} }
#ifdef MODULE_CODE_EDITOR_ENABLED #ifdef MODULE_EDITOR_CODE_EDITOR_ENABLED
if (edited_scene[p_idx].path != String()) { if (edited_scene[p_idx].path != String()) {
ScriptEditor::get_singleton()->close_builtin_scripts_from_scene(edited_scene[p_idx].path); ScriptEditor::get_singleton()->close_builtin_scripts_from_scene(edited_scene[p_idx].path);
} }

View File

@ -54,8 +54,8 @@
#include "modules/modules_enabled.gen.h" #include "modules/modules_enabled.gen.h"
#ifdef MODULE_CODE_EDITOR_ENABLED #ifdef MODULE_EDITOR_CODE_EDITOR_ENABLED
#include "modules/code_editor/script_editor_plugin.h" #include "modules/editor_code_editor/script_editor_plugin.h"
#endif #endif
class ConfigFile; class ConfigFile;

View File

@ -59,8 +59,8 @@
#include "modules/modules_enabled.gen.h" #include "modules/modules_enabled.gen.h"
#ifdef MODULE_CODE_EDITOR_ENABLED #ifdef MODULE_EDITOR_CODE_EDITOR_ENABLED
#include "modules/code_editor/script_editor.h" #include "modules/editor_code_editor/script_editor.h"
#endif #endif
static int _get_pad(int p_alignment, int p_n) { static int _get_pad(int p_alignment, int p_n) {
@ -333,7 +333,7 @@ void EditorExportPlatform::gen_debug_flags(Vector<String> &r_flags, int p_flags)
} }
} }
#ifdef MODULE_CODE_EDITOR_ENABLED #ifdef MODULE_EDITOR_CODE_EDITOR_ENABLED
int remote_port = (int)EditorSettings::get_singleton()->get("network/debug/remote_port"); int remote_port = (int)EditorSettings::get_singleton()->get("network/debug/remote_port");
if (p_flags & DEBUG_FLAG_REMOTE_DEBUG) { if (p_flags & DEBUG_FLAG_REMOTE_DEBUG) {
@ -1260,7 +1260,7 @@ void EditorExportPlatform::gen_export_flags(Vector<String> &r_flags, int p_flags
} }
} }
#ifdef MODULE_CODE_EDITOR_ENABLED #ifdef MODULE_EDITOR_CODE_EDITOR_ENABLED
int remote_port = (int)EditorSettings::get_singleton()->get("network/debug/remote_port"); int remote_port = (int)EditorSettings::get_singleton()->get("network/debug/remote_port");
if (p_flags & DEBUG_FLAG_REMOTE_DEBUG) { if (p_flags & DEBUG_FLAG_REMOTE_DEBUG) {

View File

@ -65,8 +65,8 @@
#include "modules/modules_enabled.gen.h" #include "modules/modules_enabled.gen.h"
#ifdef MODULE_CODE_EDITOR_ENABLED #ifdef MODULE_EDITOR_CODE_EDITOR_ENABLED
#include "modules/code_editor/script_editor.h" #include "modules/editor_code_editor/script_editor.h"
#endif #endif
#define CONTRIBUTE_URL vformat("%s/community/contributing/updating_the_class_reference.html", VERSION_DOCS_URL) #define CONTRIBUTE_URL vformat("%s/community/contributing/updating_the_class_reference.html", VERSION_DOCS_URL)
@ -1703,7 +1703,7 @@ EditorHelp::~EditorHelp() {
void EditorHelpBit::_go_to_help(String p_what) { void EditorHelpBit::_go_to_help(String p_what) {
EditorNode::get_singleton()->set_visible_editor(EditorNode::EDITOR_SCRIPT); EditorNode::get_singleton()->set_visible_editor(EditorNode::EDITOR_SCRIPT);
#ifdef MODULE_CODE_EDITOR_ENABLED #ifdef MODULE_EDITOR_CODE_EDITOR_ENABLED
ScriptEditor::get_singleton()->goto_help(p_what); ScriptEditor::get_singleton()->goto_help(p_what);
#endif #endif
emit_signal("request_hide"); emit_signal("request_hide");

View File

@ -192,10 +192,10 @@
#include "modules/modules_enabled.gen.h" #include "modules/modules_enabled.gen.h"
#ifdef MODULE_CODE_EDITOR_ENABLED #ifdef MODULE_EDITOR_CODE_EDITOR_ENABLED
#include "modules/code_editor/script_editor.h" #include "modules/editor_code_editor/script_editor.h"
#include "modules/code_editor/script_text_editor.h" #include "modules/editor_code_editor/script_text_editor.h"
#include "modules/code_editor/text_editor.h" #include "modules/editor_code_editor/text_editor.h"
#endif #endif
class Camera; class Camera;
@ -588,7 +588,7 @@ void EditorNode::_notification(int p_what) {
recent_scenes->set_as_minsize(); recent_scenes->set_as_minsize();
#ifdef MODULE_CODE_EDITOR_ENABLED #ifdef MODULE_EDITOR_CODE_EDITOR_ENABLED
// debugger area // debugger area
if (ScriptEditor::get_singleton()->get_debugger()->is_visible()) { if (ScriptEditor::get_singleton()->get_debugger()->is_visible()) {
bottom_panel->add_theme_style_override("panel", gui_base->get_theme_stylebox("BottomPanelDebuggerOverride", "EditorStyles")); bottom_panel->add_theme_style_override("panel", gui_base->get_theme_stylebox("BottomPanelDebuggerOverride", "EditorStyles"));
@ -2011,7 +2011,7 @@ void EditorNode::_edit_current(bool p_skip_foreign) {
Object *prev_inspected_object = get_inspector()->get_edited_object(); Object *prev_inspected_object = get_inspector()->get_edited_object();
bool disable_folding = bool(EDITOR_GET("interface/inspector/disable_folding")); bool disable_folding = bool(EDITOR_GET("interface/inspector/disable_folding"));
#ifdef MODULE_CODE_EDITOR_ENABLED #ifdef MODULE_EDITOR_CODE_EDITOR_ENABLED
bool stay_in_script_editor_on_node_selected = bool(EDITOR_GET("text_editor/navigation/stay_in_script_editor_on_node_selected")); bool stay_in_script_editor_on_node_selected = bool(EDITOR_GET("text_editor/navigation/stay_in_script_editor_on_node_selected"));
#endif #endif
bool is_resource = current_obj->is_class("Resource"); bool is_resource = current_obj->is_class("Resource");
@ -2052,7 +2052,7 @@ void EditorNode::_edit_current(bool p_skip_foreign) {
node_dock->set_node(current_node); node_dock->set_node(current_node);
scene_tree_dock->set_selected(current_node); scene_tree_dock->set_selected(current_node);
inspector_dock->update(current_node); inspector_dock->update(current_node);
#ifdef MODULE_CODE_EDITOR_ENABLED #ifdef MODULE_EDITOR_CODE_EDITOR_ENABLED
if (!inspector_only) { if (!inspector_only) {
inspector_only = stay_in_script_editor_on_node_selected && ScriptEditor::get_singleton()->is_visible_in_tree(); inspector_only = stay_in_script_editor_on_node_selected && ScriptEditor::get_singleton()->is_visible_in_tree();
} }
@ -2134,7 +2134,7 @@ void EditorNode::_edit_current(bool p_skip_foreign) {
if (!changing_scene) { if (!changing_scene) {
main_plugin->edit(current_obj); main_plugin->edit(current_obj);
} }
#ifdef MODULE_CODE_EDITOR_ENABLED #ifdef MODULE_EDITOR_CODE_EDITOR_ENABLED
} else if (main_plugin != editor_plugin_screen && (!ScriptEditor::get_singleton() || !ScriptEditor::get_singleton()->is_visible_in_tree() || ScriptEditor::get_singleton()->can_take_away_focus())) { } else if (main_plugin != editor_plugin_screen && (!ScriptEditor::get_singleton() || !ScriptEditor::get_singleton()->is_visible_in_tree() || ScriptEditor::get_singleton()->can_take_away_focus())) {
// update screen main_plugin // update screen main_plugin
_editor_select(plugin_index); _editor_select(plugin_index);
@ -2240,7 +2240,7 @@ void EditorNode::_run(bool p_current, const String &p_custom) {
args = ProjectSettings::get_singleton()->get("editor/main_run_args"); args = ProjectSettings::get_singleton()->get("editor/main_run_args");
#ifdef MODULE_CODE_EDITOR_ENABLED #ifdef MODULE_EDITOR_CODE_EDITOR_ENABLED
skip_breakpoints = ScriptEditor::get_singleton()->get_debugger()->is_skip_breakpoints(); skip_breakpoints = ScriptEditor::get_singleton()->get_debugger()->is_skip_breakpoints();
#endif #endif
emit_signal("play_pressed"); emit_signal("play_pressed");
@ -2409,7 +2409,7 @@ void EditorNode::_menu_option_confirm(int p_option, bool p_confirmed) {
if (!scene) { if (!scene) {
if (p_option == FILE_SAVE_SCENE) { if (p_option == FILE_SAVE_SCENE) {
#ifdef MODULE_CODE_EDITOR_ENABLED #ifdef MODULE_EDITOR_CODE_EDITOR_ENABLED
// Pressing Ctrl + S saves the current script if a scene is currently open, but it won't if the scene has no root node. // Pressing Ctrl + S saves the current script if a scene is currently open, but it won't if the scene has no root node.
// Work around this by explicitly saving the script in this case (similar to pressing Ctrl + Alt + S). // Work around this by explicitly saving the script in this case (similar to pressing Ctrl + Alt + S).
ScriptEditor::get_singleton()->save_current_script(); ScriptEditor::get_singleton()->save_current_script();
@ -2730,7 +2730,7 @@ void EditorNode::_menu_option_confirm(int p_option, bool p_confirmed) {
bool ischecked = debug_menu->get_popup()->is_item_checked(debug_menu->get_popup()->get_item_index(RUN_LIVE_DEBUG)); bool ischecked = debug_menu->get_popup()->is_item_checked(debug_menu->get_popup()->get_item_index(RUN_LIVE_DEBUG));
debug_menu->get_popup()->set_item_checked(debug_menu->get_popup()->get_item_index(RUN_LIVE_DEBUG), !ischecked); debug_menu->get_popup()->set_item_checked(debug_menu->get_popup()->get_item_index(RUN_LIVE_DEBUG), !ischecked);
#ifdef MODULE_CODE_EDITOR_ENABLED #ifdef MODULE_EDITOR_CODE_EDITOR_ENABLED
ScriptEditor::get_singleton()->get_debugger()->set_live_debugging(!ischecked); ScriptEditor::get_singleton()->get_debugger()->set_live_debugging(!ischecked);
#endif #endif
EditorSettings::get_singleton()->set_project_metadata("debug_options", "run_live_debug", !ischecked); EditorSettings::get_singleton()->set_project_metadata("debug_options", "run_live_debug", !ischecked);
@ -2770,7 +2770,7 @@ void EditorNode::_menu_option_confirm(int p_option, bool p_confirmed) {
bool ischecked = debug_menu->get_popup()->is_item_checked(debug_menu->get_popup()->get_item_index(RUN_RELOAD_SCRIPTS)); bool ischecked = debug_menu->get_popup()->is_item_checked(debug_menu->get_popup()->get_item_index(RUN_RELOAD_SCRIPTS));
debug_menu->get_popup()->set_item_checked(debug_menu->get_popup()->get_item_index(RUN_RELOAD_SCRIPTS), !ischecked); debug_menu->get_popup()->set_item_checked(debug_menu->get_popup()->get_item_index(RUN_RELOAD_SCRIPTS), !ischecked);
#ifdef MODULE_CODE_EDITOR_ENABLED #ifdef MODULE_EDITOR_CODE_EDITOR_ENABLED
ScriptEditor::get_singleton()->set_live_auto_reload_running_scripts(!ischecked); ScriptEditor::get_singleton()->set_live_auto_reload_running_scripts(!ischecked);
#endif #endif
EditorSettings::get_singleton()->set_project_metadata("debug_options", "run_reload_scripts", !ischecked); EditorSettings::get_singleton()->set_project_metadata("debug_options", "run_reload_scripts", !ischecked);
@ -3464,7 +3464,7 @@ void EditorNode::_set_main_scene_state(Dictionary p_state, Node *p_for_scene) {
//this should only happen at the very end //this should only happen at the very end
#ifdef MODULE_CODE_EDITOR_ENABLED #ifdef MODULE_EDITOR_CODE_EDITOR_ENABLED
ScriptEditor::get_singleton()->get_debugger()->update_live_edit_root(); ScriptEditor::get_singleton()->get_debugger()->update_live_edit_root();
ScriptEditor::get_singleton()->set_scene_root_script(editor_data.get_scene_root_script(editor_data.get_edited_scene())); ScriptEditor::get_singleton()->set_scene_root_script(editor_data.get_scene_root_script(editor_data.get_edited_scene()));
#endif #endif
@ -3698,7 +3698,7 @@ Error EditorNode::load_scene(const String &p_scene, bool p_ignore_broken_deps, b
opening_prev = false; opening_prev = false;
scene_tree_dock->set_selected(new_scene); scene_tree_dock->set_selected(new_scene);
#ifdef MODULE_CODE_EDITOR_ENABLED #ifdef MODULE_EDITOR_CODE_EDITOR_ENABLED
ScriptEditor::get_singleton()->get_debugger()->update_live_edit_root(); ScriptEditor::get_singleton()->get_debugger()->update_live_edit_root();
#endif #endif
@ -5129,7 +5129,7 @@ void EditorNode::_bottom_panel_switch(bool p_enable, int p_idx) {
bottom_panel_items[i].control->set_visible(i == p_idx); bottom_panel_items[i].control->set_visible(i == p_idx);
} }
#ifdef MODULE_CODE_EDITOR_ENABLED #ifdef MODULE_EDITOR_CODE_EDITOR_ENABLED
if (ScriptEditor::get_singleton()->get_debugger() == bottom_panel_items[p_idx].control) { // this is the debug panel which uses tabs, so the top section should be smaller if (ScriptEditor::get_singleton()->get_debugger() == bottom_panel_items[p_idx].control) { // this is the debug panel which uses tabs, so the top section should be smaller
bottom_panel->add_theme_style_override("panel", gui_base->get_theme_stylebox("BottomPanelDebuggerOverride", "EditorStyles")); bottom_panel->add_theme_style_override("panel", gui_base->get_theme_stylebox("BottomPanelDebuggerOverride", "EditorStyles"));
} else { } else {

View File

@ -76,8 +76,8 @@
#include "modules/modules_enabled.gen.h" #include "modules/modules_enabled.gen.h"
#ifdef MODULE_CODE_EDITOR_ENABLED #ifdef MODULE_EDITOR_CODE_EDITOR_ENABLED
#include "modules/code_editor/script_editor.h" #include "modules/editor_code_editor/script_editor.h"
#endif #endif
class ConfigFile; class ConfigFile;
@ -211,7 +211,7 @@ void EditorInterface::edit_node(Node *p_node) {
} }
void EditorInterface::edit_script(const Ref<Script> &p_script, int p_line, int p_col, bool p_grab_focus) { void EditorInterface::edit_script(const Ref<Script> &p_script, int p_line, int p_col, bool p_grab_focus) {
#ifdef MODULE_CODE_EDITOR_ENABLED #ifdef MODULE_EDITOR_CODE_EDITOR_ENABLED
ScriptEditor::get_singleton()->edit(p_script, p_line, p_col, p_grab_focus); ScriptEditor::get_singleton()->edit(p_script, p_line, p_col, p_grab_focus);
#endif #endif
} }
@ -274,7 +274,7 @@ Array EditorInterface::get_open_scenes() const {
return ret; return ret;
} }
#ifdef MODULE_CODE_EDITOR_ENABLED #ifdef MODULE_EDITOR_CODE_EDITOR_ENABLED
ScriptEditor *EditorInterface::get_script_editor() { ScriptEditor *EditorInterface::get_script_editor() {
return ScriptEditor::get_singleton(); return ScriptEditor::get_singleton();
} }
@ -366,7 +366,7 @@ void EditorInterface::_bind_methods() {
ClassDB::bind_method(D_METHOD("inspect_object", "object", "for_property", "inspector_only"), &EditorInterface::inspect_object, DEFVAL(String()), DEFVAL(false)); ClassDB::bind_method(D_METHOD("inspect_object", "object", "for_property", "inspector_only"), &EditorInterface::inspect_object, DEFVAL(String()), DEFVAL(false));
ClassDB::bind_method(D_METHOD("get_selection"), &EditorInterface::get_selection); ClassDB::bind_method(D_METHOD("get_selection"), &EditorInterface::get_selection);
ClassDB::bind_method(D_METHOD("get_editor_settings"), &EditorInterface::get_editor_settings); ClassDB::bind_method(D_METHOD("get_editor_settings"), &EditorInterface::get_editor_settings);
#ifdef MODULE_CODE_EDITOR_ENABLED #ifdef MODULE_EDITOR_CODE_EDITOR_ENABLED
ClassDB::bind_method(D_METHOD("get_script_editor"), &EditorInterface::get_script_editor); ClassDB::bind_method(D_METHOD("get_script_editor"), &EditorInterface::get_script_editor);
#endif #endif
ClassDB::bind_method(D_METHOD("get_base_control"), &EditorInterface::get_base_control); ClassDB::bind_method(D_METHOD("get_base_control"), &EditorInterface::get_base_control);

View File

@ -110,7 +110,7 @@ public:
Node *get_edited_scene_root(); Node *get_edited_scene_root();
Array get_open_scenes() const; Array get_open_scenes() const;
#ifdef MODULE_CODE_EDITOR_ENABLED #ifdef MODULE_EDITOR_CODE_EDITOR_ENABLED
ScriptEditor *get_script_editor(); ScriptEditor *get_script_editor();
#endif #endif

View File

@ -71,9 +71,9 @@
#include "modules/modules_enabled.gen.h" #include "modules/modules_enabled.gen.h"
#ifdef MODULE_CODE_EDITOR_ENABLED #ifdef MODULE_EDITOR_CODE_EDITOR_ENABLED
#include "modules/code_editor/script_editor.h" #include "modules/editor_code_editor/script_editor.h"
#include "modules/code_editor/script_editor_base.h" #include "modules/editor_code_editor/script_editor_base.h"
#endif #endif
HashMap<StringName, List<StringName>> EditorResourcePicker::allowed_types_cache; HashMap<StringName, List<StringName>> EditorResourcePicker::allowed_types_cache;
@ -584,7 +584,7 @@ bool EditorResourcePicker::_is_drop_valid(const Dictionary &p_drag_data) const {
Ref<Resource> res; Ref<Resource> res;
if (drag_data.has("type") && String(drag_data["type"]) == "script_list_element") { if (drag_data.has("type") && String(drag_data["type"]) == "script_list_element") {
#ifdef MODULE_CODE_EDITOR_ENABLED #ifdef MODULE_EDITOR_CODE_EDITOR_ENABLED
ScriptEditorBase *se = Object::cast_to<ScriptEditorBase>(drag_data["script_list_element"]); ScriptEditorBase *se = Object::cast_to<ScriptEditorBase>(drag_data["script_list_element"]);
if (se) { if (se) {
res = se->get_edited_resource(); res = se->get_edited_resource();
@ -655,7 +655,7 @@ void EditorResourcePicker::drop_data_fw(const Point2 &p_point, const Variant &p_
Ref<Resource> dropped_resource; Ref<Resource> dropped_resource;
if (drag_data.has("type") && String(drag_data["type"]) == "script_list_element") { if (drag_data.has("type") && String(drag_data["type"]) == "script_list_element") {
#ifdef MODULE_CODE_EDITOR_ENABLED #ifdef MODULE_EDITOR_CODE_EDITOR_ENABLED
ScriptEditorBase *se = Object::cast_to<ScriptEditorBase>(drag_data["script_list_element"]); ScriptEditorBase *se = Object::cast_to<ScriptEditorBase>(drag_data["script_list_element"]);
if (se) { if (se) {
dropped_resource = se->get_edited_resource(); dropped_resource = se->get_edited_resource();

View File

@ -44,8 +44,8 @@
#include "modules/modules_enabled.gen.h" #include "modules/modules_enabled.gen.h"
#ifdef MODULE_CODE_EDITOR_ENABLED #ifdef MODULE_EDITOR_CODE_EDITOR_ENABLED
#include "modules/code_editor/script_editor.h" #include "modules/editor_code_editor/script_editor.h"
#endif #endif
EditorRun::Status EditorRun::get_status() const { EditorRun::Status EditorRun::get_status() const {
@ -68,7 +68,7 @@ Error EditorRun::run(const String &p_scene, const String &p_custom_args, const L
args.push_back("--remote-debug"); args.push_back("--remote-debug");
#ifdef MODULE_CODE_EDITOR_ENABLED #ifdef MODULE_EDITOR_CODE_EDITOR_ENABLED
const String conn_string = ScriptEditor::get_singleton()->get_debugger()->get_connection_string(); const String conn_string = ScriptEditor::get_singleton()->get_debugger()->get_connection_string();
if (!conn_string.empty()) { if (!conn_string.empty()) {
args.push_back(ScriptEditor::get_singleton()->get_debugger()->get_connection_string()); args.push_back(ScriptEditor::get_singleton()->get_debugger()->get_connection_string());

View File

@ -102,8 +102,8 @@
#include "modules/modules_enabled.gen.h" #include "modules/modules_enabled.gen.h"
#ifdef MODULE_CODE_EDITOR_ENABLED #ifdef MODULE_EDITOR_CODE_EDITOR_ENABLED
#include "modules/code_editor/script_editor.h" #include "modules/editor_code_editor/script_editor.h"
#endif #endif
// Min and Max are power of two in order to play nicely with successive increment. // Min and Max are power of two in order to play nicely with successive increment.
@ -3909,7 +3909,7 @@ void CanvasItemEditor::_notification(int p_what) {
if (p_what == NOTIFICATION_VISIBILITY_CHANGED) { if (p_what == NOTIFICATION_VISIBILITY_CHANGED) {
if (!is_visible() && override_camera_button->is_pressed()) { if (!is_visible() && override_camera_button->is_pressed()) {
#ifdef MODULE_CODE_EDITOR_ENABLED #ifdef MODULE_EDITOR_CODE_EDITOR_ENABLED
ScriptEditorDebugger *debugger = ScriptEditor::get_singleton()->get_debugger(); ScriptEditorDebugger *debugger = ScriptEditor::get_singleton()->get_debugger();
debugger->set_camera_override(ScriptEditorDebugger::OVERRIDE_NONE); debugger->set_camera_override(ScriptEditorDebugger::OVERRIDE_NONE);
@ -4326,7 +4326,7 @@ void CanvasItemEditor::_button_toggle_grid_snap(bool p_status) {
viewport->update(); viewport->update();
} }
void CanvasItemEditor::_button_override_camera(bool p_pressed) { void CanvasItemEditor::_button_override_camera(bool p_pressed) {
#ifdef MODULE_CODE_EDITOR_ENABLED #ifdef MODULE_EDITOR_CODE_EDITOR_ENABLED
ScriptEditorDebugger *debugger = ScriptEditor::get_singleton()->get_debugger(); ScriptEditorDebugger *debugger = ScriptEditor::get_singleton()->get_debugger();
if (p_pressed) { if (p_pressed) {
@ -5969,7 +5969,7 @@ void CanvasItemEditorViewport::_create_nodes(Node *parent, Node *child, String &
} }
if (parent) { if (parent) {
#ifdef MODULE_CODE_EDITOR_ENABLED #ifdef MODULE_EDITOR_CODE_EDITOR_ENABLED
String new_name = parent->validate_child_name(child); String new_name = parent->validate_child_name(child);
ScriptEditorDebugger *sed = ScriptEditor::get_singleton()->get_debugger(); ScriptEditorDebugger *sed = ScriptEditor::get_singleton()->get_debugger();
editor_data->get_undo_redo().add_do_method(sed, "live_debug_create_node", editor->get_edited_scene()->get_path_to(parent), child->get_class(), new_name); editor_data->get_undo_redo().add_do_method(sed, "live_debug_create_node", editor->get_edited_scene()->get_path_to(parent), child->get_class(), new_name);
@ -6041,7 +6041,7 @@ bool CanvasItemEditorViewport::_create_instance(Node *parent, String &path, cons
editor_data->get_undo_redo().add_do_reference(instanced_scene); editor_data->get_undo_redo().add_do_reference(instanced_scene);
editor_data->get_undo_redo().add_undo_method(parent, "remove_child", instanced_scene); editor_data->get_undo_redo().add_undo_method(parent, "remove_child", instanced_scene);
#ifdef MODULE_CODE_EDITOR_ENABLED #ifdef MODULE_EDITOR_CODE_EDITOR_ENABLED
String new_name = parent->validate_child_name(instanced_scene); String new_name = parent->validate_child_name(instanced_scene);
ScriptEditorDebugger *sed = ScriptEditor::get_singleton()->get_debugger(); ScriptEditorDebugger *sed = ScriptEditor::get_singleton()->get_debugger();
editor_data->get_undo_redo().add_do_method(sed, "live_debug_instance_node", editor->get_edited_scene()->get_path_to(parent), path, new_name); editor_data->get_undo_redo().add_do_method(sed, "live_debug_instance_node", editor->get_edited_scene()->get_path_to(parent), path, new_name);

View File

@ -101,8 +101,8 @@
#include "modules/modules_enabled.gen.h" #include "modules/modules_enabled.gen.h"
#ifdef MODULE_CODE_EDITOR_ENABLED #ifdef MODULE_EDITOR_CODE_EDITOR_ENABLED
#include "modules/code_editor/script_editor.h" #include "modules/editor_code_editor/script_editor.h"
#endif #endif
#define DISTANCE_DEFAULT 4 #define DISTANCE_DEFAULT 4
@ -4238,7 +4238,7 @@ bool SpatialEditorViewport::_create_instance(Node *parent, String &path, const P
editor_data->get_undo_redo().add_do_reference(instanced_scene); editor_data->get_undo_redo().add_do_reference(instanced_scene);
editor_data->get_undo_redo().add_undo_method(parent, "remove_child", instanced_scene); editor_data->get_undo_redo().add_undo_method(parent, "remove_child", instanced_scene);
#ifdef MODULE_CODE_EDITOR_ENABLED #ifdef MODULE_EDITOR_CODE_EDITOR_ENABLED
String new_name = parent->validate_child_name(instanced_scene); String new_name = parent->validate_child_name(instanced_scene);
ScriptEditorDebugger *sed = ScriptEditor::get_singleton()->get_debugger(); ScriptEditorDebugger *sed = ScriptEditor::get_singleton()->get_debugger();
editor_data->get_undo_redo().add_do_method(sed, "live_debug_instance_node", editor->get_edited_scene()->get_path_to(parent), path, new_name); editor_data->get_undo_redo().add_do_method(sed, "live_debug_instance_node", editor->get_edited_scene()->get_path_to(parent), path, new_name);
@ -5479,7 +5479,7 @@ void SpatialEditor::_menu_item_toggled(bool pressed, int p_option) {
} break; } break;
case MENU_TOOL_OVERRIDE_CAMERA: { case MENU_TOOL_OVERRIDE_CAMERA: {
#ifdef MODULE_CODE_EDITOR_ENABLED #ifdef MODULE_EDITOR_CODE_EDITOR_ENABLED
ScriptEditorDebugger *const debugger = ScriptEditor::get_singleton()->get_debugger(); ScriptEditorDebugger *const debugger = ScriptEditor::get_singleton()->get_debugger();
if (pressed) { if (pressed) {
@ -5537,7 +5537,7 @@ void SpatialEditor::_update_camera_override_viewport(Object *p_viewport) {
return; return;
} }
#ifdef MODULE_CODE_EDITOR_ENABLED #ifdef MODULE_EDITOR_CODE_EDITOR_ENABLED
ScriptEditorDebugger *const debugger = ScriptEditor::get_singleton()->get_debugger(); ScriptEditorDebugger *const debugger = ScriptEditor::get_singleton()->get_debugger();
camera_override_viewport_id = current_viewport->index; camera_override_viewport_id = current_viewport->index;
@ -6791,7 +6791,7 @@ void SpatialEditor::_notification(int p_what) {
_init_grid(); _init_grid();
} else if (p_what == NOTIFICATION_VISIBILITY_CHANGED) { } else if (p_what == NOTIFICATION_VISIBILITY_CHANGED) {
if (!is_visible() && tool_option_button[TOOL_OPT_OVERRIDE_CAMERA]->is_pressed()) { if (!is_visible() && tool_option_button[TOOL_OPT_OVERRIDE_CAMERA]->is_pressed()) {
#ifdef MODULE_CODE_EDITOR_ENABLED #ifdef MODULE_EDITOR_CODE_EDITOR_ENABLED
ScriptEditorDebugger *debugger = ScriptEditor::get_singleton()->get_debugger(); ScriptEditorDebugger *debugger = ScriptEditor::get_singleton()->get_debugger();
debugger->set_camera_override(ScriptEditorDebugger::OVERRIDE_NONE); debugger->set_camera_override(ScriptEditorDebugger::OVERRIDE_NONE);

View File

@ -98,8 +98,8 @@
#include "modules/modules_enabled.gen.h" #include "modules/modules_enabled.gen.h"
#ifdef MODULE_CODE_EDITOR_ENABLED #ifdef MODULE_EDITOR_CODE_EDITOR_ENABLED
#include "modules/code_editor/script_editor.h" #include "modules/editor_code_editor/script_editor.h"
#endif #endif
void SceneTreeDock::_nodes_drag_begin() { void SceneTreeDock::_nodes_drag_begin() {
@ -281,7 +281,7 @@ void SceneTreeDock::_perform_instance_scenes(const Vector<String> &p_files, Node
editor_data->get_undo_redo().add_do_reference(instanced_scene); editor_data->get_undo_redo().add_do_reference(instanced_scene);
editor_data->get_undo_redo().add_undo_method(parent, "remove_child", instanced_scene); editor_data->get_undo_redo().add_undo_method(parent, "remove_child", instanced_scene);
#ifdef MODULE_CODE_EDITOR_ENABLED #ifdef MODULE_EDITOR_CODE_EDITOR_ENABLED
String new_name = parent->validate_child_name(instanced_scene); String new_name = parent->validate_child_name(instanced_scene);
ScriptEditorDebugger *sed = ScriptEditor::get_singleton()->get_debugger(); ScriptEditorDebugger *sed = ScriptEditor::get_singleton()->get_debugger();
editor_data->get_undo_redo().add_do_method(sed, "live_debug_instance_node", edited_scene->get_path_to(parent), p_files[i], new_name); editor_data->get_undo_redo().add_do_method(sed, "live_debug_instance_node", edited_scene->get_path_to(parent), p_files[i], new_name);
@ -770,7 +770,7 @@ void SceneTreeDock::_tool_selected(int p_tool, bool p_confirm_override) {
editor_data->get_undo_redo().add_undo_method(parent, "remove_child", dup); editor_data->get_undo_redo().add_undo_method(parent, "remove_child", dup);
editor_data->get_undo_redo().add_do_reference(dup); editor_data->get_undo_redo().add_do_reference(dup);
#ifdef MODULE_CODE_EDITOR_ENABLED #ifdef MODULE_EDITOR_CODE_EDITOR_ENABLED
ScriptEditorDebugger *sed = ScriptEditor::get_singleton()->get_debugger(); ScriptEditorDebugger *sed = ScriptEditor::get_singleton()->get_debugger();
editor_data->get_undo_redo().add_do_method(sed, "live_debug_duplicate_node", edited_scene->get_path_to(node), dup->get_name()); editor_data->get_undo_redo().add_do_method(sed, "live_debug_duplicate_node", edited_scene->get_path_to(node), dup->get_name());
editor_data->get_undo_redo().add_undo_method(sed, "live_debug_remove_node", NodePath(String(edited_scene->get_path_to(parent)).plus_file(dup->get_name()))); editor_data->get_undo_redo().add_undo_method(sed, "live_debug_remove_node", NodePath(String(edited_scene->get_path_to(parent)).plus_file(dup->get_name())));
@ -1004,7 +1004,7 @@ void SceneTreeDock::_tool_selected(int p_tool, bool p_confirm_override) {
} break; } break;
case TOOL_OPEN_DOCUMENTATION: { case TOOL_OPEN_DOCUMENTATION: {
List<Node *> selection = editor_selection->get_selected_node_list(); List<Node *> selection = editor_selection->get_selected_node_list();
#ifdef MODULE_CODE_EDITOR_ENABLED #ifdef MODULE_EDITOR_CODE_EDITOR_ENABLED
for (int i = 0; i < selection.size(); i++) { for (int i = 0; i < selection.size(); i++) {
ScriptEditor::get_singleton()->goto_help("class_name:" + selection[i]->get_class()); ScriptEditor::get_singleton()->goto_help("class_name:" + selection[i]->get_class());
} }
@ -1898,7 +1898,7 @@ void SceneTreeDock::_do_reparent(Node *p_new_parent, int p_position_in_parent, V
editor_data->get_undo_redo().add_do_method(new_parent, "move_child", node, p_position_in_parent + inc); editor_data->get_undo_redo().add_do_method(new_parent, "move_child", node, p_position_in_parent + inc);
} }
#ifdef MODULE_CODE_EDITOR_ENABLED #ifdef MODULE_EDITOR_CODE_EDITOR_ENABLED
ScriptEditorDebugger *sed = ScriptEditor::get_singleton()->get_debugger(); ScriptEditorDebugger *sed = ScriptEditor::get_singleton()->get_debugger();
#endif #endif
String old_name = former_names[ni]; String old_name = former_names[ni];
@ -1927,7 +1927,7 @@ void SceneTreeDock::_do_reparent(Node *p_new_parent, int p_position_in_parent, V
} }
} }
#ifdef MODULE_CODE_EDITOR_ENABLED #ifdef MODULE_EDITOR_CODE_EDITOR_ENABLED
editor_data->get_undo_redo().add_do_method(sed, "live_debug_reparent_node", edited_scene->get_path_to(node), edited_scene->get_path_to(new_parent), new_name, p_position_in_parent + inc); editor_data->get_undo_redo().add_do_method(sed, "live_debug_reparent_node", edited_scene->get_path_to(node), edited_scene->get_path_to(new_parent), new_name, p_position_in_parent + inc);
editor_data->get_undo_redo().add_undo_method(sed, "live_debug_reparent_node", NodePath(String(edited_scene->get_path_to(new_parent)).plus_file(new_name)), edited_scene->get_path_to(node->get_parent()), node->get_name(), node->get_index()); editor_data->get_undo_redo().add_undo_method(sed, "live_debug_reparent_node", NodePath(String(edited_scene->get_path_to(new_parent)).plus_file(new_name)), edited_scene->get_path_to(node->get_parent()), node->get_name(), node->get_index());
#endif #endif
@ -2179,7 +2179,7 @@ void SceneTreeDock::_delete_confirm(bool p_cut) {
editor_data->get_undo_redo().add_undo_method(this, "_set_owners", edited_scene, owners); editor_data->get_undo_redo().add_undo_method(this, "_set_owners", edited_scene, owners);
editor_data->get_undo_redo().add_undo_reference(n); editor_data->get_undo_redo().add_undo_reference(n);
#ifdef MODULE_CODE_EDITOR_ENABLED #ifdef MODULE_EDITOR_CODE_EDITOR_ENABLED
ScriptEditorDebugger *sed = ScriptEditor::get_singleton()->get_debugger(); ScriptEditorDebugger *sed = ScriptEditor::get_singleton()->get_debugger();
editor_data->get_undo_redo().add_do_method(sed, "live_debug_remove_and_keep_node", edited_scene->get_path_to(n), n->get_instance_id()); editor_data->get_undo_redo().add_do_method(sed, "live_debug_remove_and_keep_node", edited_scene->get_path_to(n), n->get_instance_id());
editor_data->get_undo_redo().add_undo_method(sed, "live_debug_restore_node", n->get_instance_id(), edited_scene->get_path_to(n->get_parent()), n->get_index()); editor_data->get_undo_redo().add_undo_method(sed, "live_debug_restore_node", n->get_instance_id(), edited_scene->get_path_to(n->get_parent()), n->get_index());
@ -2276,7 +2276,7 @@ void SceneTreeDock::_do_create(Node *p_parent) {
editor_data->get_undo_redo().add_do_reference(child); editor_data->get_undo_redo().add_do_reference(child);
editor_data->get_undo_redo().add_undo_method(p_parent, "remove_child", child); editor_data->get_undo_redo().add_undo_method(p_parent, "remove_child", child);
#ifdef MODULE_CODE_EDITOR_ENABLED #ifdef MODULE_EDITOR_CODE_EDITOR_ENABLED
String new_name = p_parent->validate_child_name(child); String new_name = p_parent->validate_child_name(child);
ScriptEditorDebugger *sed = ScriptEditor::get_singleton()->get_debugger(); ScriptEditorDebugger *sed = ScriptEditor::get_singleton()->get_debugger();
editor_data->get_undo_redo().add_do_method(sed, "live_debug_create_node", edited_scene->get_path_to(p_parent), child->get_class(), new_name); editor_data->get_undo_redo().add_do_method(sed, "live_debug_create_node", edited_scene->get_path_to(p_parent), child->get_class(), new_name);

View File

@ -66,9 +66,9 @@
#include "modules/modules_enabled.gen.h" #include "modules/modules_enabled.gen.h"
#ifdef MODULE_CODE_EDITOR_ENABLED #ifdef MODULE_EDITOR_CODE_EDITOR_ENABLED
#include "modules/code_editor/script_editor.h" #include "modules/editor_code_editor/script_editor.h"
#include "modules/code_editor/script_editor_base.h" #include "modules/editor_code_editor/script_editor_base.h"
#endif #endif
Node *SceneTreeEditor::get_scene_node() { Node *SceneTreeEditor::get_scene_node() {
@ -1131,7 +1131,7 @@ bool SceneTreeEditor::can_drop_data_fw(const Point2 &p_point, const Variant &p_d
} }
if (String(d["type"]) == "script_list_element") { if (String(d["type"]) == "script_list_element") {
#ifdef MODULE_CODE_EDITOR_ENABLED #ifdef MODULE_EDITOR_CODE_EDITOR_ENABLED
ScriptEditorBase *se = Object::cast_to<ScriptEditorBase>(d["script_list_element"]); ScriptEditorBase *se = Object::cast_to<ScriptEditorBase>(d["script_list_element"]);
if (se) { if (se) {
String sp = se->get_edited_resource()->get_path(); String sp = se->get_edited_resource()->get_path();
@ -1184,7 +1184,7 @@ void SceneTreeEditor::drop_data_fw(const Point2 &p_point, const Variant &p_data,
} }
if (String(d["type"]) == "script_list_element") { if (String(d["type"]) == "script_list_element") {
#ifdef MODULE_CODE_EDITOR_ENABLED #ifdef MODULE_EDITOR_CODE_EDITOR_ENABLED
ScriptEditorBase *se = Object::cast_to<ScriptEditorBase>(d["script_list_element"]); ScriptEditorBase *se = Object::cast_to<ScriptEditorBase>(d["script_list_element"]);
if (se) { if (se) {
String sp = se->get_edited_resource()->get_path(); String sp = se->get_edited_resource()->get_path();

View File

@ -69,8 +69,8 @@
#include "modules/modules_enabled.gen.h" #include "modules/modules_enabled.gen.h"
#ifdef MODULE_CODE_EDITOR_ENABLED #ifdef MODULE_EDITOR_CODE_EDITOR_ENABLED
#include "modules/code_editor/script_editor.h" #include "modules/editor_code_editor/script_editor.h"
#endif #endif
void EditorSettingsDialog::ok_pressed() { void EditorSettingsDialog::ok_pressed() {
@ -148,7 +148,7 @@ void EditorSettingsDialog::_undo_redo_callback(void *p_self, const String &p_nam
void EditorSettingsDialog::_notification(int p_what) { void EditorSettingsDialog::_notification(int p_what) {
switch (p_what) { switch (p_what) {
case NOTIFICATION_READY: { case NOTIFICATION_READY: {
#ifdef MODULE_CODE_EDITOR_ENABLED #ifdef MODULE_EDITOR_CODE_EDITOR_ENABLED
ScriptEditorDebugger *sed = ScriptEditor::get_singleton()->get_debugger(); ScriptEditorDebugger *sed = ScriptEditor::get_singleton()->get_debugger();
undo_redo->set_method_notify_callback(sed->_method_changeds, sed); undo_redo->set_method_notify_callback(sed->_method_changeds, sed);
undo_redo->set_property_notify_callback(sed->_property_changeds, sed); undo_redo->set_property_notify_callback(sed->_property_changeds, sed);

View File

@ -4,7 +4,7 @@ def can_build(env, platform):
if not env["tools"]: if not env["tools"]:
return False return False
env.module_add_dependencies("shader_editor", ["code_editor"], False) env.module_add_dependencies("shader_editor", ["editor_code_editor"], False)
return True return True

View File

@ -65,8 +65,8 @@
#include "servers/rendering/shader_types.h" #include "servers/rendering/shader_types.h"
#include "servers/rendering_server.h" #include "servers/rendering_server.h"
#include "modules/code_editor/goto_line_dialog.h" #include "modules/editor_code_editor/goto_line_dialog.h"
#include "modules/code_editor/find_replace_bar.h" #include "modules/editor_code_editor/find_replace_bar.h"
struct ScriptCodeCompletionOption; struct ScriptCodeCompletionOption;

View File

@ -30,7 +30,7 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/ /*************************************************************************/
#include "modules/code_editor/code_text_editor.h" #include "modules/editor_code_editor/code_text_editor.h"
#include "editor/editor_plugin.h" #include "editor/editor_plugin.h"
#include "scene/gui/margin_container.h" #include "scene/gui/margin_container.h"

View File

@ -5,7 +5,7 @@ def can_build(env, platform):
return False return False
env.module_add_dependencies("text_editor", ["freetype"], True) env.module_add_dependencies("text_editor", ["freetype"], True)
env.module_add_dependencies("text_editor", ["code_editor"], False) env.module_add_dependencies("text_editor", ["editor_code_editor"], False)
return True return True

View File

@ -14,8 +14,8 @@
#include "scene/gui/text_edit.h" #include "scene/gui/text_edit.h"
#include "scene/gui/texture_rect.h" #include "scene/gui/texture_rect.h"
#include "modules/code_editor/code_text_editor.h" #include "modules/editor_code_editor/code_text_editor.h"
#include "modules/code_editor/find_replace_bar.h" #include "modules/editor_code_editor/find_replace_bar.h"
#include "scene/resources/dynamic_font.h" #include "scene/resources/dynamic_font.h"

View File

@ -85,8 +85,8 @@
#endif #endif
#include "modules/modules_enabled.gen.h" #include "modules/modules_enabled.gen.h"
#ifdef MODULE_CODE_EDITOR_ENABLED #ifdef MODULE_EDITOR_CODE_EDITOR_ENABLED
#include "modules/code_editor/script_editor.h" #include "modules/editor_code_editor/script_editor.h"
#endif #endif
/* Static members */ /* Static members */
@ -2074,7 +2074,7 @@ bool Main::start() {
OS::get_singleton()->set_context(OS::CONTEXT_EDITOR); OS::get_singleton()->set_context(OS::CONTEXT_EDITOR);
#ifdef MODULE_CODE_EDITOR_ENABLED #ifdef MODULE_EDITOR_CODE_EDITOR_ENABLED
// Start debug server. // Start debug server.
if (!debug_server_uri.empty()) { if (!debug_server_uri.empty()) {
int idx = debug_server_uri.rfind(":"); int idx = debug_server_uri.rfind(":");

View File

@ -1,9 +0,0 @@
#ifndef CODE_EDITOR_REGISTER_TYPES_H
#define CODE_EDITOR_REGISTER_TYPES_H
#include "modules/register_module_types.h"
void register_code_editor_types(ModuleRegistrationLevel p_level);
void unregister_code_editor_types(ModuleRegistrationLevel p_level);
#endif

View File

@ -50,8 +50,8 @@ Ref<ResourceFormatSaverCScript> resource_saver_cscript;
#include "editor/editor_node.h" #include "editor/editor_node.h"
#include "editor/editor_settings.h" #include "editor/editor_settings.h"
#ifdef MODULE_CODE_EDITOR_ENABLED #ifdef MODULE_EDITOR_CODE_EDITOR_ENABLED
#include "modules/code_editor/script_editor.h" #include "modules/editor_code_editor/script_editor.h"
#endif #endif
class EditorExportCScript : public EditorExportPlugin { class EditorExportCScript : public EditorExportPlugin {
@ -160,7 +160,7 @@ void register_cscript_types(ModuleRegistrationLevel p_level) {
#ifdef TOOLS_ENABLED #ifdef TOOLS_ENABLED
if (p_level == MODULE_REGISTRATION_LEVEL_EDITOR) { if (p_level == MODULE_REGISTRATION_LEVEL_EDITOR) {
#ifdef MODULE_CODE_EDITOR_ENABLED #ifdef MODULE_EDITOR_CODE_EDITOR_ENABLED
ScriptEditor::register_create_syntax_highlighter_function(CScriptSyntaxHighlighter::create); ScriptEditor::register_create_syntax_highlighter_function(CScriptSyntaxHighlighter::create);
#endif #endif
EditorNode::add_init_callback(_editor_init); EditorNode::add_init_callback(_editor_init);

View File

@ -9,7 +9,7 @@
//#include "text_editor.h" //#include "text_editor.h"
//#include "code_text_editor.h" //#include "code_text_editor.h"
void register_code_editor_types(ModuleRegistrationLevel p_level) { void register_editor_code_editor_types(ModuleRegistrationLevel p_level) {
if (p_level == MODULE_REGISTRATION_LEVEL_SCENE) { if (p_level == MODULE_REGISTRATION_LEVEL_SCENE) {
//ClassDB::register_class<>(); //ClassDB::register_class<>();
ClassDB::register_virtual_class<ScriptEditor>(); ClassDB::register_virtual_class<ScriptEditor>();
@ -28,5 +28,5 @@ void register_code_editor_types(ModuleRegistrationLevel p_level) {
#endif #endif
} }
void unregister_code_editor_types(ModuleRegistrationLevel p_level) { void unregister_editor_code_editor_types(ModuleRegistrationLevel p_level) {
} }

View File

@ -0,0 +1,9 @@
#ifndef EDITOR_CODE_EDITOR_REGISTER_TYPES_H
#define EDITOR_CODE_EDITOR_REGISTER_TYPES_H
#include "modules/register_module_types.h"
void register_editor_code_editor_types(ModuleRegistrationLevel p_level);
void unregister_editor_code_editor_types(ModuleRegistrationLevel p_level);
#endif

View File

@ -50,8 +50,8 @@ Ref<ResourceFormatSaverGDScript> resource_saver_gd;
#include "editor/editor_settings.h" #include "editor/editor_settings.h"
#include "editor/gdscript_highlighter.h" #include "editor/gdscript_highlighter.h"
#ifdef MODULE_CODE_EDITOR_ENABLED #ifdef MODULE_EDITOR_CODE_EDITOR_ENABLED
#include "modules/code_editor/script_editor.h" #include "modules/editor_code_editor/script_editor.h"
#endif #endif
class EditorExportGDScript : public EditorExportPlugin { class EditorExportGDScript : public EditorExportPlugin {
@ -161,7 +161,7 @@ void register_gdscript_types(ModuleRegistrationLevel p_level) {
#ifdef TOOLS_ENABLED #ifdef TOOLS_ENABLED
if (p_level == MODULE_REGISTRATION_LEVEL_EDITOR) { if (p_level == MODULE_REGISTRATION_LEVEL_EDITOR) {
#ifdef MODULE_CODE_EDITOR_ENABLED #ifdef MODULE_EDITOR_CODE_EDITOR_ENABLED
ScriptEditor::register_create_syntax_highlighter_function(GDScriptSyntaxHighlighter::create); ScriptEditor::register_create_syntax_highlighter_function(GDScriptSyntaxHighlighter::create);
#endif #endif
EditorNode::add_init_callback(_editor_init); EditorNode::add_init_callback(_editor_init);