-
Notifications
You must be signed in to change notification settings - Fork 26
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
Export symbol action #132
Comments
We would need to figure out:
|
I'd say the opposite, explain where it applies and expect users to think. At the end it won't be an automatic action. For a start it could just assume a simple old style package. More files? New style? Just don't use it, it is not for that.
Probably, as I said, I don't know what the plugin knows about .m file structure.
I'm not a fan of thinking too much for users. You can break things by renaming global symbols or localizing stuff that is a global symbol yet you can do this. p.s. for a new style package it could be a separate action. Once multi file standard is described there could be an action for that as well. Maybe in future they could be combined but I'd not aim to high right now. |
Based on my experience with other IDEs that messed up my code during refactoring, I would be extremely careful with adding a feature that has the potential to break your code in subtle and unexpected ways. If the feature does not work (e.g. doesn't do anything) in many cases, or even most cases, that is not a problem at all. But if "does not work" results in messing up my code, that's a problem. If there are cases where it messes up my code in ways that I might not immediately notice (e.g. when I'm tired and in a hurry), that's a very big problem. So the question for me is not "does it work?" but "what exactly happens when it doesn't work?" (And just to avoid misunderstandings, of course it would be a useful feature and of course I wished for this on multiple occasions.) |
Here is an idea: Something similar to when you hover on a closing bracket and it shows the opening if it is outside of current view range. Or like with search features. |
More thoughts on this: If this feature always inserts just a single line at the top level, that makes it a less risky action than other types of refactorings. (There are many ways to implement this, e.g. one possibility is to move the |
For me a symbol is fine enough for me as I keep my messages next to implementation. (I ofc know that not everyone does this). |
It takes some time to get to the top of the file, export a symbol and go back to editing it.
It would be nice to have a "Export Symbol" action that could put a symbol:
I understand that not every .m file has this structure or that the plugin may not aware of it so I wouldn't give that feature a high priority. Just feels like something that could be used a lot, similarly to 'Localize variable'.
The text was updated successfully, but these errors were encountered: