Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » Java Development Tools (JDT) » Formatter does not support Ratliff style(There is no option to indent closing braces)
Formatter does not support Ratliff style [message #1719835] Tue, 12 January 2016 14:04 Go to next message
H.Merijn Brand is currently offline H.Merijn BrandFriend
Messages: 2
Registered: January 2016
Junior Member
Our developers currently use jIndent in both Eclipse and Netbeans, and years and years of discussions and compromises lead us to use Ratliff- or banner-style ( en.wikipedia.org/wiki/Indent_style#Ratliff_style ) for brace placements in all languages used: C, perl, java, ruby

The managers want to save money and abolish jIndent and use the default formatters in the IDE and asked me to find where they fall short.

So far I have not spotted an option in NetbeansEclipse' java formatter to select indentation of the closing brace.

Did I miss it? Is there an option to get the NetbeansEclipse java formatter to do what we want?

if (c.isFoo ()) {

    if (c.isBar ())
        return; 

    String str = c.getActionDescription ();
    if ("ABORT".equals (str)) {
        process.abort ();
        LOG.info ("Process aborted");
        }
    else
        LOG.info ("Process will do " + str);
    }


Please don't answer if all you do is vent the opinion that you think that is a stupid style. You are entitled to have your own opinion and I agree that you may disagree with the required layout/style: end of argue. Note that it is not up to you to set developer-group rules. I'm just seeking the option to use this style, and jIndent is supporting that.

[Updated on: Wed, 13 January 2016 13:23]

Report message to a moderator

Re: Formatter does not support Ratliff style [message #1719838 is a reply to message #1719835] Tue, 12 January 2016 14:31 Go to previous messageGo to next message
Stephan Herrmann is currently offline Stephan HerrmannFriend
Messages: 1853
Registered: July 2009
Senior Member
Quote:
So far I have not spotted an option in netbeans' java formatter to select indentation of the closing brace.

Did I miss it? Is there an option to get the netbeans java formatter to do what we want?


You are not asking netbeans questions in an Eclipse forum, are you? Smile
Re: Formatter does not support Ratliff style [message #1719840 is a reply to message #1719838] Tue, 12 January 2016 14:42 Go to previous messageGo to next message
H.Merijn Brand is currently offline H.Merijn BrandFriend
Messages: 2
Registered: January 2016
Junior Member
I asked the sme question about the netbeans formatter in the netbeans forum.

This question is about the Eclipse java formatter (but it is the same question)

Right. I see where I errored on the copy-paste and change. Lemme see if I can change that...
Found and changed. Thanks for spotting.

/me still hopes for a better answer

[Updated on: Tue, 12 January 2016 15:01]

Report message to a moderator

Re: Formatter does not support Ratliff style [message #1719860 is a reply to message #1719840] Tue, 12 January 2016 16:19 Go to previous message
Erick Hagstrom is currently offline Erick HagstromFriend
Messages: 107
Registered: April 2014
Location: USA
Senior Member
There's still a copy-paste error, but I can see past it.

The short answer is: I don't see an option to adjust the placement of closing braces.

Perhaps your management would consider allowing you to contribute such an option, since by doing so they can stop paying for jIndent (assuming there is some other solution for NetBeans).
Previous Topic:Update marker attributes while file being edited
Next Topic:Programmatically Rename and Move a Java Class
Goto Forum:
  


Current Time: Thu Apr 25 04:35:47 GMT 2024

Powered by FUDForum. Page generated in 0.03243 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top