the Google Java programming style specification recommends that blocks be indented to two Spaces, while Eclipse defaults to using tabs (\t) to indent blocks, and here’s how you can change the indentation of code in Eclipse:
- open Eclipse;
- Window -> Preferences -> Java -> Code Style -> The Formatter.
- on the right click ‘New…’ “Initialize Settings with the following Profile”. Just select “Eclipse [Builin]” and click OK. li>
- click on “Edit…” Button;
- either choose “Spaces only” or “Tab policy” in “General Settings” on the “Indentation” Tab, and enter “2” as the value of “Indentation size”;
- click OK.
thus, holding down the Tab key while writing code in the Eclipse code editing area indents the code with two Spaces.
Read More:
- Python 3.4 compiler prompt error: unexpected indent
- Latex subsection cannot wrap and indent
- The python script tool of ArcGIS reports an error: indentationerror: unexpected indent solution
- Let’s get started with latex 05, line feed, paragraph feed, page feed, first line indent, etc
- Tomcat memory overflow in Eclipse: Java. Lang. outofmemoryerror: permgen space solution:
- @Solution to get / set error in eclipse after using data annotation
- After eclipse eclipse eclipse imports the correct project, an error is reported in XML and other files
- How to generate UML Diagrams from Java code in Eclipse
- Solution to garbled code problem after importing project in eclipse
- Hot code replace failed in eclipse compilation
- Hot code replace failed error in eclipse
- To solve the problem, start eclipse and return exit code = 13
- The solution of eclipse code automatic prompt function
- The solution to “polling news feeds” appeared in Eclipse in Java
- Eclipse: unable to open editor: no ID org.eclipse.jdt . ui.CompilationUnitEditor Editor descriptor for
- Using code to create control objects, set the event listening method does not execute
- Solutions to the problem of “Autowired cannot be resolved to a type” in eclipse Maven project
- Solution to the error of @ resource annotation in eclipse spring
- eclipse cdt Program “make” not found in PATH
- How to solve the problem of “version 11 or greater is required” in eclipse 2020