代码改变世界

New Feature In the VS.Net 2005 Editor

2004-07-08 09:23  atempcode  阅读(633)  评论(0编辑  收藏  举报

 

  • The Definition toolwindow

The Definition toolwindow is a new toolwindow in the VS2005. It will show the definition of the tag under the cursor. SourceInsight already had this, MS is really good at learning. I wish MS can add other 2 feature in Source Insight to the Definition toolwindow: show the filename where the definition is in and double click in the toolwindow can open the definition file.

  • Gray the code that not compiled

We often see some code between #ifdef and #endif, it is annoying since we need to go through the source tree searching for the definition to see if the code will be compiled into the target obj file. Now VS2005 can gray out the code if it knows the code won't be compiled into the obj file. For example, in the above screenshot, the code between #ifdef _MERGE_PROXYSTUB and #endif has been grayed out because the _MERGE_PROXYSTUB is not defined. We have implemented this feature in our VSIP package. We use the compiler to pre-compile the source code. In the pre-compile putput file, all the macros has been expanded and the zombie code has been removed. Then we add text markers in the editor window to gray the zombie code. A really nice feature, maybe MS learned form us too... ;)