T O P I C R E V I E W |
Uniwares |
Posted - Oct 09 2006 : 4:07:26 PM VS2005, C#
I am running frequently into the problem that the suggestion list is listing everything except the correct entry.
private Array m_Files = new Ar|;
At this point vax comes up with a suggestion list containing ArraySegment<> and ArrayTypeMismatchException, but no Array. I have to press Ctrl+Space to the the completion list which then defaults to have Array selected. I am seeing this frequently now with various built-in types/functions/classes as with my own. Kind of annoying and makes the suggestions useless.
I have "Get default contents from Intellisense" enabled. |
11 L A T E S T R E P L I E S (Newest First) |
Uniwares |
Posted - Oct 12 2006 : 10:01:50 AM Thats what we have VAX for |
feline |
Posted - Oct 12 2006 : 07:57:44 AM What about help for "lazy" people? I want the IDE to do more of this thinking for me, leaving me free to think about more interesting things. |
Uniwares |
Posted - Oct 11 2006 : 1:39:57 PM quote: Originally posted by feline
which begs the question, since the IDE knows the using statement is missing, why does it not make this more obvious? the smart tags are so "obvious" I had to prod the IDE before finding them.
Guess why they are called "smart" tags? Made for smart people! Smart people KNOW there is a tag to be clicked on. |
feline |
Posted - Oct 11 2006 : 1:35:43 PM which begs the question, since the IDE knows the using statement is missing, why does it not make this more obvious? the smart tags are so "obvious" I had to prod the IDE before finding them. |
Uniwares |
Posted - Oct 11 2006 : 1:01:52 PM quote: Originally posted by feline
ArrayList is a valid class name, the problem is that it is not currently valid, due to a missing using statement. With VA disabled the IDE will tell you this, but only after you have compiled the code, at which point the IDE underlines the errors.
In vs2005, the IDE will offer automatically ("instantly") to either add the using statement or extend the statement with the full namespace. No underlining, no compiling, just press shift+alt+f10 or click on the smarttag. |
feline |
Posted - Oct 11 2006 : 12:26:33 PM I see your point. It is the colouring code in VA that knows to make ArrayList blue, but this code has to run very quickly, so that it can colour things in real time.
ArrayList is a valid class name, the problem is that it is not currently valid, due to a missing using statement. With VA disabled the IDE will tell you this, but only after you have compiled the code, at which point the IDE underlines the errors.
Arguably VA should be underlining ArrayList to tell the user that this is not currently valid, but then you have the problem of VA's underlining having to work around the IDE's underlining. |
Uniwares |
Posted - Oct 10 2006 : 5:13:52 PM Ok, so lets pin it down then to another bug: erronous syntax coloring of a unknown (not yet included using) type. Since VAX colors the type Array/ArrayList/etc. already correctly, I automatically assume that VAX knows the type and will show it. Right? After all, thats the intention of enhanced syntax coloring, to make programming more intuitive.
One way or the other, VAX does something halfways only. |
feline |
Posted - Oct 10 2006 : 2:39:01 PM good news, I can reproduce this behaviour. However I don't think this is a VA bug. Using VS2005, VA 1538, and a new C# windows form project if i simply type the line:
ArrayList foo = new |
I will get a VA suggestion listbox at this time. completing the line to have:
ArrayList foo = new ArrayList();
gives me code that will not compile, since I have not added the correct using line for ArrayList. As soon as I add the correct using statement I no longer get a suggestion listbox.
Disabling VA, removing the using line, and retyping this, I get not listbox after typing new. If i force one with CTRL-SPACE then ArrayList is not in it. so a suggestion listbox from VA is appearing since the IDE does not have anything to offer.
as a side issue you may want to turn off "Show completion list after a character is typed" since with this turned on you will never, or very rarely, see autotext shortcuts work. |
Uniwares |
Posted - Oct 10 2006 : 09:26:20 AM Yes, i am getting suggestions - "sometime". After watching it closer it seems that it happens only for "new" types, when they are used the first time. Like, I've never before (session? file? class? dont know.) used, I am getting suggestions. After that it will be always a completion list. Uhm, does that make anybody more happy??
The "Show completion list after a charater is typed" was on, the rest is the same setting. But it doesnt seem to make much of a difference.
|
feline |
Posted - Oct 10 2006 : 08:58:43 AM as a test, using VS2005, VA 1538 and C# i have just typed in the following function:
private void testSuggest()
{
String str1 = new String();
String str2 = new String();
String str3 = new String();
String str4 = new String();
String str5 = new String();
String str6 = new String();
String str7 = new String();
String str8 = new String();
String str9 = new String();
}
it turns out this will not compile (it seems my C# is a bit rusty) but what was interesting was the suggestions. i was getting suggestions for the variable type, the variable name and new. but as soon as i got past new i immediately got a completion listbox, every single time.
would you expect to see a suggestion listbox after the new when typing this code? it seems you would.
in C# VA always gets the content of completion listboxes from the IDE, so default intellisense setting should not matter.
can you check you IDE settings please? under "IDE tools menu -> Options -> Text Editor -> C# -> IntelliSense" i have the following:
Show completion list after a charater is typed = Off Play keywords in completion lists = On Place code snippets in completion lists = On
Committed by pressing the space bar = On Add new line on commit with enter at end of fully typed word = Off IntelliSense pre-selects most recently used members = On |
Uniwares |
Posted - Oct 09 2006 : 4:39:19 PM Hmm, right. Well, Array would not be syntactically correct in this case after "new" since Array is abstract. Never the less, it happens and it happens with other (valid) types too. |
|
|