You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-05 12:10:55 +00:00
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.
This commit is contained in:
@@ -119,7 +119,7 @@ public:
|
||||
virtual void get_script_method_list(List<MethodInfo> *p_list) const = 0;
|
||||
virtual void get_script_property_list(List<PropertyInfo> *p_list) const = 0;
|
||||
|
||||
virtual int get_member_line(const StringName &p_member) const { return 0; }
|
||||
virtual int get_member_line(const StringName &p_member) const { return -1; }
|
||||
|
||||
Script() {}
|
||||
};
|
||||
@@ -201,6 +201,7 @@ public:
|
||||
virtual bool has_named_classes() const = 0;
|
||||
virtual int find_function(const String &p_function, const String &p_code) const = 0;
|
||||
virtual String make_function(const String &p_class, const String &p_name, const PoolStringArray &p_args) const = 0;
|
||||
virtual Error open_in_external_editor(const Ref<Script> &p_script, int p_line, int p_col) { return ERR_UNAVAILABLE; }
|
||||
|
||||
virtual Error complete_code(const String &p_code, const String &p_base_path, Object *p_owner, List<String> *r_options, String &r_call_hint) { return ERR_UNAVAILABLE; }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user