473,657 Members | 2,476 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Code outlining in Visual Studio2005

KK
Dear All
Recently I started using VisualStudio200 5 for my C++ development.Ear lier 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 1503
> Dear All
Recently I started using VisualStudio200 5 for my C++ development.Ear lier 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************* *********@hotma il.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************ **********@hotm ail.com> wrote in message
news:A7******** *************** ***********@mic rosoft.com...
Dear All
Recently I started using VisualStudio200 5 for my C++ development.Ear lier
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************* *********@hotma il.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************* *********@hotma il.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
1175
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 seem to find any way of accessing this feature of the IDE. What objects/methods should I be looking at? Thanks! --
4
3004
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 within regions doesn't print if the region is collapsed. Ideally I would like to tell it to print the collapsed regions also but I'll settle for an "expand all regions" option somewhere. Does anyone know if either is possible? The second problem is...
5
1522
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 VB it is not. Is it a Visual Studio bug? Any workarounds? Thanks
0
1125
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 : In VS2003 MyClass:: Method(int x, int y ) // We can collapse here { if( x < y ) // we can even collapse here also
0
947
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 following error in one dll. "A namespace should generally have more than five types". I went its Rule Support and MSDN says,I can disable if I follow below steps. 1) In Solution Explorer, right-click your project and choose Properties 2) In...
1
1095
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
1220
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
909
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 me. When i set data base project in VS 2005 through source control and make data connections also check the check the option of "Allow saving password" but whnever i execute a stored procedure on the server VS2005 again prompts me for password (it...
5
1619
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 available on encountering certain reserve words and have expand/collapse ability (just like in an IDE). any suggestions of how to do this? would it require a different "control" (i.e. not text area), specially if I wanted to add +/- signs?
0
8420
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8740
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8516
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
7353
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
4173
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4330
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2743
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
1970
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1733
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.