Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7077427
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T06:25:20+00:00 2026-05-28T06:25:20+00:00

Using Eclipse is it possible (via formatter or other setting) to automatically pre-indent blank

  • 0

Using Eclipse is it possible (via formatter or other setting) to automatically pre-indent blank lines in Java code with the appropriate number of tabs (or whitespace)?

(Not interested in arguing about others opinion that this is a bad idea or “wastes bytes” (hahaha) or any other such nonsense – just want to know if it’s possible, thanks.)

Edit:
Actually this may be a problem that can be fixed with templates (I’ve had no success so far), but when I generate a new class I get methods like this:

    @Override
    public void setData(Object data) {
//No indentation on first line :(
    }

The formatter, even with “Indent empty lines” checked, definitely doesn’t add tabs there either. Maybe this is a bug?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T06:25:20+00:00Added an answer on May 28, 2026 at 6:25 am

    Yep, you can do that. Go to Preferences/Java/Code Style/Formatter and edit your active profile.
    Then on the Indentation tab tick empty lines.

    enter image description here

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am using Eclipse to develop a Blackberry Java application.Is possible to automatically increment
I'm using Eclipse 3.4 and have configured the Java code formatter with all of
Using Eclipse I want to view the source code for a core Java class
Possible Duplicate: How to access java-classes in the default-package? I am using Eclipse 3.5
Possible Duplicate: Causes of 'java.lang.NoSuchMethodError: main Exception in thread “main”' I am using Eclipse.
I'm using Eclipse to help me clean up some code to use Java generics
Possible Duplicate: SVN plugins for Eclipse - Subclipse vs. Subversive I've been using Subclipse
When using Eclipse or NetBeans IDE on a Java project I get to see
I'm using Eclipse Java EE IDE for Web Developers and want something like that:
Is there any possible to develop the Iphone App using Eclipse IDE in Windows?

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.