Renamed ScriptEditor to EditorScriptEditor.

This commit is contained in:
Relintai 2023-02-18 16:52:26 +01:00
parent 8f311ca275
commit 6026725f3b
33 changed files with 487 additions and 487 deletions

View File

@ -4,7 +4,7 @@
Godot editor's interface.
</brief_description>
<description>
EditorInterface gives you control over Godot editor's window. It allows customizing the window, saving and (re-)loading scenes, rendering mesh previews, inspecting and editing resources and objects, and provides access to [EditorSettings], [EditorFileSystem], [EditorResourcePreview], [ScriptEditor], the editor viewport, and information about scenes.
EditorInterface gives you control over Godot editor's window. It allows customizing the window, saving and (re-)loading scenes, rendering mesh previews, inspecting and editing resources and objects, and provides access to [EditorSettings], [EditorFileSystem], [EditorResourcePreview], [EditorScriptEditor], the editor viewport, and information about scenes.
[b]Note:[/b] This class shouldn't be instantiated directly. Instead, access the singleton using [method EditorPlugin.get_editor_interface].
</description>
<tutorials>
@ -113,9 +113,9 @@
</description>
</method>
<method name="get_script_editor">
<return type="ScriptEditor" />
<return type="EditorScriptEditor" />
<description>
Returns the editor's [ScriptEditor] instance.
Returns the editor's [EditorScriptEditor] instance.
[b]Warning:[/b] Removing and freeing this node will render a part of the editor useless and may cause a crash.
</description>
</method>

View File

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="ScriptEditor" inherits="PanelContainer" version="3.11">
<class name="EditorScriptEditor" inherits="PanelContainer" version="3.11">
<brief_description>
Godot editor's script editor.
</brief_description>

View File

@ -1521,7 +1521,7 @@ msgid "The [TranslationServer] singleton."
msgstr ""
#: doc/classes/@GlobalScope.xml
msgid "The [VisualScriptEditor] singleton."
msgid "The [VisualEditorScriptEditor] singleton."
msgstr ""
#: doc/classes/@GlobalScope.xml
@ -20929,7 +20929,7 @@ msgid ""
"customizing the window, saving and (re-)loading scenes, rendering mesh "
"previews, inspecting and editing resources and objects, and provides access "
"to [EditorSettings], [EditorFileSystem], [EditorResourcePreview], "
"[ScriptEditor], the editor viewport, and information about scenes.\n"
"[EditorScriptEditor], the editor viewport, and information about scenes.\n"
"[b]Note:[/b] This class shouldn't be instantiated directly. Instead, access "
"the singleton using [method EditorPlugin.get_editor_interface]."
msgstr ""
@ -21027,7 +21027,7 @@ msgstr ""
#: doc/classes/EditorInterface.xml
msgid ""
"Returns the editor's [ScriptEditor] instance.\n"
"Returns the editor's [EditorScriptEditor] instance.\n"
"[b]Warning:[/b] Removing and freeing this node will render a part of the "
"editor useless and may cause a crash."
msgstr ""
@ -54821,50 +54821,50 @@ msgstr ""
msgid "Emitted when the user clicks the OK button."
msgstr ""
#: doc/classes/ScriptEditor.xml
#: doc/classes/EditorScriptEditor.xml
msgid "Godot editor's script editor."
msgstr ""
#: doc/classes/ScriptEditor.xml
#: doc/classes/EditorScriptEditor.xml
msgid ""
"[b]Note:[/b] This class shouldn't be instantiated directly. Instead, access "
"the singleton using [method EditorInterface.get_script_editor]."
msgstr ""
#: doc/classes/ScriptEditor.xml
#: doc/classes/EditorScriptEditor.xml
msgid "Returns a [Script] that is currently active in editor."
msgstr ""
#: doc/classes/ScriptEditor.xml
#: doc/classes/EditorScriptEditor.xml
msgid ""
"Returns an array with all [Script] objects which are currently open in "
"editor."
msgstr ""
#: doc/classes/ScriptEditor.xml
#: doc/classes/EditorScriptEditor.xml
msgid "Goes to the specified line in the current script."
msgstr ""
#: doc/classes/ScriptEditor.xml
#: doc/classes/EditorScriptEditor.xml
msgid ""
"Opens the script create dialog. The script will extend [code]base_name[/"
"code]. The file extension can be omitted from [code]base_path[/code]. It "
"will be added based on the selected scripting language."
msgstr ""
#: doc/classes/ScriptEditor.xml
#: doc/classes/EditorScriptEditor.xml
msgid ""
"Reload all currently opened scripts from disk in case the file contents are "
"newer."
msgstr ""
#: doc/classes/ScriptEditor.xml
#: doc/classes/EditorScriptEditor.xml
msgid ""
"Emitted when user changed active script. Argument is a freshly activated "
"[Script]."
msgstr ""
#: doc/classes/ScriptEditor.xml
#: doc/classes/EditorScriptEditor.xml
msgid ""
"Emitted when editor is about to close the active script. Argument is a "
"[Script] that is going to be closed."
@ -68182,19 +68182,19 @@ msgstr ""
msgid "The type to deconstruct."
msgstr ""
#: modules/visual_script/doc_classes/VisualScriptEditor.xml
#: modules/visual_script/doc_classes/VisualEditorScriptEditor.xml
msgid ""
"Add a custom Visual Script node to the editor. It'll be placed under "
"\"Custom Nodes\" with the [code]category[/code] as the parameter."
msgstr ""
#: modules/visual_script/doc_classes/VisualScriptEditor.xml
#: modules/visual_script/doc_classes/VisualEditorScriptEditor.xml
msgid ""
"Remove a custom Visual Script node from the editor. Custom nodes already "
"placed on scripts won't be removed."
msgstr ""
#: modules/visual_script/doc_classes/VisualScriptEditor.xml
#: modules/visual_script/doc_classes/VisualEditorScriptEditor.xml
msgid "Emitted when a custom Visual Script node is added or removed."
msgstr ""

View File

@ -1557,7 +1557,7 @@ msgid "The [TranslationServer] singleton."
msgstr ""
#: doc/classes/@GlobalScope.xml
msgid "The [VisualScriptEditor] singleton."
msgid "The [VisualEditorScriptEditor] singleton."
msgstr ""
#: doc/classes/@GlobalScope.xml
@ -21001,7 +21001,7 @@ msgid ""
"customizing the window, saving and (re-)loading scenes, rendering mesh "
"previews, inspecting and editing resources and objects, and provides access "
"to [EditorSettings], [EditorFileSystem], [EditorResourcePreview], "
"[ScriptEditor], the editor viewport, and information about scenes.\n"
"[EditorScriptEditor], the editor viewport, and information about scenes.\n"
"[b]Note:[/b] This class shouldn't be instantiated directly. Instead, access "
"the singleton using [method EditorPlugin.get_editor_interface]."
msgstr ""
@ -21099,7 +21099,7 @@ msgstr ""
#: doc/classes/EditorInterface.xml
msgid ""
"Returns the editor's [ScriptEditor] instance.\n"
"Returns the editor's [EditorScriptEditor] instance.\n"
"[b]Warning:[/b] Removing and freeing this node will render a part of the "
"editor useless and may cause a crash."
msgstr ""
@ -54947,50 +54947,50 @@ msgstr ""
msgid "Emitted when the user clicks the OK button."
msgstr ""
#: doc/classes/ScriptEditor.xml
#: doc/classes/EditorScriptEditor.xml
msgid "Godot editor's script editor."
msgstr ""
#: doc/classes/ScriptEditor.xml
#: doc/classes/EditorScriptEditor.xml
msgid ""
"[b]Note:[/b] This class shouldn't be instantiated directly. Instead, access "
"the singleton using [method EditorInterface.get_script_editor]."
msgstr ""
#: doc/classes/ScriptEditor.xml
#: doc/classes/EditorScriptEditor.xml
msgid "Returns a [Script] that is currently active in editor."
msgstr ""
#: doc/classes/ScriptEditor.xml
#: doc/classes/EditorScriptEditor.xml
msgid ""
"Returns an array with all [Script] objects which are currently open in "
"editor."
msgstr ""
#: doc/classes/ScriptEditor.xml
#: doc/classes/EditorScriptEditor.xml
msgid "Goes to the specified line in the current script."
msgstr ""
#: doc/classes/ScriptEditor.xml
#: doc/classes/EditorScriptEditor.xml
msgid ""
"Opens the script create dialog. The script will extend [code]base_name[/"
"code]. The file extension can be omitted from [code]base_path[/code]. It "
"will be added based on the selected scripting language."
msgstr ""
#: doc/classes/ScriptEditor.xml
#: doc/classes/EditorScriptEditor.xml
msgid ""
"Reload all currently opened scripts from disk in case the file contents are "
"newer."
msgstr ""
#: doc/classes/ScriptEditor.xml
#: doc/classes/EditorScriptEditor.xml
msgid ""
"Emitted when user changed active script. Argument is a freshly activated "
"[Script]."
msgstr ""
#: doc/classes/ScriptEditor.xml
#: doc/classes/EditorScriptEditor.xml
msgid ""
"Emitted when editor is about to close the active script. Argument is a "
"[Script] that is going to be closed."
@ -68338,19 +68338,19 @@ msgstr ""
msgid "The type to deconstruct."
msgstr ""
#: modules/visual_script/doc_classes/VisualScriptEditor.xml
#: modules/visual_script/doc_classes/VisualEditorScriptEditor.xml
msgid ""
"Add a custom Visual Script node to the editor. It'll be placed under "
"\"Custom Nodes\" with the [code]category[/code] as the parameter."
msgstr ""
#: modules/visual_script/doc_classes/VisualScriptEditor.xml
#: modules/visual_script/doc_classes/VisualEditorScriptEditor.xml
msgid ""
"Remove a custom Visual Script node from the editor. Custom nodes already "
"placed on scripts won't be removed."
msgstr ""
#: modules/visual_script/doc_classes/VisualScriptEditor.xml
#: modules/visual_script/doc_classes/VisualEditorScriptEditor.xml
msgid "Emitted when a custom Visual Script node is added or removed."
msgstr ""

View File

@ -817,7 +817,7 @@ void ConnectionsDock::_go_to_script(TreeItem &item) {
}
#ifdef MODULE_EDITOR_CODE_EDITOR_ENABLED
if (script.is_valid() && ScriptEditor::get_singleton()->script_goto_method(script, c.method)) {
if (script.is_valid() && EditorScriptEditor::get_singleton()->script_goto_method(script, c.method)) {
editor->call("_editor_select", EditorNode::EDITOR_SCRIPT);
}
#endif

View File

@ -559,7 +559,7 @@ void EditorData::remove_scene(int p_idx) {
#ifdef MODULE_EDITOR_CODE_EDITOR_ENABLED
if (edited_scene[p_idx].path != String()) {
ScriptEditor::get_singleton()->close_builtin_scripts_from_scene(edited_scene[p_idx].path);
EditorScriptEditor::get_singleton()->close_builtin_scripts_from_scene(edited_scene[p_idx].path);
}
#endif

View File

@ -342,7 +342,7 @@ void EditorExportPlatform::gen_debug_flags(Vector<String> &r_flags, int p_flags)
r_flags.push_back(host + ":" + String::num(remote_port));
List<String> breakpoints;
ScriptEditor::get_singleton()->get_breakpoints(&breakpoints);
EditorScriptEditor::get_singleton()->get_breakpoints(&breakpoints);
if (breakpoints.size()) {
r_flags.push_back("--breakpoints");
@ -1269,7 +1269,7 @@ void EditorExportPlatform::gen_export_flags(Vector<String> &r_flags, int p_flags
r_flags.push_back(host + ":" + String::num(remote_port));
List<String> breakpoints;
ScriptEditor::get_singleton()->get_breakpoints(&breakpoints);
EditorScriptEditor::get_singleton()->get_breakpoints(&breakpoints);
if (breakpoints.size()) {
r_flags.push_back("--breakpoints");

View File

@ -1704,7 +1704,7 @@ EditorHelp::~EditorHelp() {
void EditorHelpBit::_go_to_help(String p_what) {
EditorNode::get_singleton()->set_visible_editor(EditorNode::EDITOR_SCRIPT);
#ifdef MODULE_EDITOR_CODE_EDITOR_ENABLED
ScriptEditor::get_singleton()->goto_help(p_what);
EditorScriptEditor::get_singleton()->goto_help(p_what);
#endif
emit_signal("request_hide");
}

View File

@ -590,7 +590,7 @@ void EditorNode::_notification(int p_what) {
#ifdef MODULE_EDITOR_CODE_EDITOR_ENABLED
// debugger area
if (ScriptEditor::get_singleton()->get_debugger()->is_visible()) {
if (EditorScriptEditor::get_singleton()->get_debugger()->is_visible()) {
bottom_panel->add_theme_style_override("panel", gui_base->get_theme_stylebox("BottomPanelDebuggerOverride", "EditorStyles"));
}
#endif
@ -2054,7 +2054,7 @@ void EditorNode::_edit_current(bool p_skip_foreign) {
inspector_dock->update(current_node);
#ifdef MODULE_EDITOR_CODE_EDITOR_ENABLED
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 && EditorScriptEditor::get_singleton()->is_visible_in_tree();
}
#endif
} else {
@ -2073,7 +2073,7 @@ void EditorNode::_edit_current(bool p_skip_foreign) {
} else {
Node *selected_node = nullptr;
if (current_obj->is_class("ScriptEditorDebuggerInspectedObject")) {
if (current_obj->is_class("EditorScriptEditorDebuggerInspectedObject")) {
editable_warning = TTR("This is a remote object, so changes to it won't be kept.\nPlease read the documentation relevant to debugging to better understand this workflow.");
disable_folding = true;
} else if (current_obj->is_class("MultiNodeEdit")) {
@ -2135,7 +2135,7 @@ void EditorNode::_edit_current(bool p_skip_foreign) {
main_plugin->edit(current_obj);
}
#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 && (!EditorScriptEditor::get_singleton() || !EditorScriptEditor::get_singleton()->is_visible_in_tree() || EditorScriptEditor::get_singleton()->can_take_away_focus())) {
// update screen main_plugin
_editor_select(plugin_index);
main_plugin->edit(current_obj);
@ -2241,7 +2241,7 @@ void EditorNode::_run(bool p_current, const String &p_custom) {
args = ProjectSettings::get_singleton()->get("editor/main_run_args");
#ifdef MODULE_EDITOR_CODE_EDITOR_ENABLED
skip_breakpoints = ScriptEditor::get_singleton()->get_debugger()->is_skip_breakpoints();
skip_breakpoints = EditorScriptEditor::get_singleton()->get_debugger()->is_skip_breakpoints();
#endif
emit_signal("play_pressed");
@ -2412,7 +2412,7 @@ void EditorNode::_menu_option_confirm(int p_option, bool p_confirmed) {
#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.
// Work around this by explicitly saving the script in this case (similar to pressing Ctrl + Alt + S).
ScriptEditor::get_singleton()->save_current_script();
EditorScriptEditor::get_singleton()->save_current_script();
#endif
}
@ -2731,7 +2731,7 @@ void EditorNode::_menu_option_confirm(int p_option, bool p_confirmed) {
debug_menu->get_popup()->set_item_checked(debug_menu->get_popup()->get_item_index(RUN_LIVE_DEBUG), !ischecked);
#ifdef MODULE_EDITOR_CODE_EDITOR_ENABLED
ScriptEditor::get_singleton()->get_debugger()->set_live_debugging(!ischecked);
EditorScriptEditor::get_singleton()->get_debugger()->set_live_debugging(!ischecked);
#endif
EditorSettings::get_singleton()->set_project_metadata("debug_options", "run_live_debug", !ischecked);
@ -2771,7 +2771,7 @@ void EditorNode::_menu_option_confirm(int p_option, bool p_confirmed) {
debug_menu->get_popup()->set_item_checked(debug_menu->get_popup()->get_item_index(RUN_RELOAD_SCRIPTS), !ischecked);
#ifdef MODULE_EDITOR_CODE_EDITOR_ENABLED
ScriptEditor::get_singleton()->set_live_auto_reload_running_scripts(!ischecked);
EditorScriptEditor::get_singleton()->set_live_auto_reload_running_scripts(!ischecked);
#endif
EditorSettings::get_singleton()->set_project_metadata("debug_options", "run_reload_scripts", !ischecked);
@ -3465,8 +3465,8 @@ void EditorNode::_set_main_scene_state(Dictionary p_state, Node *p_for_scene) {
//this should only happen at the very end
#ifdef MODULE_EDITOR_CODE_EDITOR_ENABLED
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()));
EditorScriptEditor::get_singleton()->get_debugger()->update_live_edit_root();
EditorScriptEditor::get_singleton()->set_scene_root_script(editor_data.get_scene_root_script(editor_data.get_edited_scene()));
#endif
editor_data.notify_edited_scene_changed();
}
@ -3699,7 +3699,7 @@ Error EditorNode::load_scene(const String &p_scene, bool p_ignore_broken_deps, b
scene_tree_dock->set_selected(new_scene);
#ifdef MODULE_EDITOR_CODE_EDITOR_ENABLED
ScriptEditor::get_singleton()->get_debugger()->update_live_edit_root();
EditorScriptEditor::get_singleton()->get_debugger()->update_live_edit_root();
#endif
push_item(new_scene);
@ -5130,7 +5130,7 @@ void EditorNode::_bottom_panel_switch(bool p_enable, int p_idx) {
}
#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 (EditorScriptEditor::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"));
} else {
bottom_panel->add_theme_style_override("panel", gui_base->get_theme_stylebox("panel", "TabContainer"));

View File

@ -152,7 +152,7 @@ void EditorPath::update_path() {
if (name == "") {
name = r->get_class();
}
} else if (obj->is_class("ScriptEditorDebuggerInspectedObject")) {
} else if (obj->is_class("EditorScriptEditorDebuggerInspectedObject")) {
name = obj->call("get_title");
} else if (Object::cast_to<Node>(obj)) {
name = Object::cast_to<Node>(obj)->get_name();

View File

@ -212,7 +212,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) {
#ifdef MODULE_EDITOR_CODE_EDITOR_ENABLED
ScriptEditor::get_singleton()->edit(p_script, p_line, p_col, p_grab_focus);
EditorScriptEditor::get_singleton()->edit(p_script, p_line, p_col, p_grab_focus);
#endif
}
@ -275,8 +275,8 @@ Array EditorInterface::get_open_scenes() const {
}
#ifdef MODULE_EDITOR_CODE_EDITOR_ENABLED
ScriptEditor *EditorInterface::get_script_editor() {
return ScriptEditor::get_singleton();
EditorScriptEditor *EditorInterface::get_script_editor() {
return EditorScriptEditor::get_singleton();
}
#endif

View File

@ -66,7 +66,7 @@ class EditorResourcePreview;
class EditorFileSystem;
class EditorToolAddons;
class FileSystemDock;
class ScriptEditor;
class EditorScriptEditor;
class ConfigFile;
class Control;
class EditorInspector;
@ -111,7 +111,7 @@ public:
Node *get_edited_scene_root();
Array get_open_scenes() const;
#ifdef MODULE_EDITOR_CODE_EDITOR_ENABLED
ScriptEditor *get_script_editor();
EditorScriptEditor *get_script_editor();
#endif
void select_file(const String &p_file);

View File

@ -69,9 +69,9 @@ Error EditorRun::run(const String &p_scene, const String &p_custom_args, const L
args.push_back("--remote-debug");
#ifdef MODULE_EDITOR_CODE_EDITOR_ENABLED
const String conn_string = ScriptEditor::get_singleton()->get_debugger()->get_connection_string();
const String conn_string = EditorScriptEditor::get_singleton()->get_debugger()->get_connection_string();
if (!conn_string.empty()) {
args.push_back(ScriptEditor::get_singleton()->get_debugger()->get_connection_string());
args.push_back(EditorScriptEditor::get_singleton()->get_debugger()->get_connection_string());
} else { // Try anyway with default settings
const String remote_host = EditorSettings::get_singleton()->get("network/debug/remote_host");
const int remote_port = (int)EditorSettings::get_singleton()->get("network/debug/remote_port");

View File

@ -609,8 +609,8 @@ Ref<Theme> create_editor_theme(const Ref<Theme> p_theme) {
theme->set_stylebox("CanvasItemInfoOverlay", "EditorStyles", style_canvas_editor_info);
// Script Editor
theme->set_stylebox("ScriptEditorPanel", "EditorStyles", make_empty_stylebox(default_margin_size, 0, default_margin_size, default_margin_size));
theme->set_stylebox("ScriptEditor", "EditorStyles", make_empty_stylebox(0, 0, 0, 0));
theme->set_stylebox("EditorScriptEditorPanel", "EditorStyles", make_empty_stylebox(default_margin_size, 0, default_margin_size, default_margin_size));
theme->set_stylebox("EditorScriptEditor", "EditorStyles", make_empty_stylebox(0, 0, 0, 0));
// Play button group
theme->set_stylebox("PlayButtonPanel", "EditorStyles", style_empty);

View File

@ -284,7 +284,7 @@ void InspectorDock::_prepare_history() {
}
} else if (Object::cast_to<Node>(obj)) {
text = Object::cast_to<Node>(obj)->get_name();
} else if (obj->is_class("ScriptEditorDebuggerInspectedObject")) {
} else if (obj->is_class("EditorScriptEditorDebuggerInspectedObject")) {
text = obj->call("get_title");
} else {
text = obj->get_class();

View File

@ -3910,9 +3910,9 @@ void CanvasItemEditor::_notification(int p_what) {
if (p_what == NOTIFICATION_VISIBILITY_CHANGED) {
if (!is_visible() && override_camera_button->is_pressed()) {
#ifdef MODULE_EDITOR_CODE_EDITOR_ENABLED
ScriptEditorDebugger *debugger = ScriptEditor::get_singleton()->get_debugger();
EditorScriptEditorDebugger *debugger = EditorScriptEditor::get_singleton()->get_debugger();
debugger->set_camera_override(ScriptEditorDebugger::OVERRIDE_NONE);
debugger->set_camera_override(EditorScriptEditorDebugger::OVERRIDE_NONE);
#endif
override_camera_button->set_pressed(false);
}
@ -4327,12 +4327,12 @@ void CanvasItemEditor::_button_toggle_grid_snap(bool p_status) {
}
void CanvasItemEditor::_button_override_camera(bool p_pressed) {
#ifdef MODULE_EDITOR_CODE_EDITOR_ENABLED
ScriptEditorDebugger *debugger = ScriptEditor::get_singleton()->get_debugger();
EditorScriptEditorDebugger *debugger = EditorScriptEditor::get_singleton()->get_debugger();
if (p_pressed) {
debugger->set_camera_override(ScriptEditorDebugger::OVERRIDE_2D);
debugger->set_camera_override(EditorScriptEditorDebugger::OVERRIDE_2D);
} else {
debugger->set_camera_override(ScriptEditorDebugger::OVERRIDE_NONE);
debugger->set_camera_override(EditorScriptEditorDebugger::OVERRIDE_NONE);
}
#endif
}
@ -5971,7 +5971,7 @@ void CanvasItemEditorViewport::_create_nodes(Node *parent, Node *child, String &
if (parent) {
#ifdef MODULE_EDITOR_CODE_EDITOR_ENABLED
String new_name = parent->validate_child_name(child);
ScriptEditorDebugger *sed = ScriptEditor::get_singleton()->get_debugger();
EditorScriptEditorDebugger *sed = EditorScriptEditor::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_undo_method(sed, "live_debug_remove_node", NodePath(String(editor->get_edited_scene()->get_path_to(parent)) + "/" + new_name));
#endif
@ -6043,7 +6043,7 @@ bool CanvasItemEditorViewport::_create_instance(Node *parent, String &path, cons
#ifdef MODULE_EDITOR_CODE_EDITOR_ENABLED
String new_name = parent->validate_child_name(instanced_scene);
ScriptEditorDebugger *sed = ScriptEditor::get_singleton()->get_debugger();
EditorScriptEditorDebugger *sed = EditorScriptEditor::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_undo_method(sed, "live_debug_remove_node", NodePath(String(editor->get_edited_scene()->get_path_to(parent)) + "/" + new_name));
#endif

View File

@ -4240,7 +4240,7 @@ bool SpatialEditorViewport::_create_instance(Node *parent, String &path, const P
#ifdef MODULE_EDITOR_CODE_EDITOR_ENABLED
String new_name = parent->validate_child_name(instanced_scene);
ScriptEditorDebugger *sed = ScriptEditor::get_singleton()->get_debugger();
EditorScriptEditorDebugger *sed = EditorScriptEditor::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_undo_method(sed, "live_debug_remove_node", NodePath(String(editor->get_edited_scene()->get_path_to(parent)) + "/" + new_name));
#endif
@ -5480,14 +5480,14 @@ void SpatialEditor::_menu_item_toggled(bool pressed, int p_option) {
case MENU_TOOL_OVERRIDE_CAMERA: {
#ifdef MODULE_EDITOR_CODE_EDITOR_ENABLED
ScriptEditorDebugger *const debugger = ScriptEditor::get_singleton()->get_debugger();
EditorScriptEditorDebugger *const debugger = EditorScriptEditor::get_singleton()->get_debugger();
if (pressed) {
using Override = ScriptEditorDebugger::CameraOverride;
using Override = EditorScriptEditorDebugger::CameraOverride;
debugger->set_camera_override((Override)(Override::OVERRIDE_3D_1 + camera_override_viewport_id));
} else {
debugger->set_camera_override(ScriptEditorDebugger::OVERRIDE_NONE);
debugger->set_camera_override(EditorScriptEditorDebugger::OVERRIDE_NONE);
}
#endif
} break;
@ -5538,11 +5538,11 @@ void SpatialEditor::_update_camera_override_viewport(Object *p_viewport) {
}
#ifdef MODULE_EDITOR_CODE_EDITOR_ENABLED
ScriptEditorDebugger *const debugger = ScriptEditor::get_singleton()->get_debugger();
EditorScriptEditorDebugger *const debugger = EditorScriptEditor::get_singleton()->get_debugger();
camera_override_viewport_id = current_viewport->index;
if (debugger->get_camera_override() >= ScriptEditorDebugger::OVERRIDE_3D_1) {
using Override = ScriptEditorDebugger::CameraOverride;
if (debugger->get_camera_override() >= EditorScriptEditorDebugger::OVERRIDE_3D_1) {
using Override = EditorScriptEditorDebugger::CameraOverride;
debugger->set_camera_override((Override)(Override::OVERRIDE_3D_1 + camera_override_viewport_id));
}
@ -6792,9 +6792,9 @@ void SpatialEditor::_notification(int p_what) {
} else if (p_what == NOTIFICATION_VISIBILITY_CHANGED) {
if (!is_visible() && tool_option_button[TOOL_OPT_OVERRIDE_CAMERA]->is_pressed()) {
#ifdef MODULE_EDITOR_CODE_EDITOR_ENABLED
ScriptEditorDebugger *debugger = ScriptEditor::get_singleton()->get_debugger();
EditorScriptEditorDebugger *debugger = EditorScriptEditor::get_singleton()->get_debugger();
debugger->set_camera_override(ScriptEditorDebugger::OVERRIDE_NONE);
debugger->set_camera_override(EditorScriptEditorDebugger::OVERRIDE_NONE);
#endif
tool_option_button[TOOL_OPT_OVERRIDE_CAMERA]->set_pressed(false);
}

View File

@ -283,7 +283,7 @@ void SceneTreeDock::_perform_instance_scenes(const Vector<String> &p_files, Node
#ifdef MODULE_EDITOR_CODE_EDITOR_ENABLED
String new_name = parent->validate_child_name(instanced_scene);
ScriptEditorDebugger *sed = ScriptEditor::get_singleton()->get_debugger();
EditorScriptEditorDebugger *sed = EditorScriptEditor::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_undo_method(sed, "live_debug_remove_node", NodePath(String(edited_scene->get_path_to(parent)).plus_file(new_name)));
#endif
@ -771,7 +771,7 @@ void SceneTreeDock::_tool_selected(int p_tool, bool p_confirm_override) {
editor_data->get_undo_redo().add_do_reference(dup);
#ifdef MODULE_EDITOR_CODE_EDITOR_ENABLED
ScriptEditorDebugger *sed = ScriptEditor::get_singleton()->get_debugger();
EditorScriptEditorDebugger *sed = EditorScriptEditor::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_undo_method(sed, "live_debug_remove_node", NodePath(String(edited_scene->get_path_to(parent)).plus_file(dup->get_name())));
#endif
@ -1006,7 +1006,7 @@ void SceneTreeDock::_tool_selected(int p_tool, bool p_confirm_override) {
List<Node *> selection = editor_selection->get_selected_node_list();
#ifdef MODULE_EDITOR_CODE_EDITOR_ENABLED
for (int i = 0; i < selection.size(); i++) {
ScriptEditor::get_singleton()->goto_help("class_name:" + selection[i]->get_class());
EditorScriptEditor::get_singleton()->goto_help("class_name:" + selection[i]->get_class());
}
#endif
EditorNode::get_singleton()->set_visible_editor(EditorNode::EDITOR_SCRIPT);
@ -1899,7 +1899,7 @@ void SceneTreeDock::_do_reparent(Node *p_new_parent, int p_position_in_parent, V
}
#ifdef MODULE_EDITOR_CODE_EDITOR_ENABLED
ScriptEditorDebugger *sed = ScriptEditor::get_singleton()->get_debugger();
EditorScriptEditorDebugger *sed = EditorScriptEditor::get_singleton()->get_debugger();
#endif
String old_name = former_names[ni];
String new_name = new_parent->validate_child_name(node);
@ -2180,7 +2180,7 @@ void SceneTreeDock::_delete_confirm(bool p_cut) {
editor_data->get_undo_redo().add_undo_reference(n);
#ifdef MODULE_EDITOR_CODE_EDITOR_ENABLED
ScriptEditorDebugger *sed = ScriptEditor::get_singleton()->get_debugger();
EditorScriptEditorDebugger *sed = EditorScriptEditor::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_undo_method(sed, "live_debug_restore_node", n->get_instance_id(), edited_scene->get_path_to(n->get_parent()), n->get_index());
#endif
@ -2278,7 +2278,7 @@ void SceneTreeDock::_do_create(Node *p_parent) {
#ifdef MODULE_EDITOR_CODE_EDITOR_ENABLED
String new_name = p_parent->validate_child_name(child);
ScriptEditorDebugger *sed = ScriptEditor::get_singleton()->get_debugger();
EditorScriptEditorDebugger *sed = EditorScriptEditor::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_undo_method(sed, "live_debug_remove_node", NodePath(String(edited_scene->get_path_to(p_parent)).plus_file(new_name)));
#endif

View File

@ -92,8 +92,8 @@
#include "scene/resources/style_box.h"
#include "scene/resources/texture.h"
class ScriptEditorDebuggerVariables : public Object {
GDCLASS(ScriptEditorDebuggerVariables, Object);
class EditorScriptEditorDebuggerVariables : public Object {
GDCLASS(EditorScriptEditorDebuggerVariables, Object);
List<PropertyInfo> props;
RBMap<StringName, Variant> values;
@ -147,12 +147,12 @@ public:
_change_notify();
}
ScriptEditorDebuggerVariables() {
EditorScriptEditorDebuggerVariables() {
}
};
class ScriptEditorDebuggerInspectedObject : public Object {
GDCLASS(ScriptEditorDebuggerInspectedObject, Object);
class EditorScriptEditorDebuggerInspectedObject : public Object {
GDCLASS(EditorScriptEditorDebuggerInspectedObject, Object);
protected:
bool _set(const StringName &p_name, const Variant &p_value) {
@ -188,10 +188,10 @@ protected:
}
static void _bind_methods() {
ClassDB::bind_method(D_METHOD("get_title"), &ScriptEditorDebuggerInspectedObject::get_title);
ClassDB::bind_method(D_METHOD("get_variant"), &ScriptEditorDebuggerInspectedObject::get_variant);
ClassDB::bind_method(D_METHOD("clear"), &ScriptEditorDebuggerInspectedObject::clear);
ClassDB::bind_method(D_METHOD("get_remote_object_id"), &ScriptEditorDebuggerInspectedObject::get_remote_object_id);
ClassDB::bind_method(D_METHOD("get_title"), &EditorScriptEditorDebuggerInspectedObject::get_title);
ClassDB::bind_method(D_METHOD("get_variant"), &EditorScriptEditorDebuggerInspectedObject::get_variant);
ClassDB::bind_method(D_METHOD("clear"), &EditorScriptEditorDebuggerInspectedObject::clear);
ClassDB::bind_method(D_METHOD("get_remote_object_id"), &EditorScriptEditorDebuggerInspectedObject::get_remote_object_id);
ADD_SIGNAL(MethodInfo("value_edited"));
}
@ -230,12 +230,12 @@ public:
_change_notify(p_prop);
}
ScriptEditorDebuggerInspectedObject() {
EditorScriptEditorDebuggerInspectedObject() {
remote_object_id = 0;
}
};
void ScriptEditorDebugger::debug_copy() {
void EditorScriptEditorDebugger::debug_copy() {
String msg = reason->get_text();
if (msg == "") {
return;
@ -243,7 +243,7 @@ void ScriptEditorDebugger::debug_copy() {
OS::get_singleton()->set_clipboard(msg);
}
void ScriptEditorDebugger::debug_skip_breakpoints() {
void EditorScriptEditorDebugger::debug_skip_breakpoints() {
skip_breakpoints_value = !skip_breakpoints_value;
if (skip_breakpoints_value) {
skip_breakpoints->set_icon(get_theme_icon("DebugSkipBreakpointsOn", "EditorIcons"));
@ -259,7 +259,7 @@ void ScriptEditorDebugger::debug_skip_breakpoints() {
}
}
void ScriptEditorDebugger::debug_next() {
void EditorScriptEditorDebugger::debug_next() {
ERR_FAIL_COND(!breaked);
ERR_FAIL_COND(connection.is_null());
ERR_FAIL_COND(!connection->is_connected_to_host());
@ -268,7 +268,7 @@ void ScriptEditorDebugger::debug_next() {
ppeer->put_var(msg);
_clear_execution();
}
void ScriptEditorDebugger::debug_step() {
void EditorScriptEditorDebugger::debug_step() {
ERR_FAIL_COND(!breaked);
ERR_FAIL_COND(connection.is_null());
ERR_FAIL_COND(!connection->is_connected_to_host());
@ -279,7 +279,7 @@ void ScriptEditorDebugger::debug_step() {
_clear_execution();
}
void ScriptEditorDebugger::debug_break() {
void EditorScriptEditorDebugger::debug_break() {
ERR_FAIL_COND(breaked);
ERR_FAIL_COND(connection.is_null());
ERR_FAIL_COND(!connection->is_connected_to_host());
@ -289,7 +289,7 @@ void ScriptEditorDebugger::debug_break() {
ppeer->put_var(msg);
}
void ScriptEditorDebugger::debug_continue() {
void EditorScriptEditorDebugger::debug_continue() {
ERR_FAIL_COND(!breaked);
ERR_FAIL_COND(connection.is_null());
ERR_FAIL_COND(!connection->is_connected_to_host());
@ -302,7 +302,7 @@ void ScriptEditorDebugger::debug_continue() {
ppeer->put_var(msg);
}
void ScriptEditorDebugger::_scene_tree_folded(Object *obj) {
void EditorScriptEditorDebugger::_scene_tree_folded(Object *obj) {
if (updating_scene_tree) {
return;
}
@ -320,7 +320,7 @@ void ScriptEditorDebugger::_scene_tree_folded(Object *obj) {
}
}
void ScriptEditorDebugger::_scene_tree_selected() {
void EditorScriptEditorDebugger::_scene_tree_selected() {
if (updating_scene_tree) {
return;
}
@ -337,7 +337,7 @@ void ScriptEditorDebugger::_scene_tree_selected() {
ppeer->put_var(msg);
}
void ScriptEditorDebugger::_scene_tree_rmb_selected(const Vector2 &p_position) {
void EditorScriptEditorDebugger::_scene_tree_rmb_selected(const Vector2 &p_position) {
TreeItem *item = inspect_scene_tree->get_item_at_position(p_position);
if (!item) {
return;
@ -352,7 +352,7 @@ void ScriptEditorDebugger::_scene_tree_rmb_selected(const Vector2 &p_position) {
item_menu->popup();
}
void ScriptEditorDebugger::_file_selected(const String &p_file) {
void EditorScriptEditorDebugger::_file_selected(const String &p_file) {
switch (file_dialog_mode) {
case SAVE_NODE: {
Array msg;
@ -429,7 +429,7 @@ void ScriptEditorDebugger::_file_selected(const String &p_file) {
}
}
void ScriptEditorDebugger::_scene_tree_property_value_edited(const String &p_prop, const Variant &p_value) {
void EditorScriptEditorDebugger::_scene_tree_property_value_edited(const String &p_prop, const Variant &p_value) {
Array msg;
msg.push_back("set_object_property");
msg.push_back(inspected_object_id);
@ -439,7 +439,7 @@ void ScriptEditorDebugger::_scene_tree_property_value_edited(const String &p_pro
inspect_edited_object_timeout = 0.7; //avoid annoyance, don't request soon after editing
}
void ScriptEditorDebugger::_scene_tree_property_select_object(ObjectID p_object) {
void EditorScriptEditorDebugger::_scene_tree_property_select_object(ObjectID p_object) {
inspected_object_id = p_object;
Array msg;
msg.push_back("inspect_object");
@ -447,7 +447,7 @@ void ScriptEditorDebugger::_scene_tree_property_select_object(ObjectID p_object)
ppeer->put_var(msg);
}
void ScriptEditorDebugger::_scene_tree_request() {
void EditorScriptEditorDebugger::_scene_tree_request() {
ERR_FAIL_COND(connection.is_null());
ERR_FAIL_COND(!connection->is_connected_to_host());
@ -477,7 +477,7 @@ void ScriptEditorDebugger::_scene_tree_request() {
/// |
/// |-E
///
int ScriptEditorDebugger::_update_scene_tree(TreeItem *parent, const Array &nodes, int current_index) {
int EditorScriptEditorDebugger::_update_scene_tree(TreeItem *parent, const Array &nodes, int current_index) {
String filter = EditorNode::get_singleton()->get_scene_tree_dock()->get_filter();
String item_text = nodes[current_index + 1];
String item_type = nodes[current_index + 2];
@ -543,7 +543,7 @@ int ScriptEditorDebugger::_update_scene_tree(TreeItem *parent, const Array &node
return items_count;
}
void ScriptEditorDebugger::_video_mem_request() {
void EditorScriptEditorDebugger::_video_mem_request() {
if (connection.is_null() || !connection->is_connected_to_host()) {
// Video RAM usage is only available while a project is being debugged.
return;
@ -554,7 +554,7 @@ void ScriptEditorDebugger::_video_mem_request() {
ppeer->put_var(msg);
}
void ScriptEditorDebugger::_video_mem_export() {
void EditorScriptEditorDebugger::_video_mem_export() {
file_dialog->set_mode(EditorFileDialog::MODE_SAVE_FILE);
file_dialog->set_access(EditorFileDialog::ACCESS_FILESYSTEM);
file_dialog->clear_filters();
@ -562,13 +562,13 @@ void ScriptEditorDebugger::_video_mem_export() {
file_dialog->popup_centered_ratio();
}
Size2 ScriptEditorDebugger::get_minimum_size() const {
Size2 EditorScriptEditorDebugger::get_minimum_size() const {
Size2 ms = MarginContainer::get_minimum_size();
ms.y = MAX(ms.y, 250 * EDSCALE);
return ms;
}
void ScriptEditorDebugger::_parse_message(const String &p_msg, const Array &p_data) {
void EditorScriptEditorDebugger::_parse_message(const String &p_msg, const Array &p_data) {
if (p_msg == "debug_enter") {
Array msg;
msg.push_back("get_stack_dump");
@ -626,7 +626,7 @@ void ScriptEditorDebugger::_parse_message(const String &p_msg, const Array &p_da
le_clear->set_disabled(false);
le_set->set_disabled(false);
} else if (p_msg == "message:inspect_object") {
ScriptEditorDebuggerInspectedObject *debug_obj = nullptr;
EditorScriptEditorDebuggerInspectedObject *debug_obj = nullptr;
ObjectID id = p_data[0];
String type = p_data[1];
@ -635,7 +635,7 @@ void ScriptEditorDebugger::_parse_message(const String &p_msg, const Array &p_da
if (remote_objects.has(id)) {
debug_obj = remote_objects[id];
} else {
debug_obj = memnew(ScriptEditorDebuggerInspectedObject);
debug_obj = memnew(EditorScriptEditorDebuggerInspectedObject);
debug_obj->remote_object_id = id;
debug_obj->type_name = type;
remote_objects[id] = debug_obj;
@ -1164,7 +1164,7 @@ void ScriptEditorDebugger::_parse_message(const String &p_msg, const Array &p_da
}
}
void ScriptEditorDebugger::_set_reason_text(const String &p_reason, MessageType p_type) {
void EditorScriptEditorDebugger::_set_reason_text(const String &p_reason, MessageType p_type) {
switch (p_type) {
case MESSAGE_ERROR:
reason->add_theme_color_override("font_color", get_theme_color("error_color", "Editor"));
@ -1179,11 +1179,11 @@ void ScriptEditorDebugger::_set_reason_text(const String &p_reason, MessageType
reason->set_tooltip(p_reason.word_wrap(80));
}
void ScriptEditorDebugger::_performance_select() {
void EditorScriptEditorDebugger::_performance_select() {
perf_draw->update();
}
void ScriptEditorDebugger::_performance_draw() {
void EditorScriptEditorDebugger::_performance_draw() {
Vector<int> which;
for (int i = 0; i < perf_items.size(); i++) {
if (perf_items[i]->is_checked(0)) {
@ -1314,7 +1314,7 @@ void ScriptEditorDebugger::_performance_draw() {
}
}
void ScriptEditorDebugger::_notification(int p_what) {
void EditorScriptEditorDebugger::_notification(int p_what) {
switch (p_what) {
case NOTIFICATION_ENTER_TREE: {
inspector->edit(variables);
@ -1352,7 +1352,7 @@ void ScriptEditorDebugger::_notification(int p_what) {
if (inspect_edited_object_timeout < 0) {
inspect_edited_object_timeout = EditorSettings::get_singleton()->get("debugger/remote_inspect_refresh_interval");
if (inspected_object_id) {
if (ScriptEditorDebuggerInspectedObject *obj = Object::cast_to<ScriptEditorDebuggerInspectedObject>(ObjectDB::get_instance(editor->get_editor_history()->get_current()))) {
if (EditorScriptEditorDebuggerInspectedObject *obj = Object::cast_to<EditorScriptEditorDebuggerInspectedObject>(ObjectDB::get_instance(editor->get_editor_history()->get_current()))) {
if (obj->remote_object_id == inspected_object_id) {
//take the chance and re-inspect selected object
Array msg;
@ -1580,7 +1580,7 @@ void ScriptEditorDebugger::_notification(int p_what) {
}
}
void ScriptEditorDebugger::_clear_execution() {
void EditorScriptEditorDebugger::_clear_execution() {
TreeItem *ti = stack_dump->get_selected();
if (!ti) {
return;
@ -1594,7 +1594,7 @@ void ScriptEditorDebugger::_clear_execution() {
stack_dump->clear();
}
void ScriptEditorDebugger::start(int p_port, const IP_Address &p_bind_address) {
void EditorScriptEditorDebugger::start(int p_port, const IP_Address &p_bind_address) {
if (is_inside_tree()) {
stop();
}
@ -1641,13 +1641,13 @@ void ScriptEditorDebugger::start(int p_port, const IP_Address &p_bind_address) {
camera_override = OVERRIDE_NONE;
}
void ScriptEditorDebugger::pause() {
void EditorScriptEditorDebugger::pause() {
}
void ScriptEditorDebugger::unpause() {
void EditorScriptEditorDebugger::unpause() {
}
void ScriptEditorDebugger::stop() {
void EditorScriptEditorDebugger::stop() {
set_process(false);
breaked = false;
_clear_execution();
@ -1691,7 +1691,7 @@ void ScriptEditorDebugger::stop() {
}
}
void ScriptEditorDebugger::_profiler_activate(bool p_enable) {
void EditorScriptEditorDebugger::_profiler_activate(bool p_enable) {
if (!connection.is_valid()) {
return;
}
@ -1714,7 +1714,7 @@ void ScriptEditorDebugger::_profiler_activate(bool p_enable) {
}
}
void ScriptEditorDebugger::_network_profiler_activate(bool p_enable) {
void EditorScriptEditorDebugger::_network_profiler_activate(bool p_enable) {
if (!connection.is_valid()) {
return;
}
@ -1733,7 +1733,7 @@ void ScriptEditorDebugger::_network_profiler_activate(bool p_enable) {
}
}
void ScriptEditorDebugger::_profiler_seeked() {
void EditorScriptEditorDebugger::_profiler_seeked() {
if (!connection.is_valid() || !connection->is_connected_to_host()) {
return;
}
@ -1744,7 +1744,7 @@ void ScriptEditorDebugger::_profiler_seeked() {
debug_break();
}
void ScriptEditorDebugger::_stack_dump_frame_selected() {
void EditorScriptEditorDebugger::_stack_dump_frame_selected() {
TreeItem *ti = stack_dump->get_selected();
if (!ti) {
return;
@ -1767,12 +1767,12 @@ void ScriptEditorDebugger::_stack_dump_frame_selected() {
}
}
void ScriptEditorDebugger::_output_clear() {
void EditorScriptEditorDebugger::_output_clear() {
//output->clear();
//output->push_color(Color(0,0,0));
}
void ScriptEditorDebugger::_export_csv() {
void EditorScriptEditorDebugger::_export_csv() {
file_dialog->set_mode(EditorFileDialog::MODE_SAVE_FILE);
file_dialog->set_access(EditorFileDialog::ACCESS_FILESYSTEM);
file_dialog->clear_filters();
@ -1780,14 +1780,14 @@ void ScriptEditorDebugger::_export_csv() {
file_dialog->popup_centered_ratio();
}
String ScriptEditorDebugger::get_var_value(const String &p_var) const {
String EditorScriptEditorDebugger::get_var_value(const String &p_var) const {
if (!breaked) {
return String();
}
return variables->get_var_value(p_var);
}
int ScriptEditorDebugger::_get_node_path_cache(const NodePath &p_path) {
int EditorScriptEditorDebugger::_get_node_path_cache(const NodePath &p_path) {
const int *r = node_path_cache.getptr(p_path);
if (r) {
return *r;
@ -1805,7 +1805,7 @@ int ScriptEditorDebugger::_get_node_path_cache(const NodePath &p_path) {
return last_path_id;
}
int ScriptEditorDebugger::_get_res_path_cache(const String &p_path) {
int EditorScriptEditorDebugger::_get_res_path_cache(const String &p_path) {
RBMap<String, int>::Element *E = res_path_cache.find(p_path);
if (E) {
@ -1824,7 +1824,7 @@ int ScriptEditorDebugger::_get_res_path_cache(const String &p_path) {
return last_path_id;
}
void ScriptEditorDebugger::_method_changed(Object *p_base, const StringName &p_name, VARIANT_ARG_DECLARE) {
void EditorScriptEditorDebugger::_method_changed(Object *p_base, const StringName &p_name, VARIANT_ARG_DECLARE) {
if (!p_base || !live_debug || !connection.is_valid() || !editor->get_edited_scene()) {
return;
}
@ -1877,7 +1877,7 @@ void ScriptEditorDebugger::_method_changed(Object *p_base, const StringName &p_n
}
}
void ScriptEditorDebugger::_property_changed(Object *p_base, const StringName &p_property, const Variant &p_value) {
void EditorScriptEditorDebugger::_property_changed(Object *p_base, const StringName &p_property, const Variant &p_value) {
if (!p_base || !live_debug || !connection.is_valid() || !editor->get_edited_scene()) {
return;
}
@ -1939,21 +1939,21 @@ void ScriptEditorDebugger::_property_changed(Object *p_base, const StringName &p
}
}
void ScriptEditorDebugger::_method_changeds(void *p_ud, Object *p_base, const StringName &p_name, VARIANT_ARG_DECLARE) {
ScriptEditorDebugger *sed = (ScriptEditorDebugger *)p_ud;
void EditorScriptEditorDebugger::_method_changeds(void *p_ud, Object *p_base, const StringName &p_name, VARIANT_ARG_DECLARE) {
EditorScriptEditorDebugger *sed = (EditorScriptEditorDebugger *)p_ud;
sed->_method_changed(p_base, p_name, VARIANT_ARG_PASS);
}
void ScriptEditorDebugger::_property_changeds(void *p_ud, Object *p_base, const StringName &p_property, const Variant &p_value) {
ScriptEditorDebugger *sed = (ScriptEditorDebugger *)p_ud;
void EditorScriptEditorDebugger::_property_changeds(void *p_ud, Object *p_base, const StringName &p_property, const Variant &p_value) {
EditorScriptEditorDebugger *sed = (EditorScriptEditorDebugger *)p_ud;
sed->_property_changed(p_base, p_property, p_value);
}
void ScriptEditorDebugger::set_live_debugging(bool p_enable) {
void EditorScriptEditorDebugger::set_live_debugging(bool p_enable) {
live_debug = p_enable;
}
void ScriptEditorDebugger::_live_edit_set() {
void EditorScriptEditorDebugger::_live_edit_set() {
if (!connection.is_valid()) {
return;
}
@ -1977,14 +1977,14 @@ void ScriptEditorDebugger::_live_edit_set() {
update_live_edit_root();
}
void ScriptEditorDebugger::_live_edit_clear() {
void EditorScriptEditorDebugger::_live_edit_clear() {
NodePath np = NodePath("/root");
editor->get_editor_data().set_edited_scene_live_edit_root(np);
update_live_edit_root();
}
void ScriptEditorDebugger::update_live_edit_root() {
void EditorScriptEditorDebugger::update_live_edit_root() {
NodePath np = editor->get_editor_data().get_edited_scene_live_edit_root();
if (connection.is_valid()) {
@ -2001,7 +2001,7 @@ void ScriptEditorDebugger::update_live_edit_root() {
live_edit_root->set_text(np);
}
void ScriptEditorDebugger::live_debug_create_node(const NodePath &p_parent, const String &p_type, const String &p_name) {
void EditorScriptEditorDebugger::live_debug_create_node(const NodePath &p_parent, const String &p_type, const String &p_name) {
if (live_debug && connection.is_valid()) {
Array msg;
msg.push_back("live_create_node");
@ -2012,7 +2012,7 @@ void ScriptEditorDebugger::live_debug_create_node(const NodePath &p_parent, cons
}
}
void ScriptEditorDebugger::live_debug_instance_node(const NodePath &p_parent, const String &p_path, const String &p_name) {
void EditorScriptEditorDebugger::live_debug_instance_node(const NodePath &p_parent, const String &p_path, const String &p_name) {
if (live_debug && connection.is_valid()) {
Array msg;
msg.push_back("live_instance_node");
@ -2022,7 +2022,7 @@ void ScriptEditorDebugger::live_debug_instance_node(const NodePath &p_parent, co
ppeer->put_var(msg);
}
}
void ScriptEditorDebugger::live_debug_remove_node(const NodePath &p_at) {
void EditorScriptEditorDebugger::live_debug_remove_node(const NodePath &p_at) {
if (live_debug && connection.is_valid()) {
Array msg;
msg.push_back("live_remove_node");
@ -2030,7 +2030,7 @@ void ScriptEditorDebugger::live_debug_remove_node(const NodePath &p_at) {
ppeer->put_var(msg);
}
}
void ScriptEditorDebugger::live_debug_remove_and_keep_node(const NodePath &p_at, ObjectID p_keep_id) {
void EditorScriptEditorDebugger::live_debug_remove_and_keep_node(const NodePath &p_at, ObjectID p_keep_id) {
if (live_debug && connection.is_valid()) {
Array msg;
msg.push_back("live_remove_and_keep_node");
@ -2039,7 +2039,7 @@ void ScriptEditorDebugger::live_debug_remove_and_keep_node(const NodePath &p_at,
ppeer->put_var(msg);
}
}
void ScriptEditorDebugger::live_debug_restore_node(ObjectID p_id, const NodePath &p_at, int p_at_pos) {
void EditorScriptEditorDebugger::live_debug_restore_node(ObjectID p_id, const NodePath &p_at, int p_at_pos) {
if (live_debug && connection.is_valid()) {
Array msg;
msg.push_back("live_restore_node");
@ -2049,7 +2049,7 @@ void ScriptEditorDebugger::live_debug_restore_node(ObjectID p_id, const NodePath
ppeer->put_var(msg);
}
}
void ScriptEditorDebugger::live_debug_duplicate_node(const NodePath &p_at, const String &p_new_name) {
void EditorScriptEditorDebugger::live_debug_duplicate_node(const NodePath &p_at, const String &p_new_name) {
if (live_debug && connection.is_valid()) {
Array msg;
msg.push_back("live_duplicate_node");
@ -2058,7 +2058,7 @@ void ScriptEditorDebugger::live_debug_duplicate_node(const NodePath &p_at, const
ppeer->put_var(msg);
}
}
void ScriptEditorDebugger::live_debug_reparent_node(const NodePath &p_at, const NodePath &p_new_place, const String &p_new_name, int p_at_pos) {
void EditorScriptEditorDebugger::live_debug_reparent_node(const NodePath &p_at, const NodePath &p_new_place, const String &p_new_name, int p_at_pos) {
if (live_debug && connection.is_valid()) {
Array msg;
msg.push_back("live_reparent_node");
@ -2070,11 +2070,11 @@ void ScriptEditorDebugger::live_debug_reparent_node(const NodePath &p_at, const
}
}
ScriptEditorDebugger::CameraOverride ScriptEditorDebugger::get_camera_override() const {
EditorScriptEditorDebugger::CameraOverride EditorScriptEditorDebugger::get_camera_override() const {
return camera_override;
}
void ScriptEditorDebugger::set_camera_override(CameraOverride p_override) {
void EditorScriptEditorDebugger::set_camera_override(CameraOverride p_override) {
if (p_override == OVERRIDE_2D && camera_override != OVERRIDE_2D) {
if (connection.is_valid()) {
Array msg;
@ -2108,7 +2108,7 @@ void ScriptEditorDebugger::set_camera_override(CameraOverride p_override) {
camera_override = p_override;
}
void ScriptEditorDebugger::set_breakpoint(const String &p_path, int p_line, bool p_enabled) {
void EditorScriptEditorDebugger::set_breakpoint(const String &p_path, int p_line, bool p_enabled) {
if (connection.is_valid()) {
Array msg;
msg.push_back("breakpoint");
@ -2119,7 +2119,7 @@ void ScriptEditorDebugger::set_breakpoint(const String &p_path, int p_line, bool
}
}
void ScriptEditorDebugger::reload_scripts() {
void EditorScriptEditorDebugger::reload_scripts() {
if (connection.is_valid()) {
Array msg;
msg.push_back("reload_scripts");
@ -2127,11 +2127,11 @@ void ScriptEditorDebugger::reload_scripts() {
}
}
bool ScriptEditorDebugger::is_skip_breakpoints() {
bool EditorScriptEditorDebugger::is_skip_breakpoints() {
return skip_breakpoints_value;
}
void ScriptEditorDebugger::_error_activated() {
void EditorScriptEditorDebugger::_error_activated() {
TreeItem *selected = error_tree->get_selected();
TreeItem *ci = selected->get_children();
@ -2140,7 +2140,7 @@ void ScriptEditorDebugger::_error_activated() {
}
}
void ScriptEditorDebugger::_error_selected() {
void EditorScriptEditorDebugger::_error_selected() {
TreeItem *selected = error_tree->get_selected();
Array meta = selected->get_metadata(0);
@ -2153,7 +2153,7 @@ void ScriptEditorDebugger::_error_selected() {
emit_signal("goto_script_line", s, int(meta[1]) - 1);
}
void ScriptEditorDebugger::_expand_errors_list() {
void EditorScriptEditorDebugger::_expand_errors_list() {
TreeItem *root = error_tree->get_root();
if (!root) {
return;
@ -2166,7 +2166,7 @@ void ScriptEditorDebugger::_expand_errors_list() {
}
}
void ScriptEditorDebugger::_collapse_errors_list() {
void EditorScriptEditorDebugger::_collapse_errors_list() {
TreeItem *root = error_tree->get_root();
if (!root) {
return;
@ -2179,28 +2179,28 @@ void ScriptEditorDebugger::_collapse_errors_list() {
}
}
void ScriptEditorDebugger::set_hide_on_stop(bool p_hide) {
void EditorScriptEditorDebugger::set_hide_on_stop(bool p_hide) {
hide_on_stop = p_hide;
}
bool ScriptEditorDebugger::get_debug_with_external_editor() const {
bool EditorScriptEditorDebugger::get_debug_with_external_editor() const {
return enable_external_editor;
}
String ScriptEditorDebugger::get_connection_string() const {
String EditorScriptEditorDebugger::get_connection_string() const {
String remote_host = EditorSettings::get_singleton()->get("network/debug/remote_host");
return remote_port ? remote_host + ":" + itos(remote_port) : "";
}
void ScriptEditorDebugger::set_debug_with_external_editor(bool p_enabled) {
void EditorScriptEditorDebugger::set_debug_with_external_editor(bool p_enabled) {
enable_external_editor = p_enabled;
}
Ref<Script> ScriptEditorDebugger::get_dump_stack_script() const {
Ref<Script> EditorScriptEditorDebugger::get_dump_stack_script() const {
return stack_script;
}
void ScriptEditorDebugger::_paused() {
void EditorScriptEditorDebugger::_paused() {
ERR_FAIL_COND(connection.is_null());
ERR_FAIL_COND(!connection->is_connected_to_host());
@ -2213,15 +2213,15 @@ void ScriptEditorDebugger::_paused() {
}
}
void ScriptEditorDebugger::_set_remote_object(ObjectID p_id, ScriptEditorDebuggerInspectedObject *p_obj) {
void EditorScriptEditorDebugger::_set_remote_object(ObjectID p_id, EditorScriptEditorDebuggerInspectedObject *p_obj) {
if (remote_objects.has(p_id)) {
memdelete(remote_objects[p_id]);
}
remote_objects[p_id] = p_obj;
}
void ScriptEditorDebugger::_clear_remote_objects() {
for (RBMap<ObjectID, ScriptEditorDebuggerInspectedObject *>::Element *E = remote_objects.front(); E; E = E->next()) {
void EditorScriptEditorDebugger::_clear_remote_objects() {
for (RBMap<ObjectID, EditorScriptEditorDebuggerInspectedObject *>::Element *E = remote_objects.front(); E; E = E->next()) {
if (editor->get_editor_history()->get_current() == E->value()->get_instance_id()) {
editor->push_item(nullptr);
}
@ -2231,7 +2231,7 @@ void ScriptEditorDebugger::_clear_remote_objects() {
remote_dependencies.clear();
}
void ScriptEditorDebugger::_clear_errors_list() {
void EditorScriptEditorDebugger::_clear_errors_list() {
error_tree->clear();
error_count = 0;
warning_count = 0;
@ -2239,7 +2239,7 @@ void ScriptEditorDebugger::_clear_errors_list() {
}
// Right click on specific file(s) or folder(s).
void ScriptEditorDebugger::_error_tree_item_rmb_selected(const Vector2 &p_pos) {
void EditorScriptEditorDebugger::_error_tree_item_rmb_selected(const Vector2 &p_pos) {
item_menu->clear();
item_menu->set_size(Size2(1, 1));
@ -2254,7 +2254,7 @@ void ScriptEditorDebugger::_error_tree_item_rmb_selected(const Vector2 &p_pos) {
}
}
void ScriptEditorDebugger::_item_menu_id_pressed(int p_option) {
void EditorScriptEditorDebugger::_item_menu_id_pressed(int p_option) {
switch (p_option) {
case ITEM_MENU_COPY_ERROR: {
TreeItem *ti = error_tree->get_selected();
@ -2356,62 +2356,62 @@ void ScriptEditorDebugger::_item_menu_id_pressed(int p_option) {
}
}
void ScriptEditorDebugger::_tab_changed(int p_tab) {
void EditorScriptEditorDebugger::_tab_changed(int p_tab) {
if (tabs->get_tab_title(p_tab) == TTR("Video RAM")) {
// "Video RAM" tab was clicked, refresh the data it's displaying when entering the tab.
_video_mem_request();
}
}
void ScriptEditorDebugger::_bind_methods() {
ClassDB::bind_method(D_METHOD("_stack_dump_frame_selected"), &ScriptEditorDebugger::_stack_dump_frame_selected);
void EditorScriptEditorDebugger::_bind_methods() {
ClassDB::bind_method(D_METHOD("_stack_dump_frame_selected"), &EditorScriptEditorDebugger::_stack_dump_frame_selected);
ClassDB::bind_method(D_METHOD("debug_skip_breakpoints"), &ScriptEditorDebugger::debug_skip_breakpoints);
ClassDB::bind_method(D_METHOD("debug_copy"), &ScriptEditorDebugger::debug_copy);
ClassDB::bind_method(D_METHOD("debug_skip_breakpoints"), &EditorScriptEditorDebugger::debug_skip_breakpoints);
ClassDB::bind_method(D_METHOD("debug_copy"), &EditorScriptEditorDebugger::debug_copy);
ClassDB::bind_method(D_METHOD("debug_next"), &ScriptEditorDebugger::debug_next);
ClassDB::bind_method(D_METHOD("debug_step"), &ScriptEditorDebugger::debug_step);
ClassDB::bind_method(D_METHOD("debug_break"), &ScriptEditorDebugger::debug_break);
ClassDB::bind_method(D_METHOD("debug_continue"), &ScriptEditorDebugger::debug_continue);
ClassDB::bind_method(D_METHOD("_output_clear"), &ScriptEditorDebugger::_output_clear);
ClassDB::bind_method(D_METHOD("_export_csv"), &ScriptEditorDebugger::_export_csv);
ClassDB::bind_method(D_METHOD("_performance_draw"), &ScriptEditorDebugger::_performance_draw);
ClassDB::bind_method(D_METHOD("_performance_select"), &ScriptEditorDebugger::_performance_select);
ClassDB::bind_method(D_METHOD("_scene_tree_request"), &ScriptEditorDebugger::_scene_tree_request);
ClassDB::bind_method(D_METHOD("_video_mem_request"), &ScriptEditorDebugger::_video_mem_request);
ClassDB::bind_method(D_METHOD("_video_mem_export"), &ScriptEditorDebugger::_video_mem_export);
ClassDB::bind_method(D_METHOD("_live_edit_set"), &ScriptEditorDebugger::_live_edit_set);
ClassDB::bind_method(D_METHOD("_live_edit_clear"), &ScriptEditorDebugger::_live_edit_clear);
ClassDB::bind_method(D_METHOD("debug_next"), &EditorScriptEditorDebugger::debug_next);
ClassDB::bind_method(D_METHOD("debug_step"), &EditorScriptEditorDebugger::debug_step);
ClassDB::bind_method(D_METHOD("debug_break"), &EditorScriptEditorDebugger::debug_break);
ClassDB::bind_method(D_METHOD("debug_continue"), &EditorScriptEditorDebugger::debug_continue);
ClassDB::bind_method(D_METHOD("_output_clear"), &EditorScriptEditorDebugger::_output_clear);
ClassDB::bind_method(D_METHOD("_export_csv"), &EditorScriptEditorDebugger::_export_csv);
ClassDB::bind_method(D_METHOD("_performance_draw"), &EditorScriptEditorDebugger::_performance_draw);
ClassDB::bind_method(D_METHOD("_performance_select"), &EditorScriptEditorDebugger::_performance_select);
ClassDB::bind_method(D_METHOD("_scene_tree_request"), &EditorScriptEditorDebugger::_scene_tree_request);
ClassDB::bind_method(D_METHOD("_video_mem_request"), &EditorScriptEditorDebugger::_video_mem_request);
ClassDB::bind_method(D_METHOD("_video_mem_export"), &EditorScriptEditorDebugger::_video_mem_export);
ClassDB::bind_method(D_METHOD("_live_edit_set"), &EditorScriptEditorDebugger::_live_edit_set);
ClassDB::bind_method(D_METHOD("_live_edit_clear"), &EditorScriptEditorDebugger::_live_edit_clear);
ClassDB::bind_method(D_METHOD("_error_selected"), &ScriptEditorDebugger::_error_selected);
ClassDB::bind_method(D_METHOD("_error_activated"), &ScriptEditorDebugger::_error_activated);
ClassDB::bind_method(D_METHOD("_expand_errors_list"), &ScriptEditorDebugger::_expand_errors_list);
ClassDB::bind_method(D_METHOD("_collapse_errors_list"), &ScriptEditorDebugger::_collapse_errors_list);
ClassDB::bind_method(D_METHOD("_profiler_activate"), &ScriptEditorDebugger::_profiler_activate);
ClassDB::bind_method(D_METHOD("_network_profiler_activate"), &ScriptEditorDebugger::_network_profiler_activate);
ClassDB::bind_method(D_METHOD("_profiler_seeked"), &ScriptEditorDebugger::_profiler_seeked);
ClassDB::bind_method(D_METHOD("_clear_errors_list"), &ScriptEditorDebugger::_clear_errors_list);
ClassDB::bind_method(D_METHOD("_error_selected"), &EditorScriptEditorDebugger::_error_selected);
ClassDB::bind_method(D_METHOD("_error_activated"), &EditorScriptEditorDebugger::_error_activated);
ClassDB::bind_method(D_METHOD("_expand_errors_list"), &EditorScriptEditorDebugger::_expand_errors_list);
ClassDB::bind_method(D_METHOD("_collapse_errors_list"), &EditorScriptEditorDebugger::_collapse_errors_list);
ClassDB::bind_method(D_METHOD("_profiler_activate"), &EditorScriptEditorDebugger::_profiler_activate);
ClassDB::bind_method(D_METHOD("_network_profiler_activate"), &EditorScriptEditorDebugger::_network_profiler_activate);
ClassDB::bind_method(D_METHOD("_profiler_seeked"), &EditorScriptEditorDebugger::_profiler_seeked);
ClassDB::bind_method(D_METHOD("_clear_errors_list"), &EditorScriptEditorDebugger::_clear_errors_list);
ClassDB::bind_method(D_METHOD("_error_tree_item_rmb_selected"), &ScriptEditorDebugger::_error_tree_item_rmb_selected);
ClassDB::bind_method(D_METHOD("_item_menu_id_pressed"), &ScriptEditorDebugger::_item_menu_id_pressed);
ClassDB::bind_method(D_METHOD("_tab_changed"), &ScriptEditorDebugger::_tab_changed);
ClassDB::bind_method(D_METHOD("_error_tree_item_rmb_selected"), &EditorScriptEditorDebugger::_error_tree_item_rmb_selected);
ClassDB::bind_method(D_METHOD("_item_menu_id_pressed"), &EditorScriptEditorDebugger::_item_menu_id_pressed);
ClassDB::bind_method(D_METHOD("_tab_changed"), &EditorScriptEditorDebugger::_tab_changed);
ClassDB::bind_method(D_METHOD("_paused"), &ScriptEditorDebugger::_paused);
ClassDB::bind_method(D_METHOD("_paused"), &EditorScriptEditorDebugger::_paused);
ClassDB::bind_method(D_METHOD("_scene_tree_selected"), &ScriptEditorDebugger::_scene_tree_selected);
ClassDB::bind_method(D_METHOD("_scene_tree_folded"), &ScriptEditorDebugger::_scene_tree_folded);
ClassDB::bind_method(D_METHOD("_scene_tree_rmb_selected"), &ScriptEditorDebugger::_scene_tree_rmb_selected);
ClassDB::bind_method(D_METHOD("_file_selected"), &ScriptEditorDebugger::_file_selected);
ClassDB::bind_method(D_METHOD("_scene_tree_selected"), &EditorScriptEditorDebugger::_scene_tree_selected);
ClassDB::bind_method(D_METHOD("_scene_tree_folded"), &EditorScriptEditorDebugger::_scene_tree_folded);
ClassDB::bind_method(D_METHOD("_scene_tree_rmb_selected"), &EditorScriptEditorDebugger::_scene_tree_rmb_selected);
ClassDB::bind_method(D_METHOD("_file_selected"), &EditorScriptEditorDebugger::_file_selected);
ClassDB::bind_method(D_METHOD("live_debug_create_node"), &ScriptEditorDebugger::live_debug_create_node);
ClassDB::bind_method(D_METHOD("live_debug_instance_node"), &ScriptEditorDebugger::live_debug_instance_node);
ClassDB::bind_method(D_METHOD("live_debug_remove_node"), &ScriptEditorDebugger::live_debug_remove_node);
ClassDB::bind_method(D_METHOD("live_debug_remove_and_keep_node"), &ScriptEditorDebugger::live_debug_remove_and_keep_node);
ClassDB::bind_method(D_METHOD("live_debug_restore_node"), &ScriptEditorDebugger::live_debug_restore_node);
ClassDB::bind_method(D_METHOD("live_debug_duplicate_node"), &ScriptEditorDebugger::live_debug_duplicate_node);
ClassDB::bind_method(D_METHOD("live_debug_reparent_node"), &ScriptEditorDebugger::live_debug_reparent_node);
ClassDB::bind_method(D_METHOD("_scene_tree_property_select_object"), &ScriptEditorDebugger::_scene_tree_property_select_object);
ClassDB::bind_method(D_METHOD("_scene_tree_property_value_edited"), &ScriptEditorDebugger::_scene_tree_property_value_edited);
ClassDB::bind_method(D_METHOD("live_debug_create_node"), &EditorScriptEditorDebugger::live_debug_create_node);
ClassDB::bind_method(D_METHOD("live_debug_instance_node"), &EditorScriptEditorDebugger::live_debug_instance_node);
ClassDB::bind_method(D_METHOD("live_debug_remove_node"), &EditorScriptEditorDebugger::live_debug_remove_node);
ClassDB::bind_method(D_METHOD("live_debug_remove_and_keep_node"), &EditorScriptEditorDebugger::live_debug_remove_and_keep_node);
ClassDB::bind_method(D_METHOD("live_debug_restore_node"), &EditorScriptEditorDebugger::live_debug_restore_node);
ClassDB::bind_method(D_METHOD("live_debug_duplicate_node"), &EditorScriptEditorDebugger::live_debug_duplicate_node);
ClassDB::bind_method(D_METHOD("live_debug_reparent_node"), &EditorScriptEditorDebugger::live_debug_reparent_node);
ClassDB::bind_method(D_METHOD("_scene_tree_property_select_object"), &EditorScriptEditorDebugger::_scene_tree_property_select_object);
ClassDB::bind_method(D_METHOD("_scene_tree_property_value_edited"), &EditorScriptEditorDebugger::_scene_tree_property_value_edited);
ADD_SIGNAL(MethodInfo("goto_script_line"));
ADD_SIGNAL(MethodInfo("set_execution", PropertyInfo("script"), PropertyInfo(Variant::INT, "line")));
@ -2420,7 +2420,7 @@ void ScriptEditorDebugger::_bind_methods() {
ADD_SIGNAL(MethodInfo("show_debugger", PropertyInfo(Variant::BOOL, "reallydid")));
}
ScriptEditorDebugger::ScriptEditorDebugger(EditorNode *p_editor) {
EditorScriptEditorDebugger::EditorScriptEditorDebugger(EditorNode *p_editor) {
add_theme_constant_override("margin_left", -EditorNode::get_singleton()->get_gui_base()->get_theme_stylebox("BottomPanelDebuggerOverride", "EditorStyles")->get_margin(MARGIN_LEFT));
add_theme_constant_override("margin_right", -EditorNode::get_singleton()->get_gui_base()->get_theme_stylebox("BottomPanelDebuggerOverride", "EditorStyles")->get_margin(MARGIN_RIGHT));
@ -2546,7 +2546,7 @@ ScriptEditorDebugger::ScriptEditorDebugger(EditorNode *p_editor) {
pending_in_queue = 0;
variables = memnew(ScriptEditorDebuggerVariables);
variables = memnew(EditorScriptEditorDebuggerVariables);
breaked = false;
@ -2811,7 +2811,7 @@ ScriptEditorDebugger::ScriptEditorDebugger(EditorNode *p_editor) {
EditorNode::get_singleton()->get_pause_button()->connect("pressed", this, "_paused");
}
ScriptEditorDebugger::~ScriptEditorDebugger() {
EditorScriptEditorDebugger::~EditorScriptEditorDebugger() {
memdelete(variables);
ppeer->set_stream_peer(Ref<StreamPeer>());

View File

@ -50,7 +50,7 @@
class Tree;
class EditorNode;
class ScriptEditorDebuggerVariables;
class EditorScriptEditorDebuggerVariables;
class LineEdit;
class TabContainer;
class RichTextLabel;
@ -61,7 +61,7 @@ class HSplitContainer;
class ItemList;
class EditorProfiler;
class EditorNetworkProfiler;
class ScriptEditorDebuggerInspectedObject;
class EditorScriptEditorDebuggerInspectedObject;
class Button;
class Control;
class EditorFileDialog;
@ -74,8 +74,8 @@ class StreamPeerTCP;
class TCP_Server;
class VBoxContainer;
class ScriptEditorDebugger : public MarginContainer {
GDCLASS(ScriptEditorDebugger, MarginContainer);
class EditorScriptEditorDebugger : public MarginContainer {
GDCLASS(EditorScriptEditorDebugger, MarginContainer);
public:
enum CameraOverride {
@ -118,8 +118,8 @@ private:
bool auto_switch_remote_scene_tree;
ObjectID inspected_object_id;
String last_filter;
ScriptEditorDebuggerVariables *variables;
RBMap<ObjectID, ScriptEditorDebuggerInspectedObject *> remote_objects;
EditorScriptEditorDebuggerVariables *variables;
RBMap<ObjectID, EditorScriptEditorDebuggerInspectedObject *> remote_objects;
RBSet<RES> remote_dependencies;
RBSet<ObjectID> unfold_cache;
@ -246,7 +246,7 @@ private:
void _paused();
void _set_remote_object(ObjectID p_id, ScriptEditorDebuggerInspectedObject *p_obj);
void _set_remote_object(ObjectID p_id, EditorScriptEditorDebuggerInspectedObject *p_obj);
void _clear_remote_objects();
void _clear_errors_list();
@ -313,8 +313,8 @@ public:
bool is_skip_breakpoints();
virtual Size2 get_minimum_size() const;
ScriptEditorDebugger(EditorNode *p_editor = nullptr);
~ScriptEditorDebugger();
EditorScriptEditorDebugger(EditorNode *p_editor = nullptr);
~EditorScriptEditorDebugger();
};
#endif // SCRIPT_EDITOR_DEBUGGER_H

View File

@ -149,7 +149,7 @@ void EditorSettingsDialog::_notification(int p_what) {
switch (p_what) {
case NOTIFICATION_READY: {
#ifdef MODULE_EDITOR_CODE_EDITOR_ENABLED
ScriptEditorDebugger *sed = ScriptEditor::get_singleton()->get_debugger();
EditorScriptEditorDebugger *sed = EditorScriptEditor::get_singleton()->get_debugger();
undo_redo->set_method_notify_callback(sed->_method_changeds, sed);
undo_redo->set_property_notify_callback(sed->_property_changeds, sed);
undo_redo->set_commit_notify_callback(_undo_redo_callback, this);

View File

@ -926,7 +926,7 @@ void EditorCodeTextEditor::_set_show_warnings_panel(bool p_show) {
}
void EditorCodeTextEditor::_toggle_scripts_pressed() {
toggle_scripts_button->set_icon(ScriptEditor::get_singleton()->toggle_scripts_panel() ? get_theme_icon("Back", "EditorIcons") : get_theme_icon("Forward", "EditorIcons"));
toggle_scripts_button->set_icon(EditorScriptEditor::get_singleton()->toggle_scripts_panel() ? get_theme_icon("Back", "EditorIcons") : get_theme_icon("Forward", "EditorIcons"));
}
void EditorCodeTextEditor::_error_pressed(const Ref<InputEvent> &p_event) {
@ -1066,7 +1066,7 @@ void EditorCodeTextEditor::show_toggle_scripts_button() {
}
void EditorCodeTextEditor::update_toggle_scripts_button() {
toggle_scripts_button->set_icon(ScriptEditor::get_singleton()->is_scripts_panel_toggled() ? get_theme_icon("Back", "EditorIcons") : get_theme_icon("Forward", "EditorIcons"));
toggle_scripts_button->set_icon(EditorScriptEditor::get_singleton()->is_scripts_panel_toggled() ? get_theme_icon("Back", "EditorIcons") : get_theme_icon("Forward", "EditorIcons"));
toggle_scripts_button->set_tooltip(TTR("Toggle Scripts Panel") + " (" + ED_GET_SHORTCUT("script_editor/toggle_scripts_panel")->get_as_text() + ")");
}

File diff suppressed because it is too large Load Diff

View File

@ -79,17 +79,17 @@ class ToolButton;
class Tree;
class VSplitContainer;
class EditorScriptEditorQuickOpen;
class ScriptEditorDebugger;
class EditorScriptEditorDebugger;
typedef SyntaxHighlighter *(*CreateSyntaxHighlighterFunc)();
typedef EditorScriptEditorBase *(*CreateScriptEditorFunc)(const RES &p_resource);
typedef EditorScriptEditorBase *(*CreateEditorScriptEditorFunc)(const RES &p_resource);
class EditorScriptCodeCompletionCache;
class FindInFilesDialog;
class FindInFilesPanel;
class ScriptEditor : public PanelContainer {
GDCLASS(ScriptEditor, PanelContainer);
class EditorScriptEditor : public PanelContainer {
GDCLASS(EditorScriptEditor, PanelContainer);
EditorNode *editor;
enum {
@ -185,7 +185,7 @@ class ScriptEditor : public PanelContainer {
AcceptDialog *error_dialog;
ConfirmationDialog *erase_tab_confirm;
ScriptCreateDialog *script_create_dialog;
ScriptEditorDebugger *debugger;
EditorScriptEditorDebugger *debugger;
ToolButton *scripts_visible;
String current_theme;
@ -206,7 +206,7 @@ class ScriptEditor : public PanelContainer {
};
static int script_editor_func_count;
static CreateScriptEditorFunc script_editor_funcs[SCRIPT_EDITOR_FUNC_MAX];
static CreateEditorScriptEditorFunc script_editor_funcs[SCRIPT_EDITOR_FUNC_MAX];
static int syntax_highlighters_func_count;
static CreateSyntaxHighlighterFunc syntax_highlighters_funcs[SYNTAX_HIGHLIGHTER_FUNC_MAX];
@ -367,14 +367,14 @@ class ScriptEditor : public PanelContainer {
static void _open_script_request(const String &p_path);
static ScriptEditor *script_editor;
static EditorScriptEditor *script_editor;
protected:
void _notification(int p_what);
static void _bind_methods();
public:
static ScriptEditor *get_singleton() { return script_editor; }
static EditorScriptEditor *get_singleton() { return script_editor; }
bool toggle_scripts_panel();
bool is_scripts_panel_toggled();
@ -414,14 +414,14 @@ public:
VSplitContainer *get_left_list_split() { return list_split; }
ScriptEditorDebugger *get_debugger() { return debugger; }
EditorScriptEditorDebugger *get_debugger() { return debugger; }
void set_live_auto_reload_running_scripts(bool p_enabled);
static void register_create_syntax_highlighter_function(CreateSyntaxHighlighterFunc p_func);
static void register_create_script_editor_function(CreateScriptEditorFunc p_func);
static void register_create_script_editor_function(CreateEditorScriptEditorFunc p_func);
ScriptEditor(EditorNode *p_editor);
~ScriptEditor();
EditorScriptEditor(EditorNode *p_editor);
~EditorScriptEditor();
};
#endif // SCRIPT_EDITOR_PLUGIN_H

View File

@ -731,7 +731,7 @@ static void _find_changed_scripts_for_external_editor(Node *p_base, Node *p_curr
}
}
void ScriptEditor::_update_modified_scripts_for_external_editor(Ref<Script> p_for_script) {
void EditorScriptEditor::_update_modified_scripts_for_external_editor(Ref<Script> p_for_script) {
if (!bool(EditorSettings::get_singleton()->get("text_editor/external/use_external_editor"))) {
return;
}
@ -832,7 +832,7 @@ void EditorScriptTextEditor::_breakpoint_item_pressed(int p_idx) {
}
void EditorScriptTextEditor::_breakpoint_toggled(int p_row) {
ScriptEditor::get_singleton()->get_debugger()->set_breakpoint(script->get_path(), p_row + 1, code_editor->get_text_edit()->is_line_set_as_breakpoint(p_row));
EditorScriptEditor::get_singleton()->get_debugger()->set_breakpoint(script->get_path(), p_row + 1, code_editor->get_text_edit()->is_line_set_as_breakpoint(p_row));
}
void EditorScriptTextEditor::_lookup_symbol(const String &p_symbol, int p_row, int p_column) {
@ -1208,7 +1208,7 @@ void EditorScriptTextEditor::_edit_option(int p_op) {
String selected_text = code_editor->get_text_edit()->get_selection_text();
// Yep, because it doesn't make sense to instance this dialog for every single script open...
// So this will be delegated to the ScriptEditor.
// So this will be delegated to the EditorScriptEditor.
emit_signal("search_in_files_requested", selected_text);
} break;
case REPLACE_IN_FILES: {
@ -1239,7 +1239,7 @@ void EditorScriptTextEditor::_edit_option(int p_op) {
int line = tx->cursor_get_line();
bool dobreak = !tx->is_line_set_as_breakpoint(line);
tx->set_line_as_breakpoint(line, dobreak);
ScriptEditor::get_singleton()->get_debugger()->set_breakpoint(script->get_path(), line + 1, dobreak);
EditorScriptEditor::get_singleton()->get_debugger()->set_breakpoint(script->get_path(), line + 1, dobreak);
} break;
case DEBUG_REMOVE_ALL_BREAKPOINTS: {
List<int> bpoints;
@ -1249,7 +1249,7 @@ void EditorScriptTextEditor::_edit_option(int p_op) {
int line = E->get();
bool dobreak = !tx->is_line_set_as_breakpoint(line);
tx->set_line_as_breakpoint(line, dobreak);
ScriptEditor::get_singleton()->get_debugger()->set_breakpoint(script->get_path(), line + 1, dobreak);
EditorScriptEditor::get_singleton()->get_debugger()->set_breakpoint(script->get_path(), line + 1, dobreak);
}
} break;
case DEBUG_GOTO_NEXT_BREAKPOINT: {
@ -2038,7 +2038,7 @@ void EditorScriptTextEditor::register_editor() {
ED_SHORTCUT("script_text_editor/goto_next_breakpoint", TTR("Go to Next Breakpoint"), KEY_MASK_CMD | KEY_PERIOD);
ED_SHORTCUT("script_text_editor/goto_previous_breakpoint", TTR("Go to Previous Breakpoint"), KEY_MASK_CMD | KEY_COMMA);
ScriptEditor::register_create_script_editor_function(create_editor);
EditorScriptEditor::register_create_script_editor_function(create_editor);
}
void EditorScriptTextEditor::validate() {

View File

@ -474,7 +474,7 @@ void TextEditor::_edit_option(int p_op) {
String selected_text = code_editor->get_text_edit()->get_selection_text();
// Yep, because it doesn't make sense to instance this dialog for every single script open...
// So this will be delegated to the ScriptEditor.
// So this will be delegated to the EditorScriptEditor.
emit_signal("search_in_files_requested", selected_text);
} break;
case REPLACE_IN_FILES: {
@ -523,7 +523,7 @@ static EditorScriptEditorBase *create_editor(const RES &p_resource) {
}
void TextEditor::register_editor() {
ScriptEditor::register_create_script_editor_function(create_editor);
EditorScriptEditor::register_create_script_editor_function(create_editor);
}
void TextEditor::_text_edit_gui_input(const Ref<InputEvent> &ev) {

View File

@ -12,7 +12,7 @@
void register_editor_code_editor_types(ModuleRegistrationLevel p_level) {
if (p_level == MODULE_REGISTRATION_LEVEL_SCENE) {
//ClassDB::register_class<>();
ClassDB::register_virtual_class<ScriptEditor>();
ClassDB::register_virtual_class<EditorScriptEditor>();
ClassDB::register_virtual_class<EditorScriptEditorBase>();
@ -23,7 +23,7 @@ void register_editor_code_editor_types(ModuleRegistrationLevel p_level) {
#ifdef TOOLS_ENABLED
if (p_level == MODULE_REGISTRATION_LEVEL_EDITOR) {
EditorPlugins::add_by_type<ScriptEditorPlugin>();
EditorPlugins::add_by_type<EditorScriptEditorPlugin>();
}
#endif
}

View File

@ -102,7 +102,7 @@ static bool _is_built_in_script(Script *p_script) {
return path.find("::") != -1;
}
void ScriptEditorPlugin::edit(Object *p_object) {
void EditorScriptEditorPlugin::edit(Object *p_object) {
if (Object::cast_to<Script>(p_object)) {
Script *p_script = Object::cast_to<Script>(p_object);
String res_path = p_script->get_path().get_slice("::", 0);
@ -122,7 +122,7 @@ void ScriptEditorPlugin::edit(Object *p_object) {
}
}
bool ScriptEditorPlugin::handles(Object *p_object) const {
bool EditorScriptEditorPlugin::handles(Object *p_object) const {
if (Object::cast_to<TextFile>(p_object)) {
return true;
}
@ -135,7 +135,7 @@ bool ScriptEditorPlugin::handles(Object *p_object) const {
return p_object->is_class("Script");
}
void ScriptEditorPlugin::make_visible(bool p_visible) {
void EditorScriptEditorPlugin::make_visible(bool p_visible) {
if (p_visible) {
script_editor->show();
script_editor->set_process(true);
@ -146,46 +146,46 @@ void ScriptEditorPlugin::make_visible(bool p_visible) {
}
}
void ScriptEditorPlugin::selected_notify() {
void EditorScriptEditorPlugin::selected_notify() {
script_editor->ensure_select_current();
}
void ScriptEditorPlugin::save_external_data() {
void EditorScriptEditorPlugin::save_external_data() {
script_editor->save_all_scripts();
}
void ScriptEditorPlugin::apply_changes() {
void EditorScriptEditorPlugin::apply_changes() {
script_editor->apply_scripts();
}
void ScriptEditorPlugin::restore_global_state() {
void EditorScriptEditorPlugin::restore_global_state() {
}
void ScriptEditorPlugin::save_global_state() {
void EditorScriptEditorPlugin::save_global_state() {
}
void ScriptEditorPlugin::set_window_layout(Ref<ConfigFile> p_layout) {
void EditorScriptEditorPlugin::set_window_layout(Ref<ConfigFile> p_layout) {
script_editor->set_window_layout(p_layout);
}
void ScriptEditorPlugin::get_window_layout(Ref<ConfigFile> p_layout) {
void EditorScriptEditorPlugin::get_window_layout(Ref<ConfigFile> p_layout) {
script_editor->get_window_layout(p_layout);
}
void ScriptEditorPlugin::get_breakpoints(List<String> *p_breakpoints) {
void EditorScriptEditorPlugin::get_breakpoints(List<String> *p_breakpoints) {
script_editor->get_breakpoints(p_breakpoints);
}
void ScriptEditorPlugin::edited_scene_changed() {
void EditorScriptEditorPlugin::edited_scene_changed() {
script_editor->edited_scene_changed();
}
ScriptEditorPlugin::ScriptEditorPlugin(EditorNode *p_node) {
EditorScriptEditorPlugin::EditorScriptEditorPlugin(EditorNode *p_node) {
EditorScriptTextEditor::register_editor(); //register one for text scripts
TextEditor::register_editor();
editor = p_node;
script_editor = memnew(ScriptEditor(p_node));
script_editor = memnew(EditorScriptEditor(p_node));
editor->get_viewport()->add_child(script_editor);
script_editor->set_v_size_flags(Control::SIZE_EXPAND_FILL);
@ -213,5 +213,5 @@ ScriptEditorPlugin::ScriptEditorPlugin(EditorNode *p_node) {
ED_SHORTCUT("script_editor/clear_recent", TTR("Clear Recent Scripts"));
}
ScriptEditorPlugin::~ScriptEditorPlugin() {
EditorScriptEditorPlugin::~EditorScriptEditorPlugin() {
}

View File

@ -33,12 +33,12 @@
#include "editor/editor_plugin.h"
class ScriptEditor;
class EditorScriptEditor;
class ScriptEditorPlugin : public EditorPlugin {
GDCLASS(ScriptEditorPlugin, EditorPlugin);
class EditorScriptEditorPlugin : public EditorPlugin {
GDCLASS(EditorScriptEditorPlugin, EditorPlugin);
ScriptEditor *script_editor;
EditorScriptEditor *script_editor;
EditorNode *editor;
public:
@ -62,8 +62,8 @@ public:
virtual void edited_scene_changed();
ScriptEditorPlugin(EditorNode *p_node);
~ScriptEditorPlugin();
EditorScriptEditorPlugin(EditorNode *p_node);
~EditorScriptEditorPlugin();
};
#endif // SCRIPT_EDITOR_PLUGIN_H

View File

@ -702,7 +702,7 @@ ShaderEditor::ShaderEditor(EditorNode *p_node) {
hbc->add_child(edit_menu);
hbc->add_child(goto_menu);
hbc->add_child(help_menu);
hbc->add_theme_style_override("panel", p_node->get_gui_base()->get_theme_stylebox("ScriptEditorPanel", "EditorStyles"));
hbc->add_theme_style_override("panel", p_node->get_gui_base()->get_theme_stylebox("EditorScriptEditorPanel", "EditorStyles"));
main_container->add_child(shader_editor);
goto_line_dialog = memnew(EditorGotoLineDialog);

View File

@ -2080,7 +2080,7 @@ bool Main::start() {
int idx = debug_server_uri.rfind(":");
IP_Address addr = debug_server_uri.substr(0, idx);
int port = debug_server_uri.substr(idx + 1).to_int();
ScriptEditor::get_singleton()->get_debugger()->start(port, addr);
EditorScriptEditor::get_singleton()->get_debugger()->start(port, addr);
}
#endif
}

View File

@ -161,7 +161,7 @@ void register_cscript_types(ModuleRegistrationLevel p_level) {
#ifdef TOOLS_ENABLED
if (p_level == MODULE_REGISTRATION_LEVEL_EDITOR) {
#ifdef MODULE_EDITOR_CODE_EDITOR_ENABLED
ScriptEditor::register_create_syntax_highlighter_function(CScriptSyntaxHighlighter::create);
EditorScriptEditor::register_create_syntax_highlighter_function(CScriptSyntaxHighlighter::create);
#endif
EditorNode::add_init_callback(_editor_init);
}

View File

@ -162,7 +162,7 @@ void register_gdscript_types(ModuleRegistrationLevel p_level) {
#ifdef TOOLS_ENABLED
if (p_level == MODULE_REGISTRATION_LEVEL_EDITOR) {
#ifdef MODULE_EDITOR_CODE_EDITOR_ENABLED
ScriptEditor::register_create_syntax_highlighter_function(GDScriptSyntaxHighlighter::create);
EditorScriptEditor::register_create_syntax_highlighter_function(GDScriptSyntaxHighlighter::create);
#endif
EditorNode::add_init_callback(_editor_init);
}