drzoom
Ketchup Master
Switzerland
57 Posts |
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.
|
best regards Tobias
|
|
feline
Whole Tomato Software
United Kingdom
19022 Posts |
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. |
zen is the art of being at one with the two'ness |
|
|