Godot: Open Script on Line number with EditorPlugin

Created on 13 Jun 2017  路  6Comments  路  Source: godotengine/godot

Operating system or device - Godot version:
2.1.3 Steam Stable

Using EditorPlugin;
May I suggest we add the option to open a script on a specific line?

This would be useful in the case of Jahn's TODO plugin - Instead of just opening the script, we could open it and navigate to a specific line number. :)

feature proposal junior job editor usability

Most helpful comment

Can the script editor be exposed to editor plugins instead of adding more functions to EditorPlugin?

All 6 comments

There's Go to Line already, shouldn't be hard to do.

@vnen yes, but I guess @Tybobobo meant that there is no way to get script editor reference.

Can the script editor be exposed to editor plugins instead of adding more functions to EditorPlugin?

It seems we have not ScriptEditor that can be fetch from EditorPlugin -> EditorInterface. I guess it would be a good place to add such function.

Is this a problem any more? I see that EditorInterface has a public get_script_editor() method that returns the ScriptEditor singleton.

@kareed44 no, because although there is an API for the script editor, it still does not expose a way to open a script at a given line. It doesn't expose access to the current TextEdit either.

Was this page helpful?
0 / 5 - 0 ratings