-
-
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
Rename internal EditorPlugin icon/name to match exposed methods #98132
Rename internal EditorPlugin icon/name to match exposed methods #98132
Conversation
I assume get_plugin_name() is supposed to avoid conflict with Node's get_name(), and get_plugin_icon() is for consistency with the former. Using "plugin" in a plugin's method name is a bit redundant I think. |
3901319
to
b911bf4
Compare
@KoBeWi Yes, it is redundant, but it's a trade-off. While redundant, this is more consistent, more verbose, easier to grep, and easier for IDEs to deal with. |
I wouldn't list "more verbose" as improvement. Also IDEs are generally able to handle ambiguous names. |
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.
I personally agree with this one for the same reasons as PR #98039
b911bf4
to
7cdc67b
Compare
7cdc67b
to
0ab3dc2
Compare
Thanks! |
Same as PR #98039 but for EditorPlugin.
I noticed that the internal names of these functions were different from the names exposed to scripting. They were missing the
plugin
in the middle, in contrast toget_plugin_version
.This PR fixes the issue by renaming the internal functions, such that they look like this:
This PR preserves API compatibility with GDScript/C#/GDExtension/etc, which already use the
_get_plugin_*
names, however third-party engine modules may need to be updated to support the new name.I believe using a more verbose name is the better approach to take compared to simplifying the name. Using a more-unique name improves the ability to search for the function in the codebase using grep or global search, and significantly improves the speed at which IDEs can find all uses of it (since they usually find all tokens matching the name, and then do analysis to see which are actual matches). See also PR #36382 and PR #44263 for precedent.
Note, if third-party modules need to be compatible with both 4.3 and 4.4, that is easy to do with this: