IDE Feature Work

IDE Feature Work

  • Comments 13

Hi, my name is Ameya Limaye and I am a developer on the VC++ IDE Team, working mainly on the Intellisense, Browsing and Editor feature areas. Prior to this I was on the VC++ Compiler Team. I would like to take this opportunity to discuss several of the improvements we have made in VS 2005 and some of the stuff we are working on for VS 2005 SP1 and Orcas (the next version of VS).

 

Some Whidbey New Features & Improvements:

  • Live Browsing (Function Caller-Callee Browsing, Find Symbol & Find All References):
    In VS 2005 we introduced a new feature called live browsing which provides a lot of the functionality of BSC based browsing which I am sure a lot of our users are familiar with. The main advantage of Live Browsing over BSC based browsing is that Live Browsing does not require you to build a project successfully to generate the browse information database. In fact it works even on incomplete code or code that is not in a fully compilable state currently and is always up to date with the latest code changes made by the user. You can read more about this cool new technology in my MSDN Pure C++ column article titled Live Source Browsing in Visual C++ co-authored by Boris Jabes (Program Manager on the IDE Team).

  • More correct and always up to date Intellisense data for all code including SDK and Libraries included by user code (Macro based dynamic parsing):
    Before VS 2005, we would use a pre-built NCB file to produce the information for SDK headers, and libraries like ATL, MFC, CRT and STL. This means that the information was always the same and could not be tailored to the specific include state / context of the user code. To give you a simple example, if you “#define UNICODE” then the windows headers are slightly different than if  “UNICODE” is not defined. Previously there would be one state (the state used to create the pre-built NCB) that would be used irrespective of whether you defined the macro “UNICODE” before “#include <windows.h>“.  In VS 2005 we got rid of pre-built NCB files and we generate the correct contextual information for the SDK and library headers when included from your project.

  • Intellisense Support for Makefile Projects:
    The Intellisense parsing engine just like the compiler needs to know the command line switches and environment variables to make sense of the code when parsing user sources. When using a makefile project, the command line switches etc. are in a custom makefile and not available to the parser. Hence Intellisense may not always be able to make sense of the code. In VS 2005 we have added a configuration properties pane that contains a section for Intellisense where you can set these command line options and include search paths etc. in order to get Intellisense to work correctly on your makefile project.

  • #ifdef Code Graying:
    Since we moved to macro based parsing with full information for VS 2005, this feature was an obvious add on as a way to visually show the user in the editor, which parts of the source code are being parsed and which ones are “excluded code” or #if 0 code according to the preprocessor.

  • Code Definition Window:
    This is a nice value add that I find really useful to know exactly what I am looking at in code when browsing through code that I am not intimately familiar with.

  • Several small features and improvements (in some cases little known productivity enhancements):
    Better support for several language constructs and features like namespaces, namespace using directives, templates and explicit and partial specializations, Unicode, etc.

    New XML Doc Comment support for Visual C++. This is available for C++/CLI code when doing Quick Info and Parameter Help on symbols from a #using or /FU dll that has been built with XML Doc Comments and has the XML file beside the dll on disk.

    Edit.ListMembers (CTRL-J) when invoked at a location in code that is not in a direct member list context (on an identifier following a ./->/:: in code), now shows only the members of the enclosing class or namespace scope. This can be used to effectively get the member list that you would get if you typed “this->” inside a member function, without having to actually type it. If you are in a namespace scope function, then it will display the members from the enclosing namespace scope.

    Being able to open a file in your solution very easily. This is a productivity enhancement that I use a lot when in large solutions with thousands of files. Rather than browsing to the file using the File -> Open dialog, you can simply type “>open FilenameInSolution.Extension” in the find combo. Basically you can simply type CTRL-/ to get to the combo with “>” (this is a quick place to type commands) and type “open FilenameInSolution.Extension”. You even get completion for the commands usable there as well as the filename.


For more information on most of these as well as other improvements like Unicode Support, etc., you can look at “What’s New in Visual C++ 2005 Intellisense”.  For a high level view of the key internal workings of the Intellisense sub-system in VS 2005 and some of the limitations of Intellisense, you can read “Intellisense Support in Visual C++”.

 

Over the last few months we have been working on designing Orcas features and on VS 2005 Service Pack 1.

 

In the IDE space we are going to address several bugs and some key issues for the Service Pack. One of the key ones is, Intellisense uses 100% CPU with a thread running at normal priority causing sluggishness on single processor machines for IDE and other processes (which are also running at normal priority). This fix should make the IDE and other applications much more responsive when intellisense uses the CPU because it will do all background parsing on a lower priority thread.

 

Right now we are in the design and early implementation phase for several Orcas features for the IDE. We can discuss these in the coming months as they become more concrete. You can send me E-Mail (scrambled E-Mail is at the bottom of this post) with feedback about this post as well as what other things you want to discuss with the VC++ IDE team, on this blog in the future. I really enjoyed writing up this post and am looking forward to your comments and feedback as a VC++ user.

 

Thanks,

 

- Ameya Limaye

Software Development Engineer, VC++ IDE

 

AmeyaL(thisIsTheAtSign)(MSFTFullForm)(dot)com

  • I really like the improved intellisense in VC++, however C# is stronger.  It seems the C++/CLI isn't quite a first class citizen yet and I want to do ALL .NET work using it.  Intellisense doesn't seem to work at the root namespace.  Example:

    #include <msclr\auto_handle.h>
    using namespace System;
    using namespace System::Text;
    using namespace System::Xml;
    using namespace msclr;

    int main(array<System::String ^> ^args)
    {

    Xml::XmlTextWriter settings1;  //This will do intellisence as I type.
    XmlTextWriter settings;  //This doesn't do intellisence as I type.

    /* The namespace declaration above should be enough, but, it
    doesn't work.  I still have to use the Xml:: prefix to get
    the list of all classes/items in the Xml .NET namespace/assembly
    */


    return 0;

    }

  • Well, in C++ we do not auto invoke a member list when you start typing in the editor.
    The reason that it works for you when you type Xml:: is because typing the "::" triggers the member list to be invoked.
    If you just want a list then type CTRL-SPACE and a list should appear that contains everything that you can legally type at that location in code. It should contain "XmlTextWriter" as you expect.

    - Ameya Limaye
  • In C# the intellisence shows Help text for classes and member functions in the ballon help.  C++ only shows the function signature.
    Can this be changed to be more like the C# editor?
  • I didn't even know about the Code Definition window!  Very cool - thanks for the posting.

    I'd like to know if you are planning on taking this new Intellisense data and apply it toward some C++ refactoring functionality!  We could REALLY use something as simple as Rename or Extract Method/Variable...  please please please!

    Also, please consider adding the ability to put the cursor on a variable and press a key and have that symbol subtly highlighted everywhere in the scope of the symbol (e.g. function or file for globals). Esc could cancel the mode.  To top it off, and keys to hop the cursor back/fwd to the next/prev highlighed occurrence.  This would allow me to see everywhere a variable like "x" is used w/ having to skip over other "x" chars like the Ctrl-F3 song and dance requires.  Ctrl-F3 also hops out of scope (e.g. next function)...

    Thanks for listening!

    John
  • "In C# the intellisence shows Help text for classes and member functions in the ballon help.  C++ only shows the function signature.
    Can this be changed to be more like the C# editor?"

    I believe the feature you are referring to is XML Doc Comments support. In C++ this is available only in managed code for symbols brought in via the "#using <foo.dll>" directive or the "/FU foo.dll" compiler switch. For example if you type in "System::Console::WriteLine(", the parameter help should show the XML Doc comments like it would for C# (It works for Quick Info tooltips too). Also if you are referencing a class library that you created, then you can get XML Doc comments to work by making sure that you have enabled XML Doc comment generation for the project used to build the imported class library and that the directory on disk where the "foo.dll" you import resides also contains the "foo.xml" file containing the XML Doc Comments.

    In C++ we do not support XML Doc comments directly from source code within the same project.
  • "I didn't even know about the Code Definition window!  Very cool - thanks for the posting.

    I'd like to know if you are planning on taking this new Intellisense data and apply it toward some C++ refactoring functionality!  We could REALLY use something as simple as Rename or Extract Method/Variable...  please please please!

    Also, please consider adding the ability to put the cursor on a variable and press a key and have that symbol subtly highlighted everywhere in the scope of the symbol (e.g. function or file for globals). Esc could cancel the mode.  To top it off, and keys to hop the cursor back/fwd to the next/prev highlighed occurrence.  This would allow me to see everywhere a variable like "x" is used w/ having to skip over other "x" chars like the Ctrl-F3 song and dance requires.  Ctrl-F3 also hops out of scope (e.g. next function)..."

    We definately hope to support refactoring in some future release but it will not be supported for the next release.

    I like the idea about the highlighting and jump keys etc. We might consider adding it in some future release.

    For now you can navigate to your previous hit or previous place you were exploring in your code using the "View.NavigateBackward" command. Look under "Tools -> Options -> Environment -> Keyboard" and type the command name to see the keybindings. Usually in C++ Profile it is "CTRL-MINUS".
  • "I didn't even know about the Code Definition window!  Very cool - thanks for the posting.

    I'd like to know if you are planning on taking this new Intellisense data and apply it toward some C++ refactoring functionality!  We could REALLY use something as simple as Rename or Extract Method/Variable...  please please please!

    Also, please consider adding the ability to put the cursor on a variable and press a key and have that symbol subtly highlighted everywhere in the scope of the symbol (e.g. function or file for globals). Esc could cancel the mode.  To top it off, and keys to hop the cursor back/fwd to the next/prev highlighed occurrence.  This would allow me to see everywhere a variable like "x" is used w/ having to skip over other "x" chars like the Ctrl-F3 song and dance requires.  Ctrl-F3 also hops out of scope (e.g. next function)..."

    We definately hope to support refactoring in some future release but it will not be supported for the next release.

    I like the idea about the highlighting and jump keys etc. We might consider adding it in some future release.

    For now you can navigate to your previous hit or previous place you were exploring in your code using the "View.NavigateBackward" command. Look under "Tools -> Options -> Environment -> Keyboard" and type the command name to see the keybindings. Usually in C++ Profile it is "CTRL-MINUS".
  • Thanks for the XML Doc info.  Works as advertised.  Does not seem to support documentation of constructors.
  • that sucks..

    old

    owned

    perdão

  •     It's probably not the area you owned, so please help forward to the right person.

        I spent a whole day and tried to add some our coding styles as code snippet into VC++ IDE.  It looks like it does not have this in code snippet design.  Can you please confirm it?  Or, please let me know how to enable code-snippet into VC++ IDE?  At least, will it possible to add this feature into future release?  Thank you.

  • Hi Ameya,

    Have a quick question... I am running VS2005 Team Edition SP1 and I had to manually uninstall it. After reinstalling it, I noticed that the C++ "personality" is gone, that is, there is no way one can create new C++ projects (both native and managed). Would you happen to know how to re-enable the C++ personality? I tried uninstalling it again, reinstalling it, etc

    The IDE would not display the C++ branch (on new project) and the installer (in maintenance mode) displays the C++ stuff without checkboxes (so there is no way to remove/reinstall/etc)

    If you happen to know how to fix this, it would be great if you shared this information! Thanks in advance

    Regards,

    Daniel

  • hey, i got that to work. for any of you who might run into similar issues, just enter in maintenance mode (add remove features) and then make sure that the top most checkbox (in the dependency tree) is not in tree-state. that is, if you just manually unselect it and then select it (checked = true) then the c++ check boxes are back and you can actually use the c++ personality!

    my $.2

    d

  • do you have any drawing and parts of the Visual C++?

Page 1 of 1 (13 items)