This to mee seems like its getting a little ridiculous with the intellisense. Is it really necessary to have intellisense pop up for Dim and As? I see this as overkill. Is there a way to turn off intellisense for keywords?
I'm also not sure I'm too happy with the lack of needing type declarations for variables. What happens when OptionStrict is off, is the type still implied? Its hard enough working on team projects and keeping track of other developers variables but adding on
top of that a feature that negates the need for a type is going to make that process even harder. Hopefully that can be turned off as well.
Option Infer is the option that controls whether or not a type is inferred. Option Strict is independent. Here's a chart to describe how the following line will behave given the various Option combinations:
Dim x = 10
Option Strict Off, Type Inference On -> x is an Integer
Option Strict Off, Type Inference Off -> x is an Object
Option Strict On, Type Inference On -> x is an Integer
Option Strict On, Type Inference Off-> Error: "Option Strict On requires all variable declarations to have an 'As' clause."
pre wrote:This to mee seems like its getting a little ridiculous with the intellisense. Is it really necessary to have intellisense pop up for Dim and As? I see this as overkill.
Having tried VS2008 Beta 2 it really is great! Once you try it I am sure you will love it too!
I agree that some keywords are more useful to show in intelliSense than others. So this is a question we certainly had to consider. However, in the end it felt better to be consistent and show the keywords wherever they could be used. That way there wouldn't
be any guessing about when intelliSense should show and when it should not...
When an intelliSense list appears at the beginning of the line, we also follow the principle that wherever an intelliSense list shows, all available options should be included in the list. 'Dim' might not be as useful to get from intelliSense, but 'Console'
might be. So we show both.
Please feel free to provide more feedback about how the experience feels once you get a chance to play around with the bits!
Thanks for the suggestion. I agree with the principles. We will continue thinking about more ways we can bring "Help" into the IDE. (But in a non-obtrusive way so that those who don't want it, won't get bogged down...)
rhm wrote:I was amazed at first watching this video. At about the 9 min mark they start talking about how the Orcas editor prompts with variable names at the start of lines whereas you supposedly had to type them in verbatim in previous versions. That's not true
at all and I'm wondering if the *PM* of the editor team doesn't know their own product very well or if they are intentionally misleading us to make Oracs look like more of an improvement than it actually is.
In VS2005, I have to type the complete variable name -- there is no intellisense showing me previously declared variables. Is there some setting in VS2005 to enable what you are referring to?
Yes, as I said in my comment, even going back to 2003 you could use ctrl-space to activate intellisence anywhere.
Dim aVariable As String
Then type "a" and hit ctrl-space. It's not as neat as what's been shown for orcas because the popup includes every symbol in scope that starts with the letter 'a'. But it will autocomplete when you've typed enough characters to disambiguate. In the example
above typing "av" and hitting ctrl-space will complete the variable name because it's the only symbol in scope that starts with "av".
Thanks for the example, it works I guess I don't need to upgrade to VS2008 now. J/K .... I can't wait for RTM to try out all the new features and improvements. Thx again.
As mentioned in the video, Ctrl+Space *is* a way that you can invoke intelliSense in versions previous to 2008. You can do that wherever variable names are expected, for example.
However, the changes in 2008 are more than just the fact that intelliSense now comes up automatically. For one, previous to 2008, intelliSense lists (even when invoked via Ctrl+Space) did not contain keywords. Now they do! ReadOnly, Select, MustInherit,
From, SyncLock, etc.
Secondly, 2008 also added more contextual lists. For example, part of the video showed intelliSense at work while typing declarations. For example, typing within an Enum, after the word 'MustInherit', etc. In each of these cases, 2008 shows a filtered list
based on what is possible to type at that location according to the VB grammar. Ctrl+Space in previous versions, in comparison, will show you "the world" in all of these contexts.
code snippets are not hard to add as an add-in to VS.NET 2003. This is definitely not a compelling feature of VS2005 to focus on. I know of a couple of add-ins out there that already do this. I can't wait until the release of VS2005 and the code snippets
backported for VS.NET 2003 use.
It is true that there are some VS.NET 2003 add-ins that help provide code for various tasks. However, these 2003 code snippets do not contain the same functionality as the feature in VS2005. I demonstrated a few of these enhancements in the video: replacement
fields with intellisense and tooltip instructions, automatic imports statements, and automatic references.
badriram wrote:The code snippets look cool, but does anyone know if the snippets are actually stored in Program Files, and if you have to be an admin to add Code snippets. Cause that would be annoying.
Edit: I guess I can add other directories, just cant edit the prebuilt ones.
The defaults are stored there, but there is a folder in "My Documents/Visual Studio 2005" where you can put your own.
Tools -> Code Snippets Manager is a good place to look, to find out where any of your registered snippet directories are located. It is true that the snippet files installed with the product are located in Program Files. The directory we provide for creating
your own is located at My Documents\Visual Studio 2005\Code Snippets\Visual Basic\My Code Snippets.
However, there is no restriction on where a snippet directory must lie in order to use it. You can always use the Add/Remove buttons in the Code Snippets Manager to control which folders show up in the IDE.