Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » Java Development Tools (JDT) » Code formatting question
Code formatting question [message #234237] Fri, 11 August 2006 12:43 Go to next message
Eclipse UserFriend
Originally posted by: lw_mailme_00.yahoo.com

This may be simple, but I can't find a setting to make the Java code
formatter behave as follows.

I have a method call with several parameters, where some parameters are
the result of method calls. The formatter creates line breaks after the
'.' in method calls. E.g.

a.method(parameter1, parameter2, obj1.method(x), obj2.
method(y), parameter3);

I don't want each parameter on a separate line, but I don't want line
breaks in method calls either. The example above should look like

a.method(parameter1, parameter2, obj1.method(x),
obj2.method(y), parameter3);

Is this possible?
Re: Code formatting question [message #234268 is a reply to message #234237] Fri, 11 August 2006 15:43 Go to previous message
Eclipse UserFriend
Originally posted by: lw_mailme_00.yahoo.com

Oops, there's a slight mistake in my first example. The break is
actually inserted before the period. This is what it looks like:

a.method(parameter1, parameter2, obj1.method(x), obj2
.method(y), parameter3);

Lutz Wrage wrote:
> This may be simple, but I can't find a setting to make the Java code
> formatter behave as follows.
>
> I have a method call with several parameters, where some parameters are
> the result of method calls. The formatter creates line breaks after the
> '.' in method calls. E.g.
>
> a.method(parameter1, parameter2, obj1.method(x), obj2.
> method(y), parameter3);
>
> I don't want each parameter on a separate line, but I don't want line
> breaks in method calls either. The example above should look like
>
> a.method(parameter1, parameter2, obj1.method(x),
> obj2.method(y), parameter3);
>
> Is this possible?
Previous Topic:Opening java from a non java editor
Next Topic:New JDT developer stupid question
Goto Forum:
  


Current Time: Fri Apr 26 04:20:38 GMT 2024

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

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

Back to the top