-
-
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
Renaming anything in Godot should rename their references #3163
Comments
This is a good idea, it could be a checkbox in the rename dialog On Tue, Dec 29, 2015 at 10:44 AM, RebelliousX [email protected]
|
This would be real nice. While doing it manually is possible, accidents or forgetfulness happen, this would completely negate the possibility of human error in that regard. |
There should be a kind of dialog that shows you everything that would get renamed though, and let you confirm or not if you want the rename to happen in all scripts and scenes. We don't want to brutally run |
This should be treated as "refactoring tools" and should be designed as such. Certainly individual refactoring tools can be added in steps, but I guess a proper design of those tools would be better to avoid being reworked later on. |
Just some small notice: This might be somehow related to new static typed language that is planned for 2.1, since with static typing there actually is a way for editor to know what exactly he is renaming, so it would be possible to avoid renaming 2 variables with the same name in different scopes. |
Given the importance of names and paths in Godot, this feature would be awesome. Would it be possible to do that too when a node or resource is moved to a different hierarchy level? |
Ping. It has been almost a year, I was wondering if this will make it in v3 which I doubt, but it would be great if it did!! I have seen long time ago (about 5 months ago) an attempt to similar behavior, please have a look at this youtube video, it has great concept that implement some of what this issue is about. |
It's been an while since the last post, but I thought I would +1 this issue since good refactoring tools are sorely missing. When you use any modern IDE like Eclipse (Java), you can right click and rename any object, variable, or method, and all instances referencing it will get updated over your entire project. Likewise in IDEs like Eclipse, you can also do things like change the method signature (parameter order), and then have all callers change their parameter orders too. Currently if I have to rename a global/shared variable, or a method in a class library, I'm always really worried that I broke something because I forgot to change all instances calling it. Coupled with the fact that debugging isn't multi-threaded (threads don't report errors, stop at breakpoints, etc), you could rename something and just suddenly have your whole project die, because you forgot to change one instance in something that is threaded (which causes an error to be thrown, but not to the user since debugging isn't multi-threaded). A real pain in deed! (^_^); |
Except GDScript is dynamically typed. This type of tools exist for
statically typed languages.
In 3.0 you will be able to use C# or C++ without recompiling if you prefer
this type of programming language.
…On Mon, May 29, 2017 at 1:04 PM, supercom32 ***@***.***> wrote:
It's been an while since the last post, but I thought I would +1 this
issue since good refactoring tools are sorely missing. When you use any
modern IDE like Eclipse (Java), you can right click and rename any object,
variable, or method, and all instances referencing it will get updated over
your entire project. Likewise in IDEs like Eclipse, you can also do things
like change the method signature (parameter order), and then have all
callers change their parameter orders too.
Currently if I have to rename a global/shared variable, or a method in a
class library, I'm always really worried that I broke something because I
forgot to change all instances calling it. Coupled with the fact that
debugging isn't multi-threaded (threads don't report errors, stop at
breakpoints, etc), you could rename something and just suddenly have your
whole project die, because you forgot to change one instance in something
that is threaded (which causes an error to be thrown, but not to the user
since debugging isn't multi-threaded). A real pain in deed! (^_^);
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#3163 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AF-Z2yltqvJH9yc30cf5M0z0qhBFGO3fks5r-ux0gaJpZM4G8Ut->
.
|
PyCharm manages to provide this functionality, despite Python being a dynamically/duck-typed language. So it's not impossible. I think it boils down to properly indexing the code? |
This comment has been minimized.
This comment has been minimized.
@kubecz3k Close this? Impossible until (optional) typing is added to GDScript. |
@mhilbrunner I think we will close when the issue will be resolved (optional typing is very high on our priority list) :) |
I just started using Godot, and I would just be happy if it worked on exported Script Variables that I've set in the inspector when I change a node's name that is that value. More practically, I think the value of the exported script variable should be linked to the nodes ID rather than it's string name and path but I'm uncertain if nodes even have a static ID that stays the same in all cases. |
@gff1979 that would work only if you export a |
This comment has been minimized.
This comment has been minimized.
|
Feature and improvement proposals for the Godot Engine are now being discussed and reviewed in a dedicated Godot Improvement Proposals (GIP) (godotengine/godot-proposals) issue tracker. The GIP tracker has a detailed issue template designed so that proposals include all the relevant information to start a productive discussion and help the community assess the validity of the proposal for the engine. The main (godotengine/godot) tracker is now solely dedicated to bug reports and Pull Requests, enabling contributors to have a better focus on bug fixing work. Therefore, we are now closing all older feature proposals on the main issue tracker. If you are interested in this feature proposal, please open a new proposal on the GIP tracker following the given issue template (after checking that it doesn't exist already). Be sure to reference this closed issue if it includes any relevant discussion (which you are also encouraged to summarize in the new proposal). Thanks in advance! |
I'm not sure if this is an enhancement, more of a bugfix (at least for the script variables use case) |
No, the currently implemented features are not buggy. What this asks for is a new feature. |
When renaming any kind of object in Godot, it should find all occurrences in scripts/editor
and change that as well. This can be achieved by parsing script files, any matching names for the changed scene/node, like "load(), preload(), set_script() get_node()..etc!) functions.
This should apply too to renaming variables, it would be great if when renaming a variable in script
it changes all occurrences in the script file.
The text was updated successfully, but these errors were encountered: