Code outlining in Visual Studio2005

K

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?
 
G

Guest

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.
(e-mail address removed)
Remove only "_nos_pam"
 
K

KK

Hi

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

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top