Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Vertical line between matching curly braces for java in eclipse

I am new to eclipse IDE.
Can we do following in eclipse for java editor?

{ | | } 

How it is configured in eclipse to show vertical lines between matching curly braces in java editor? Is it possible?

like image 398
Jagdev Singh Avatar asked Jul 19 '12 17:07

Jagdev Singh


People also ask

What is the vertical line in eclipse?

Now any file you see you should see a vertical line as print margin, un-check if you want to disable this margin line.

How do I get matching brackets in Eclipse?

To see a bracket's pair, click to the right of the bracket. Its matching pair will be highlighted. To jump to the matching bracket, press Ctrl+Shift+P.

How do you use curly braces in Java?

Java has a "feature" which allows you to omit curly brackets when writing if statements, for loops, or while loops containing only a single statement. You should never use this feature – always include curly brackets. The reason for this is because omitting curly brackets increases your chances of writing buggy code.

Are curly brackets necessary in Java?

Different programming languages have various ways to delineate the start and end points of a programming structure, such as a loop, method or conditional statement. For example, Java and C++ are often referred to as curly brace languages because curly braces are used to define the start and end of a code block.


2 Answers

There are useful plugins. Try: IndentGuide or EditBox

like image 137
Michal Z m u d a Avatar answered Oct 08 '22 16:10

Michal Z m u d a


The closest solution I can suggest is:

  1. Click on Eclipse IDE > Window > Preferences > General > Editors > Text Editors

  2. Then click on the link "whitespace characters" to specify what should be shown.

  3. Then enable tick box "Leading and Enclosed" for Tab only and leave the rest unchecked.

This is not perfect solution, but it might be useful.

Example

like image 30
user292049 Avatar answered Oct 08 '22 16:10

user292049