473,406 Members | 2,467 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

Code outlining in Visual Studio2005

KK
Dear All
Recently I started using VisualStudio2005 for my C++ development.Earlier I
was using 2003.
I found difference between these two version in showing the code outlining.
For example :

In VS2003
MyClass:: Method(int x, int y ) // We can collapse here
{
if( x < y ) // we can even collapse here also
{
//Do some thing
}
else // collapsible block
{
for( int k = 0; k < ( x-y); k ++ ) // Even for loop can be
collapsible
{
//Do some thing else here
}
}
}

but in 2005
the same above code looks like this

MyClass:: Method(int x, int y ) // We can collapse only here
{
if( x < y ) // not collapsible
{
//Do some thing
}
else // not collapsible
{
for( int k = 0; k < ( x-y); k ++ ) // not collapsible
{
//Do some thing else here
}
}
}

I feel the code outlining feature in 2003 is more useful than in 2005.
Is this a bug in 2005 version or do I need to set some settings?
How can apply the same settings as like in 2003 ( CO++ code outlining that
even outlines loops, conditional statements) to C# code also?

-------------------
Thanks & Regards
Krishna
Jun 22 '06 #1
3 1492
> Dear All
Recently I started using VisualStudio2005 for my C++ development.Earlier I
was using 2003.
I found difference between these two version in showing the code outlining.
For example :

In VS2003
MyClass:: Method(int x, int y ) // We can collapse here
{
if( x < y ) // we can even collapse here also
{
//Do some thing
}
else // collapsible block
{
for( int k = 0; k < ( x-y); k ++ ) // Even for loop can be
collapsible
{
//Do some thing else here
}
}
}

but in 2005
the same above code looks like this

MyClass:: Method(int x, int y ) // We can collapse only here
{
if( x < y ) // not collapsible
{
//Do some thing
}
else // not collapsible
{
for( int k = 0; k < ( x-y); k ++ ) // not collapsible
{
//Do some thing else here
}
}
}

I feel the code outlining feature in 2003 is more useful than in 2005.
Is this a bug in 2005 version or do I need to set some settings?
How can apply the same settings as like in 2003 ( CO++ code outlining that
even outlines loops, conditional statements) to C# code also?


It seems that by default you can only collapse the function bodies.
however, if you rightclick on a line of code inside a while loop or if
statement (basically any scope specification at all) you can select
'outlining->collapse block xxx'

which enables you to collapse and expand blocks inside your code.

--

Kind regards,
Bruno.
br**********************@hotmail.com
Remove only "_nos_pam"

Jun 22 '06 #2
KK
Hi

Thank you very much.
Is there a way to enable this by default when ever we open a CPP file?

"Bruno van Dooren" <br**********************@hotmail.com> wrote in message
news:A7**********************************@microsof t.com...
Dear All
Recently I started using VisualStudio2005 for my C++ development.Earlier
I
was using 2003.
I found difference between these two version in showing the code
outlining.
For example :

In VS2003
MyClass:: Method(int x, int y ) // We can collapse here
{
if( x < y ) // we can even collapse here also
{
//Do some thing
}
else // collapsible block
{
for( int k = 0; k < ( x-y); k ++ ) // Even for loop can be
collapsible
{
//Do some thing else here
}
}
}

but in 2005
the same above code looks like this

MyClass:: Method(int x, int y ) // We can collapse only here
{
if( x < y ) // not collapsible
{
//Do some thing
}
else // not collapsible
{
for( int k = 0; k < ( x-y); k ++ ) // not collapsible
{
//Do some thing else here
}
}
}

I feel the code outlining feature in 2003 is more useful than in 2005.
Is this a bug in 2005 version or do I need to set some settings?
How can apply the same settings as like in 2003 ( CO++ code outlining
that
even outlines loops, conditional statements) to C# code also?


It seems that by default you can only collapse the function bodies.
however, if you rightclick on a line of code inside a while loop or if
statement (basically any scope specification at all) you can select
'outlining->collapse block xxx'

which enables you to collapse and expand blocks inside your code.

--

Kind regards,
Bruno.
br**********************@hotmail.com
Remove only "_nos_pam"

Jun 22 '06 #3
> Thank you very much.
Is there a way to enable this by default when ever we open a CPP file?


There is no default way that I know of.
you can use a pragma to explicitly mark blocks as collapsible during coding:
http://msdn2.microsoft.com/en-us/library/b6xkz944.aspx

--

Kind regards,
Bruno.
br**********************@hotmail.com
Remove only "_nos_pam"

Jun 23 '06 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Adam Clauss | last post by:
I am interested in writing a plugin that deals partly with the outlining Visual Studio performs by default (regions, classes, methods, comments, etc). I've created a plugin in C#, but I cannot...
4
by: Tom Leylan | last post by:
Are we past the point when we need to print source code? I'm having two problems. The most important one is that opening a .vb file and simply printing it _does_ print the source but code...
5
by: ivaylo.hristov | last post by:
Hi, I am developing application in VB and I it seems that the Outlining option is not working. On the same studio writing a C# application the Stop Outlining option is working just fine, but in...
0
by: KK | last post by:
Dear All Recently I started using VisualStudio2005 for my C++ development.Earlier I was using 2003. I found difference between these two version in showing the code outlining. For example : ...
0
by: Anish G | last post by:
Hi, Issue: Not able to see the Code Analysis tab in Visual Studio2005? I have a .net windows appliaction project and currently fixing the FxCop shown issues. Currentlly FxCop is showing the...
1
by: jimbi2006 | last post by:
hello is there anyone who can say me how I can make a library in visual studio 2005? and how can I use it in my program?
1
by: mavi | last post by:
i am designing a website in asp.net using visual studio2005, how to use AJAX in it to enhance website appearance
0
by: azmat123 | last post by:
Hi All , I want all of you participate in this discussion and post your issues related Visual Studio 2005. First of all i wana share my issue if any one has idea about this issue then kindly tell...
5
by: sdragolov | last post by:
I would like to achieve an effect similar to the code outlining in vs.net (where you can expand and collapse sections of code) inside of a textarea in a web form. the code outlining would be...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.