Author |
Topic |
|
sitnduck
Senior Member
47 Posts |
Posted - May 07 2012 : 10:20:01 AM
|
I'm not sure if this has been suggested before or not, but I would find it so useful and I've been waiting for so long, I thought I might give it a go.
It would be great if there was an option to have a "fix it!" button next to underlined errors. I understand that most errors may be tricky to get correctly, but there ARE a lot of low-hanging fruit that would save so much time! I really believe this is the next HUGE step in re-factoring! I'm thinking of something like a checkmark hovering next to the air (much like your arrow currently) that would go something like this:
MyUnincludedClass blah; ^ "MyUnincludedClass" is undefined in this file, but is defined in MyUnincludedClass.h. Add "#include "MyUnincludedClass.h"" after the last include statement in this file?
...or some variation, or giving you options if the class is defined in different files. Preferably it would detect simple forward declarations from the actual class declaration as well, etc. Of course this is only one example, but imagine writing a block of code then going click-click-click-click the fix all the nagging issues that usually require recompiling, code-browsing, etc.
This really feels like this would be a HUGE timesaver, and is well-within your technology. It could also start small (like re-factoring initially!) so users start getting accustomed to it, etc.
Anyhow, WHO'S WITH ME ON THIS?? :)
Francois
|
|
accord
Whole Tomato Software
United Kingdom
3287 Posts |
Posted - May 07 2012 : 2:58:18 PM
|
Interesting idea, I have put in a feature request for this:
case=66574
However, some of your ideas are already doable: first of all, are you aware that you can turn on the following option so a chevron icon will appear for some appropriate refactorings?
VA Options -> Advanced -> Refactorings -> Automatically show icon for suggested refactorings
For example, the chevron will appear when you type an unknown method, offering you a "Create method" refactoring. Or when you type a new method to a class it will offer you "Create implementation" and others.
Also, we have "Add include" refactoring, which you can use when you know you use a new class, or in VS2010 and VS11, VS will underline that function so you can use VA's "Add include" refactoring. It is not offered via the chevron yet, AFAIK.
Finally, you can turn on
VA Options -> Advanced -> Refactorings -> Include refactoring suggestions in listboxes
if it isn't turned on already. When you rename a symbol by typing over it, VA will offer you to rename the other occurrences as well.
Hope this helps. |
|
|
sitnduck
Senior Member
47 Posts |
Posted - May 08 2012 : 4:24:33 PM
|
Thank you! Yes I was aware of these and it reinforces my thinking that the technology is there to make it happen.
I do think a big part of this is about usability, like having a different-looking chevron for errors making it very obvious.
This is exciting, I really hope you guys at least experiment with this, as I think this is one feature we may wonder "how we ever got along without it" once it's done. :)
Thanks again, Francois
PS: is there a way to follow the case number somewhere?
|
|
|
accord
Whole Tomato Software
United Kingdom
3287 Posts |
|
sitnduck
Senior Member
47 Posts |
Posted - Nov 19 2012 : 08:25:45 AM
|
Any updates on this? I still think this would be a fantastic feature! (Actually someone told me the latest Xcode has something similar, but I think VisualAssist could blow it out of the water)...
Thanks! |
|
|
feline
Whole Tomato Software
United Kingdom
19021 Posts |
Posted - Nov 20 2012 : 2:16:57 PM
|
Unfortunately no news on this yet. It is still something we are considering, but it is one of several new features we are considering, so I don't currently have an estimate on if or when this will be done. |
zen is the art of being at one with the two'ness |
|
|
sitnduck
Senior Member
47 Posts |
Posted - Nov 21 2012 : 07:24:14 AM
|
Got it; once again please give it due consideration! It seems to be the way of the future! (if Xcode is any indication... I'm not a big fan but this is a nice feature they added)
Another thing such a feature would help is discovery of things you guys already do. For example most people on my team had no idea you could "add #include" automatically; if there was a "fix it->add #include" that popped up on error, they would get it automatically.
Thanks again, Francois |
|
|
feline
Whole Tomato Software
United Kingdom
19021 Posts |
Posted - Nov 22 2012 : 3:04:01 PM
|
Discoverability is a fair point, and a good question. Do any of you ever look at the tip of the day? Or did you turn it off the first time it appeared? I ask because there are various useful VA features that don't involve refactoring, which you might also not know about. Its easy to say they are listed in the documentation, but who reads that? |
zen is the art of being at one with the two'ness |
|
|
sitnduck
Senior Member
47 Posts |
Posted - Nov 23 2012 : 10:23:34 AM
|
To its credit, I have to say I actually learned a couple of things looking at the "tip of the day" message. It's probably why I left it on for as many as 5-6 times, as opposed to immediately turning it off... and that was about five years ago. I immediately turn it off now when I reinstall.
If discoverability will help implement this feature, then yes please consider that! :) It's a win-win-win feature, and I'm not kidding! :) It's 2012, we have the technology, why should I have to recompile, then seek code, then fix G?? when I could just immediately do a one-click to take care of all trivial fixes!
Having this feature could potentially REALLY change everyday work habits for programmers (and make a system WITHOUT VisualAssistX seem REALLY wanting, if you're used to always fixing issues by a click! ahem ahem...) :) |
|
|
feline
Whole Tomato Software
United Kingdom
19021 Posts |
Posted - Nov 29 2012 : 2:48:57 PM
|
Have you used XCode? This page lists the new features, and I am not seeing anything that sounds like what you are asking for here:
https://developer.apple.com/technologies/tools/whats-new.html
What sort of errors do you think VA could help you fix? If you use suggestion listboxes and member listboxes as you type this should cut down on to many typo's, but some are still going to get through.
If VA see's an unknown symbol, it does not know if this is a new variable, an existing symbol name mistyped, or something else. Add Include makes sense for this feature, but this is only one refactoring command, so all a fixit button is is a shortcut to Add Include.
In my experience with C++ missing semi colons are a fairly common problem, but this is not always easy to fix automatically, especially when macro's are being used heavily. So I am wondering what problems you are hoping VA can help you fix. |
zen is the art of being at one with the two'ness |
|
|
sitnduck
Senior Member
47 Posts |
Posted - Nov 30 2012 : 08:22:06 AM
|
I'm not a big Xcode user, but have seen it occasionally and thought it was in the right direction. Here is the feature: http://developer.apple.com/library/ios/#recipes/xcode_help-source_editor/Fix-it/Fix-it.html
As far as fixit being "just a shortcut", I strongly believe that sometimes just a slight UI change can make a huge difference, even if technically it adds "nothing". (The case of the Add Include being undiscovered is a good example)
Regarding which errors to fix, I think there are a LOT, this would be a matter of compiling a list based on usage, etc. If you are still not convinced, perhaps beginning with these easy ones as a proof of concept would be a great way to test this feature out! -Aforementioned add include -Missing semicolons -> if this is a problem perhaps in the first version it only looks for "obvious, easy cases" - = vs == (as in the video)
Further down the road we could have misspelled symbols (easy enough to give the option to ignore), mismatched brackets (probably tricky, perhaps obvious cases based on indentation), etc.
|
|
|
feline
Whole Tomato Software
United Kingdom
19021 Posts |
Posted - Dec 03 2012 : 8:37:56 PM
|
Thank you for the link, I can see what Xcode is doing now, == in a situation like this is normally going to be a mistake, so yes, this makes sense. I have put a note onto the case about this. Having a few different things that VA is looking for makes more sense here, rather than just one feature.
Spotting mismatched brackets is something we already do, and they are coloured a distinct, and user customisable colour to draw attention to them:
http://www.wholetomato.com/products/features/mismatch.asp
Unfortunately figuring out how to fix this is not so simple. If we can assume that the code is properly indented, and we understand the intending rules then this would help. Unfortunately if you have mismatched brackets then often the code indenting is also wrong, partly due to the auto intending feature in the IDE. |
zen is the art of being at one with the two'ness |
|
|
sitnduck
Senior Member
47 Posts |
Posted - Feb 26 2014 : 07:17:20 AM
|
Any updates on this? This would still be great!!!! |
|
|
feline
Whole Tomato Software
United Kingdom
19021 Posts |
Posted - Feb 26 2014 : 7:41:33 PM
|
Unfortunately no updates on this yet, we are still considering adding this though, I just don't have an estimate for if or when this will be done yet. |
zen is the art of being at one with the two'ness |
|
|
sitnduck
Senior Member
47 Posts |
Posted - Oct 02 2014 : 07:51:09 AM
|
Any updates on adding a "FIX IT" button? Would STILL be AWESOME. Try it internally and see how cool it would be!!! Please!!! :O
Thank you!
|
|
|
foxmuldr
Tomato Guru
USA
414 Posts |
Posted - Oct 02 2014 : 11:50:03 AM
|
feline, I would like a "Fix it" button also. And, if you can swing it, please add a separate "Easy" button as well. I'm sure I'd make regular use of that add-on. :-) |
|
|
feline
Whole Tomato Software
United Kingdom
19021 Posts |
Posted - Oct 02 2014 : 8:08:43 PM
|
We are actively looking into adding some form of fixit button, but I don't currently have an estimate for when something will be done, but hopefully sooner rather than later.
foxmuldr, what is an "Easy" button supposed to do, and how is this different to the fixit button already discussed here? |
zen is the art of being at one with the two'ness |
|
|
foxmuldr
Tomato Guru
USA
414 Posts |
Posted - Oct 02 2014 : 8:31:04 PM
|
http://www.youtube.com/watch?v=3YmMNpbFjp0
A company in the USA called Staples invented it for their advertising. You press it and it makes things easy. Specifically it is supposed to relate to how shopping at Staples can affect your life. "That was easy."
Best regards, Rick C. Hodgin
|
|
|
sitnduck
Senior Member
47 Posts |
Posted - Oct 03 2014 : 07:37:03 AM
|
Haha you guys are funny. XCode has had this for a while, but I think Visual Assist could implement it much better and it would be a great feature.
I think it would really stand out, and be used DAILY by most users, more than much more niche features like "extract free function".
That just sounds like a no-brainer to me, but hey, it's your call.
EDIT: typo |
Edited by - sitnduck on Oct 03 2014 07:37:38 AM |
|
|
foxmuldr
Tomato Guru
USA
414 Posts |
Posted - Oct 03 2014 : 08:44:55 AM
|
quote: Originally posted by sitnduck
XCode has had this for a while
Eclipse and Netbeans also both have it.
Best regards, Rick C. Hodgin
|
|
|
feline
Whole Tomato Software
United Kingdom
19021 Posts |
Posted - Oct 04 2014 : 7:54:15 PM
|
Because this should be useful and helpful we are looking to add something like this, but this, as it stands, is rather more vague and open ended than extracting a free function. Plus some of the time this is likely to leverage existing VA features, so having a useful set of features already in hand is rather helpful.
Balancing the various feature requests and bug reports we have is never easy, but we do try to make sensible decisions about how to compare things. |
zen is the art of being at one with the two'ness |
|
|
|
Topic |
|