aboutsummaryrefslogtreecommitdiff
path: root/editor/plugins/script_editor_plugin.h
diff options
context:
space:
mode:
authorIgnacio Etcheverry2017-04-15 19:48:10 +0200
committerIgnacio Etcheverry2017-04-17 01:51:30 +0200
commit4b8568006d1f83d518d98ef3c7354b7c25de46cc (patch)
tree62d39934c808c4a53ea27fc6e1771b7b57da7136 /editor/plugins/script_editor_plugin.h
parentfce779a4ef02f1b14f95cab6a06e75db170f3448 (diff)
downloadgodot-4b8568006d1f83d518d98ef3c7354b7c25de46cc.tar.gz
godot-4b8568006d1f83d518d98ef3c7354b7c25de46cc.tar.zst
godot-4b8568006d1f83d518d98ef3c7354b7c25de46cc.zip
External editor improvements and fixes
Notable changes: - Now ScriptLanguages have the option to override the global external editor setting. If `ScriptLanguage::open_in_external_editor()` returns `ERR_UNAVAILABLE` (which it does by default), then the global external editor option will be used. - Added formatting to the external editor execution arguments. Now it's possible to write something like this: `{project} -g {file}:{line}:{col}`. - `VisualScript::get_member_line()` now can return the line of functions (well, it returns the id of the _Function_ node of the function). I guess there is nothing else we can get a "line" from. Fixes: - Fixes a bug where `ScriptEditor::script_goto_method()` would not work if the script is not already open in the built-in editor. - Fixes wrong DEFVAL for `cursor_set_column` and `cursor_set_line` in TextEdit. - `Script::get_member_line()` now returns -1 ("found nothing") by default.
Diffstat (limited to 'editor/plugins/script_editor_plugin.h')
-rw-r--r--editor/plugins/script_editor_plugin.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/editor/plugins/script_editor_plugin.h b/editor/plugins/script_editor_plugin.h
index 51d9bd3fc..f3bb5b554 100644
--- a/editor/plugins/script_editor_plugin.h
+++ b/editor/plugins/script_editor_plugin.h
@@ -95,7 +95,6 @@ public:
virtual void tag_saved_version() = 0;
virtual void reload(bool p_soft) = 0;
virtual void get_breakpoints(List<int> *p_breakpoints) = 0;
- virtual bool goto_method(const String &p_method) = 0;
virtual void add_callback(const String &p_function, PoolStringArray p_args) = 0;
virtual void update_settings() = 0;
virtual void set_debugger_active(bool p_active) = 0;
@@ -312,7 +311,9 @@ public:
void apply_scripts() const;
void ensure_select_current();
- void edit(const Ref<Script> &p_script, bool p_grab_focus = true);
+
+ _FORCE_INLINE_ bool edit(const Ref<Script> &p_script, bool p_grab_focus = true) { return edit(p_script, -1, 0, p_grab_focus); }
+ bool edit(const Ref<Script> &p_script, int p_line, int p_col, bool p_grab_focus = true);
Dictionary get_state() const;
void set_state(const Dictionary &p_state);
@@ -329,7 +330,7 @@ public:
void set_scene_root_script(Ref<Script> p_script);
- bool script_go_to_method(Ref<Script> p_script, const String &p_method);
+ bool script_goto_method(Ref<Script> p_script, const String &p_method);
virtual void edited_scene_changed();