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 6704425
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T07:17:14+00:00 2026-05-26T07:17:14+00:00

In my java code formatter, in my profile I have (actually it’s the eclipse’s

  • 0

In my java code formatter, in my profile I have (actually it’s the eclipse’s default) all choices in the “braces” tab set to “same line”. Nevertheless when I have a piece of code like this:

interface TestI
    {
}

and I invoke the formatter (key binding, context menu, whatever) all I get is

interface TestI
{
}

it doesn’t move the opening braces to the same line, the same applies to methods, control statements etc. then when I manually change it to

interface TestI      {
}

it then formats it to:

interface TestI {
}

So it generally respects the format I did manually but only formats the spaces between the braces and other elements.

Other formatting options in my formatter work as as specified. I’m using the latest Eclipse Indigo release 3.7.1, I had the same with 3.7, and my friend tried it with a 3.5 release, so it makes me think that this is on purpose, but then again why is there this “braces” tab at all if I can’t reformat the code using this rule …

I hope I’m missing something and that you will make me fell stupid in a moment and the problem will go away, because I have a gazillion of classes to cleanup and I don’t want to do it by hand .. 🙂

UPDATE: when I set the rule not to “same line” but “next line” then formatting works as expected, it forces the rule regardless of how I’ve written the code, as soon as I change it back to “same line” the the formatter doesn’t force this rule.

  • 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-26T07:17:15+00:00Added an answer on May 26, 2026 at 7:17 am

    Found it… it was caused by:

    <setting id="org.eclipse.jdt.core.formatter.join_wrapped_lines" value="false"/> 
    

    which in the Formatter setting GUI is under “Line Wrapping/Never join already wrapped lines”

    yes now I remember setting it, but I never thought that this would override the braces setting …

    a nice-to-have feature of the formatter would be to have warnings if you set options that are no-ops because of other options that you’ve set override them.

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

Sidebar

Related Questions

I'm using Eclipse 3.4 and have configured the Java code formatter with all of
In Eclipse IDE how do you customize the Java code style formatter to have
The default Eclipse formatter formats my Java code in a really funny way. For
I have some Java code that uses curly braces in two ways // Curly
How to configure Eclipse to format all java code except Strings declaration? Example: Before
I'm trying to use the Eclipse Java Code formatter. Eclipse 3.5 on Red Hat
I like being able to use the (Java) Code Formatter in Eclipse, but Eclipse
I have this java code: <script src=http://www.google.com/jsapi></script> <script type=text/javascript> google.load(jquery, 1.2.6); $(a#more).click(function() { $(#info_box).show(blind,
In Eclipse, under Windows -> Preference -> Java -> Code Style , you can
There's a minor but annoying bug, I think, in the Eclipse built-in Java formatter.

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.