Added virtual methods track
Added virtual functions track
Features:
- Virtual functions are visible now (functions name in parent script begin with underscore)
- Can create virtual function if not exist in the current script (Save for refresh and sync the script-ide panel)
Example:
In the parent example:
Example of virtual functions
# parent_script.gd with virtual functions
func _my_function2override_by_child(args : Variant) -> void: pass
func _my_another_func() -> String: return ""
...
Thanks for the PR. The idea is interesting but pretty much out of scope for this kind of plugin. What I mean by that is:
- We do not do any parsing ourself. We simply just retrieve all variables/methods from the opened
GDScriptvia the methods Godot provides - We also do not do any code generation, so writing to a
GDScriptinstance - Checking other applications, the Outline typically shows only what is inside the corresponding file, not what may can be used from superclasses or interfaces. We follow that principle.
All that is done by design, to keep this plugin small, fast performance wise and without anything you may would not expect from an IDE. I follow leading IDEs like IntelliJ and VSCode and their functionality.
An interesting idea however is the ability to override method from the superclass, that are not already overridden.
Very similar to IntelliJ, where you can press: ALT+INSERT to open a dialog where you can choose to override methods from the superclass. This might be an interesting idea and proposal for this plugin and does not clutter the Outline.
Okey that's a good idea too. I'll work from the current master branch to incorporate that functionality into a popup.
Closing, as https://github.com/Maran23/script-ide/pull/101 is merged now!