Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
User name:
Password:
Save Password
Forgot your password?

 All Forums
 Visual Assist
 Feature Requests
 Quick Fix
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

graham.reeds
Ketchup Master

United Kingdom
51 Posts

Posted - Apr 04 2008 :  04:55:39 AM  Show Profile  Reply with Quote
Been using Eclipse a lot recently and something I keep doing (and creating empty dialogs) is hitting CTRL+1 to quick fix items that are underlined.

In Eclipse you get a drop down box with several to choose from - create new class called x, import x, which sorts itself on the likely hood of you choosing. So if you create an instance of a class and there isn't one in the project and it doesn't map to a registered type the first choice would be to create a new class of that type. If there is a class of that name already then the import (include in C++land) is presented as the first. If you have a class of the name in your project then that is presented first with the others behind. If there is multiple choices then they are presented in alphabetical order. On functions it offers to add the function to the class (which is something I would like to see also in VA).

I helps to try it out:-)

Also is it possible to remap the CTRL+1 to the drop-down menu that you normally have to wait for to appear? I guess it would be but the trick is to know what the handle is.

feline
Whole Tomato Software

United Kingdom
18939 Posts

Posted - Apr 04 2008 :  09:46:35 AM  Show Profile  Reply with Quote
What language are you programming in in Eclipse?

As soon as you look at C++, and some of the template and macro heavy code people post here, it is often not at all clear what they would want done.

We are looking into a feature to suggest missing #include statements, but even that "simple" operation can be quite tricky in C++

case=226

zen is the art of being at one with the two'ness
Go to Top of Page

sl@sh
Tomato Guru

Switzerland
204 Posts

Posted - Apr 07 2008 :  05:50:01 AM  Show Profile  Reply with Quote
It's been a while I worked with Eclipse, but back then it was Java only. Since Java syntax is much more restricted than C(++) - or at least allows for less variants - it is also a lot easier to guess a fix for a syntax error. I doubt any C++ analyzer could get anywhere close to Eclipse 'autofixing' for this very reason.

IME, even simple errors such as missing ';' would be 'fixed' the wrong way more often than not if left to automatisms. (ok, maybe not the missing ';' error, but that's about the only case I can think of )

I'd rather have the IDE point out the error and suggest a short list of probable fixes and leave it to the developer to select the right one (provided it's in the list). This at least forces the developer to think about what exactly he needs.

Personally, I always try to code in a way that forces compiler errors anytime someone uses one of my interfaces in an improper way. This way I make sure people use the interface in a semantically correct way (well, most of the time anyway). Having the IDE (VAX or other) autofix such errors would be counterproductive: Educated(?) guessing that fixes the syntax but maybe breaks the intended semantics sounds dangerous to me - it might just make an existing error a lot harder to find, because the compiler doesn't complain anymore!
Go to Top of Page

support
Whole Tomato Software

5566 Posts

Posted - Jan 27 2009 :  10:25:53 PM  Show Profile  Reply with Quote
case=226 is implemented in build 1715
Hover over an unrecognized symbol and choose "Add include xxxx" from the refactoring context menu.


Whole Tomato Software, Inc.
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
© 2023 Whole Tomato Software, LLC Go To Top Of Page
Snitz Forums 2000