Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to Create a Region in eclipse like Visual Studio

I am working with Eclipse tool and I am so curious to know about that how can I create Region in Eclipse like in Visual Studio we can create :

#region abc

// Some Code 

#endregion abc

How to achieve the same thing in Eclipse.

like image 245
Utsav Avatar asked Nov 20 '14 09:11

Utsav


People also ask

How do I create a region in Eclipse?

Eclipse does not have something like Visual Studio's region. but you can use the below code and enable folding for this purpose. You can add a new template like the below in the Prefrences > C/C++ > Templates menu to add it to surround with and code snippet (auto-complete with CTRL+Space)

How to region off code in Eclipse IDE?

For instance, you can use #region in Java/JavaScript if you're using Visual Studio Code. check this out There is no way to do this in eclipse.The eclipse ide does not provide a way to region off areas of code like visual studio does I came from visual studio to eclipse and this is a problem I had.

Is it possible to region code in Visual Studio Code?

Note, it's not really a feature of C#, but of the Visual Studio as an IDE. For instance, you can use #region in Java/JavaScript if you're using Visual Studio Code.

How do I Collapse a region in Visual Studio?

You can also collapse an outlining region by double-clicking any line in the region on the outlining margin, which appears just to the left of the code. You can see the contents of a collapsed region as a tooltip when you hover over the collapsed region. This topic applies to Visual Studio on Windows.


Video Answer


1 Answers

Got to long for a comment ..

There is code folding in Eclipse. You can find it in Window-> Preferences, then search for "folding". But it just wraps methods/functions/comments etc.

There is a plugin that used to work in Eclipse 4.2 named Coffee Bytes, but it is no longer maintained. So usage is at your own risk.

Lots of "buts", I know ;).

like image 190
Calon Avatar answered Sep 30 '22 05:09

Calon