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 08:43 Go to next message
Eclipse User
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 11:43 Go to previous message
Eclipse User
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: Wed Apr 23 17:49:49 EDT 2014

Powered by FUDForum. Page generated in 0.01747 seconds