-
-
Notifications
You must be signed in to change notification settings - Fork 21.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Expose ScriptEditor::edit
to scripting
#55709
Conversation
doc/classes/EditorInterface.xml
Outdated
<argument index="2" name="column" type="int" default="0" /> | ||
<argument index="3" name="grab_focus" type="bool" default="true" /> | ||
<description> | ||
Edits the given [Script]. The line and column on which to open the script can also be specified. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Might be worth specifying how this works with user-configured external editor. And maybe add a backreference to it in edit_resource
to edit [Script] resources?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's a good point, I've added that information. I didn't want the description of edit_resource
to make it sound like they always have to use edit_script
for [Script], but I hope it doesn't make users get confused about which one they should use.
Basically, if you don't need to specify the line and column position I would recommend to use edit_resource
for everything since that will still use the properly configured editor and you don't have to worry about what type of resource it is. I don't want users to think they have to check the resource type before editing it if they don't care about the line and column position.
Exposes a method in `EditorInterface` to open scripts on a specified line and column. This method handles if the internal or the external editor should be used.
dac889e
to
9535831
Compare
would be very nice to back port to 3.4 when is approved. |
Thanks! |
Cherry-picked for 3.5. |
Cherry-picked for 3.4.1. |
Exposes a method in
EditorInterface
to open scripts on a specified line and column.This method handles if the internal or the external editor should be used.
Without this method, users can only use
EditorInterface::edit_resource
to open scripts but can't specify a line and/or column position.Closes #52294.