godot/editor/plugins/script_editor_plugin.cpp

/**************************************************************************/
/*  script_editor_plugin.cpp                                              */
/**************************************************************************/
/*                         This file is part of:                          */
/*                             GODOT ENGINE                               */
/*                        https://godotengine.org                         */
/**************************************************************************/
/* Copyright (c) 2014-present Godot Engine contributors (see AUTHORS.md). */
/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur.                  */
/*                                                                        */
/* Permission is hereby granted, free of charge, to any person obtaining  */
/* a copy of this software and associated documentation files (the        */
/* "Software"), to deal in the Software without restriction, including    */
/* without limitation the rights to use, copy, modify, merge, publish,    */
/* distribute, sublicense, and/or sell copies of the Software, and to     */
/* permit persons to whom the Software is furnished to do so, subject to  */
/* the following conditions:                                              */
/*                                                                        */
/* The above copyright notice and this permission notice shall be         */
/* included in all copies or substantial portions of the Software.        */
/*                                                                        */
/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,        */
/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF     */
/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. */
/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY   */
/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,   */
/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE      */
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.                 */
/**************************************************************************/

#include "script_editor_plugin.h"

#include "core/config/project_settings.h"
#include "core/input/input.h"
#include "core/io/file_access.h"
#include "core/io/json.h"
#include "core/io/resource_loader.h"
#include "core/os/keyboard.h"
#include "core/os/os.h"
#include "core/version.h"
#include "editor/code_editor.h"
#include "editor/debugger/editor_debugger_node.h"
#include "editor/debugger/script_editor_debugger.h"
#include "editor/editor_command_palette.h"
#include "editor/editor_help_search.h"
#include "editor/editor_interface.h"
#include "editor/editor_main_screen.h"
#include "editor/editor_node.h"
#include "editor/editor_paths.h"
#include "editor/editor_script.h"
#include "editor/editor_settings.h"
#include "editor/editor_string_names.h"
#include "editor/filesystem_dock.h"
#include "editor/find_in_files.h"
#include "editor/gui/editor_bottom_panel.h"
#include "editor/gui/editor_file_dialog.h"
#include "editor/gui/editor_run_bar.h"
#include "editor/gui/editor_toaster.h"
#include "editor/inspector_dock.h"
#include "editor/node_dock.h"
#include "editor/plugins/editor_context_menu_plugin.h"
#include "editor/plugins/shader_editor_plugin.h"
#include "editor/plugins/text_shader_editor.h"
#include "editor/themes/editor_scale.h"
#include "editor/themes/editor_theme_manager.h"
#include "editor/window_wrapper.h"
#include "scene/gui/separator.h"
#include "scene/gui/texture_rect.h"
#include "scene/main/node.h"
#include "scene/main/window.h"
#include "script_text_editor.h"
#include "servers/display_server.h"
#include "text_editor.h"

/*** SYNTAX HIGHLIGHTER ****/

String EditorSyntaxHighlighter::_get_name() const {}

PackedStringArray EditorSyntaxHighlighter::_get_supported_languages() const {}

Ref<EditorSyntaxHighlighter> EditorSyntaxHighlighter::_create() const {}

void EditorSyntaxHighlighter::_bind_methods() {}

////

void EditorStandardSyntaxHighlighter::_update_cache() {}

Ref<EditorSyntaxHighlighter> EditorStandardSyntaxHighlighter::_create() const {}

////

Ref<EditorSyntaxHighlighter> EditorPlainTextSyntaxHighlighter::_create() const {}

////

void EditorJSONSyntaxHighlighter::_update_cache() {}

Ref<EditorSyntaxHighlighter> EditorJSONSyntaxHighlighter::_create() const {}

////

void EditorMarkdownSyntaxHighlighter::_update_cache() {}

Ref<EditorSyntaxHighlighter> EditorMarkdownSyntaxHighlighter::_create() const {}

////////////////////////////////////////////////////////////////////////////////

/*** SCRIPT EDITOR ****/

void ScriptEditorBase::_bind_methods() {}

class EditorScriptCodeCompletionCache : public ScriptCodeCompletionCache {};

void ScriptEditorQuickOpen::popup_dialog(const Vector<String> &p_functions, bool p_dontclear) {}

void ScriptEditorQuickOpen::_text_changed(const String &p_newtext) {}

void ScriptEditorQuickOpen::_sbox_input(const Ref<InputEvent> &p_event) {}

void ScriptEditorQuickOpen::_update_search() {}

void ScriptEditorQuickOpen::_confirmed() {}

void ScriptEditorQuickOpen::_notification(int p_what) {}

void ScriptEditorQuickOpen::_bind_methods() {}

ScriptEditorQuickOpen::ScriptEditorQuickOpen() {}

/////////////////////////////////

ScriptEditor *ScriptEditor::script_editor =;

/*** SCRIPT EDITOR ******/

String ScriptEditor::_get_debug_tooltip(const String &p_text, Node *_se) {}

void ScriptEditor::_breaked(bool p_breaked, bool p_can_debug) {}

void ScriptEditor::_script_created(Ref<Script> p_script) {}

void ScriptEditor::_goto_script_line2(int p_line) {}

void ScriptEditor::_goto_script_line(Ref<RefCounted> p_script, int p_line) {}

void ScriptEditor::_set_execution(Ref<RefCounted> p_script, int p_line) {}

void ScriptEditor::_clear_execution(Ref<RefCounted> p_script) {}

void ScriptEditor::_set_breakpoint(Ref<RefCounted> p_script, int p_line, bool p_enabled) {}

void ScriptEditor::_clear_breakpoints() {}

Array ScriptEditor::_get_cached_breakpoints_for_script(const String &p_path) const {}

ScriptEditorBase *ScriptEditor::_get_current_editor() const {}

void ScriptEditor::_update_history_arrows() {}

void ScriptEditor::_save_history() {}

void ScriptEditor::_save_previous_state(Dictionary p_state) {}

void ScriptEditor::_go_to_tab(int p_idx) {}

void ScriptEditor::_add_recent_script(const String &p_path) {}

void ScriptEditor::_update_recent_scripts() {}

void ScriptEditor::_open_recent_script(int p_idx) {}

void ScriptEditor::_show_error_dialog(const String &p_path) {}

void ScriptEditor::_close_tab(int p_idx, bool p_save, bool p_history_back) {}

void ScriptEditor::_close_current_tab(bool p_save, bool p_history_back) {}

void ScriptEditor::_close_discard_current_tab(const String &p_str) {}

void ScriptEditor::_close_docs_tab() {}

void ScriptEditor::_copy_script_path() {}

void ScriptEditor::_close_other_tabs() {}

void ScriptEditor::_close_all_tabs() {}

void ScriptEditor::_queue_close_tabs() {}

void ScriptEditor::_ask_close_current_unsaved_tab(ScriptEditorBase *current) {}

void ScriptEditor::_resave_scripts(const String &p_str) {}

void ScriptEditor::_res_saved_callback(const Ref<Resource> &p_res) {}

void ScriptEditor::_scene_saved_callback(const String &p_path) {}

void ScriptEditor::_mark_built_in_scripts_as_saved(const String &p_parent_path) {}

void ScriptEditor::trigger_live_script_reload(const String &p_script_path) {}

void ScriptEditor::trigger_live_script_reload_all() {}

void ScriptEditor::_live_auto_reload_running_scripts() {}

bool ScriptEditor::_test_script_times_on_disk(Ref<Resource> p_for_script) {}

void ScriptEditor::_file_dialog_action(const String &p_file) {}

Ref<Script> ScriptEditor::_get_current_script() {}

TypedArray<Script> ScriptEditor::_get_open_scripts() const {}

bool ScriptEditor::toggle_scripts_panel() {}

bool ScriptEditor::is_scripts_panel_toggled() {}

void ScriptEditor::_menu_option(int p_option) {}

void ScriptEditor::_theme_option(int p_option) {}

void ScriptEditor::_show_save_theme_as_dialog() {}

bool ScriptEditor::_has_docs_tab() const {}

bool ScriptEditor::_has_script_tab() const {}

void ScriptEditor::_prepare_file_menu() {}

void ScriptEditor::_file_menu_closed() {}

void ScriptEditor::_tab_changed(int p_which) {}

void ScriptEditor::_notification(int p_what) {}

bool ScriptEditor::can_take_away_focus() const {}

void ScriptEditor::_close_builtin_scripts_from_scene(const String &p_scene) {}

void ScriptEditor::edited_scene_changed() {}

void ScriptEditor::notify_script_close(const Ref<Script> &p_script) {}

void ScriptEditor::notify_script_changed(const Ref<Script> &p_script) {}

Vector<String> ScriptEditor::_get_breakpoints() {}

void ScriptEditor::get_breakpoints(List<String> *p_breakpoints) {}

void ScriptEditor::_members_overview_selected(int p_idx) {}

void ScriptEditor::_help_overview_selected(int p_idx) {}

void ScriptEditor::_script_selected(int p_idx) {}

void ScriptEditor::ensure_select_current() {}

bool ScriptEditor::is_editor_floating() {}

void ScriptEditor::_find_scripts(Node *p_base, Node *p_current, HashSet<Ref<Script>> &used) {}

struct _ScriptEditorItemData {};

void ScriptEditor::_update_members_overview_visibility() {}

void ScriptEditor::_toggle_members_overview_alpha_sort(bool p_alphabetic_sort) {}

void ScriptEditor::_update_members_overview() {}

void ScriptEditor::_update_help_overview_visibility() {}

void ScriptEditor::_update_help_overview() {}

void ScriptEditor::_update_online_doc() {}

void ScriptEditor::_update_script_colors() {}

void ScriptEditor::_update_script_names() {}

Ref<TextFile> ScriptEditor::_load_text_file(const String &p_path, Error *r_error) const {}

Error ScriptEditor::_save_text_file(Ref<TextFile> p_text_file, const String &p_path) {}

bool ScriptEditor::edit(const Ref<Resource> &p_resource, int p_line, int p_col, bool p_grab_focus) {}

PackedStringArray ScriptEditor::get_unsaved_scripts() const {}

void ScriptEditor::save_current_script() {}

void ScriptEditor::save_all_scripts() {}

void ScriptEditor::apply_scripts() const {}

void ScriptEditor::reload_scripts(bool p_refresh_only) {}

void ScriptEditor::_reload_scripts(bool p_refresh_only) {}

void ScriptEditor::open_script_create_dialog(const String &p_base_name, const String &p_base_path) {}

void ScriptEditor::open_text_file_create_dialog(const String &p_base_path, const String &p_base_name) {}

Ref<Resource> ScriptEditor::open_file(const String &p_file) {}

void ScriptEditor::_editor_stop() {}

void ScriptEditor::_add_callback(Object *p_obj, const String &p_function, const PackedStringArray &p_args) {}

void ScriptEditor::_save_editor_state(ScriptEditorBase *p_editor) {}

void ScriptEditor::_save_layout() {}

void ScriptEditor::_editor_settings_changed() {}

void ScriptEditor::_apply_editor_settings() {}

void ScriptEditor::_filesystem_changed() {}

void ScriptEditor::_files_moved(const String &p_old_file, const String &p_new_file) {}

void ScriptEditor::_file_removed(const String &p_removed_file) {}

void ScriptEditor::_update_find_replace_bar() {}

void ScriptEditor::_autosave_scripts() {}

void ScriptEditor::_update_autosave_timer() {}

void ScriptEditor::_tree_changed() {}

void ScriptEditor::_split_dragged(float) {}

Variant ScriptEditor::get_drag_data_fw(const Point2 &p_point, Control *p_from) {}

bool ScriptEditor::can_drop_data_fw(const Point2 &p_point, const Variant &p_data, Control *p_from) const {}

void ScriptEditor::drop_data_fw(const Point2 &p_point, const Variant &p_data, Control *p_from) {}

void ScriptEditor::input(const Ref<InputEvent> &p_event) {}

void ScriptEditor::shortcut_input(const Ref<InputEvent> &p_event) {}

void ScriptEditor::_script_list_clicked(int p_item, Vector2 p_local_mouse_pos, MouseButton p_mouse_button_index) {}

void ScriptEditor::_make_script_list_context_menu() {}

void ScriptEditor::set_window_layout(Ref<ConfigFile> p_layout) {}

void ScriptEditor::get_window_layout(Ref<ConfigFile> p_layout) {}

void ScriptEditor::_help_class_open(const String &p_class) {}

void ScriptEditor::_help_class_goto(const String &p_desc) {}

bool ScriptEditor::_help_tab_goto(const String &p_name, const String &p_desc) {}

void ScriptEditor::update_doc(const String &p_name) {}

void ScriptEditor::clear_docs_from_script(const Ref<Script> &p_script) {}

void ScriptEditor::update_docs_from_script(const Ref<Script> &p_script) {}

void ScriptEditor::_update_selected_editor_menu() {}

void ScriptEditor::_update_history_pos(int p_new_pos) {}

void ScriptEditor::_history_forward() {}

void ScriptEditor::_history_back() {}

Vector<Ref<Script>> ScriptEditor::get_open_scripts() const {}

TypedArray<ScriptEditorBase> ScriptEditor::_get_open_script_editors() const {}

void ScriptEditor::set_scene_root_script(Ref<Script> p_script) {}

bool ScriptEditor::script_goto_method(Ref<Script> p_script, const String &p_method) {}

void ScriptEditor::set_live_auto_reload_running_scripts(bool p_enabled) {}

void ScriptEditor::_help_search(const String &p_text) {}

void ScriptEditor::_open_script_request(const String &p_path) {}

void ScriptEditor::register_syntax_highlighter(const Ref<EditorSyntaxHighlighter> &p_syntax_highlighter) {}

void ScriptEditor::unregister_syntax_highlighter(const Ref<EditorSyntaxHighlighter> &p_syntax_highlighter) {}

int ScriptEditor::script_editor_func_count =;
CreateScriptEditorFunc ScriptEditor::script_editor_funcs[ScriptEditor::SCRIPT_EDITOR_FUNC_MAX];

void ScriptEditor::register_create_script_editor_function(CreateScriptEditorFunc p_func) {}

void ScriptEditor::_script_changed() {}

void ScriptEditor::_on_find_in_files_requested(const String &text) {}

void ScriptEditor::_on_replace_in_files_requested(const String &text) {}

void ScriptEditor::_on_find_in_files_result_selected(const String &fpath, int line_number, int begin, int end) {}

void ScriptEditor::_start_find_in_files(bool with_replace) {}

void ScriptEditor::_on_find_in_files_modified_files(const PackedStringArray &paths) {}

void ScriptEditor::_set_zoom_factor(float p_zoom_factor) {}

void ScriptEditor::_on_find_in_files_close_button_clicked() {}

void ScriptEditor::_window_changed(bool p_visible) {}

void ScriptEditor::_filter_scripts_text_changed(const String &p_newtext) {}

void ScriptEditor::_filter_methods_text_changed(const String &p_newtext) {}

void ScriptEditor::_bind_methods() {}

ScriptEditor::ScriptEditor(WindowWrapper *p_wrapper) {}

ScriptEditor::~ScriptEditor() {}

void ScriptEditorPlugin::_focus_another_editor() {}

void ScriptEditorPlugin::_save_last_editor(const String &p_editor) {}

void ScriptEditorPlugin::_window_visibility_changed(bool p_visible) {}

void ScriptEditorPlugin::_notification(int p_what) {}

void ScriptEditorPlugin::edit(Object *p_object) {}

bool ScriptEditorPlugin::handles(Object *p_object) const {}

void ScriptEditorPlugin::make_visible(bool p_visible) {}

void ScriptEditorPlugin::selected_notify() {}

String ScriptEditorPlugin::get_unsaved_status(const String &p_for_scene) const {}

void ScriptEditorPlugin::save_external_data() {}

void ScriptEditorPlugin::apply_changes() {}

void ScriptEditorPlugin::set_window_layout(Ref<ConfigFile> p_layout) {}

void ScriptEditorPlugin::get_window_layout(Ref<ConfigFile> p_layout) {}

void ScriptEditorPlugin::get_breakpoints(List<String> *p_breakpoints) {}

void ScriptEditorPlugin::edited_scene_changed() {}

ScriptEditorPlugin::ScriptEditorPlugin() {}

ScriptEditorPlugin::~ScriptEditorPlugin() {}