Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
 All Forums
 Visual Assist
 Feature Requests
 Suggestion after "new" keyword.

You must be registered to post a reply.
Click here to register.

Screensize:
UserName:
Password:
Format: BoldItalicizeUnderlineStrikethrough Align leftCenterAlign right Insert horizontal ruleUpload and insert imageInsert hyperlinkInsert email addressInsert codeInsert quoted textInsert listInsert Emoji
   
Message:

Forum code is on.
Html is off.

 
Check to subscribe to this topic.
   

T O P I C    R E V I E W
drzoom Posted - Dec 14 2006 : 07:52:44 AM
Preface: When I start typing "Foo* xxx = new " it's very common that I want so create an object from type "Foo" or a from "Foo" derived object.

Topic: There should be a suggestion for "Foo" and all derived types.

Your objections:
  • Unfortunately we are an add-in, and have to sneak around behind the IDE's back, so things that are easy when you control the IDE are very hard for us.

Bonus features to implement:
  • If the class only have a default constructor, the class should be inserted as "new Foo();".

  • The selected class is stored and the preferred class is displayed as first suggestion.


1   L A T E S T    R E P L I E S    (Newest First)
feline Posted - Dec 14 2006 : 09:37:08 AM
Do you have suggestions turned on? I do, and I have also turned on:

VA Options -> Text Editor -> suggestions -> Include bits of code from surrounding lines

In my experience within a character or two the type is suggested. Maybe not automatically, but VA already gets quite close. This is something that is available now, without having to wait for us to make any code changes

I do see the appeal here, you get a very similar effect in C# from the IDE its self.

The problem here is actually going to be performance. VA can find the derived classes, look at Find References, but you will not want to wait, as a programmer I will expect and demand the list appears NOW!

The HCB shows information on the base classes, but that is much faster to find. Working out the derived classes would require scanning the entire project, and building a complete class hierarchy tree, which then needs to be kept up to date.

© 2023 Whole Tomato Software, LLC Go To Top Of Page
Snitz Forums 2000