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
 Is this implemented?
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

znakeeye
Tomato Guru

379 Posts

Posted - Dec 10 2007 :  02:47:18 AM  Show Profile  Reply with Quote
Consider the code below. The placing of the cursor soon becomes irritating.
str1.Trim();
str2.Trim();
str3.Trim(|)


Trim() has three different implementations, and the one I use most is the one without parameters. It would be nice if VAX had some internal counters to determine which method I am most likely to use next time.

Perhaps this is already implemented on some level?

feline
Whole Tomato Software

United Kingdom
18991 Posts

Posted - Dec 10 2007 :  11:28:47 AM  Show Profile  Reply with Quote
There is no current feature to do this. While the idea is interesting, I can also see some possible problems with it, mainly that it is likely to irritate people when VA gets this wrong.

We are considering the idea of moving the caret to after the function call if you type a semi-colon. Since this is not normally valid as part of the parameter list VA would know it was safe to move both the caret and the semi-colon to the end of the line.

case=296

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

znakeeye
Tomato Guru

379 Posts

Posted - Dec 11 2007 :  05:00:56 AM  Show Profile  Reply with Quote
Yeah, great idea!
Go to Top of Page

znakeeye
Tomato Guru

379 Posts

Posted - Dec 11 2007 :  08:35:00 AM  Show Profile  Reply with Quote
While we're at it; perhaps you should do this for ')' too. Consider this bar-function which has several overloaded types:
if (foo.bar(|)
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
18991 Posts

Posted - Dec 11 2007 :  09:36:57 AM  Show Profile  Reply with Quote
Brackets are much more tricky. VA already tries to be "intelligent" when it comes to inserting / replacing closing brackets.

There are very few cases where you would want a semi-colon in there, but there are lots where you will want brackets.

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 - Dec 12 2007 :  04:17:01 AM  Show Profile  Reply with Quote
Eclipse already does the move-caret-to-end-of-line-on-typing-';' thingie, and it's a great help. However, it also does it when you want to use string constants containing ';' (or at least the version I last used did). So this is an exception you might want to consider when treating special characters inside generated pairs of brackets.
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
18991 Posts

Posted - Dec 13 2007 :  2:46:16 PM  Show Profile  Reply with Quote
*ah* good edge case! I have put a note on the feature request about this, thank you.

zen is the art of being at one with the two'ness
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