Skip to main content



      Home
Home » Eclipse Projects » Eclipse Platform » Smart indentation for multiline expression
Smart indentation for multiline expression [message #267698] Wed, 18 August 2004 20:32 Go to next message
Eclipse UserFriend
Originally posted by: jl+eclipse.lists.wasmer.ca

Hi,

When I write an expression on many lines, I expect Eclipse to insert a
space (and not a tab) in every position where the chracter on the previous
line is not a tab. I don't know if there's a setting somewhere to enable.
Right now Eclipse only indents with tabs (in the following example,
Eclipse would put tabs <t> when I want spaces <s>).

<t>METHOD_A
<t>{
<t><t>EXPRESSION;
<t><t>EXPRESSION;
<t><t>IF(CONDITION)
<t><t>{
<t><t><t>EXPRESSION;
<t><t><t>METHOD_B_WITH_LONG_NAME(ARGUMENT_A,
<t><t><t><s><s><s><s><s><s><s><s>ARGUMENT_B,
<t><t><t><s><s><s><s><s><s><s><s>ARGUMENT_C);
<t><t><t>EXPRESSION;
<t><t>{
<t><t>EXPRESSION;
<t>}

Thanks for your help,

JL
Re: Smart indentation for multiline expression [message #267706 is a reply to message #267698] Thu, 19 August 2004 04:19 Go to previous messageGo to next message
Eclipse UserFriend
There is no setting for precisely what you want at all times,
auto-indent will create the indentation based on your formatter and tab
settings.

Disabling Smart Typing (Edit>Smart Insert Mode) will help in the case
you describe, because then simply the edit of the previous line is copied.

-tom

Jean-Luc Wasmer wrote:
> Hi,
>
> When I write an expression on many lines, I expect Eclipse to insert a
> space (and not a tab) in every position where the chracter on the previous
> line is not a tab. I don't know if there's a setting somewhere to enable.
> Right now Eclipse only indents with tabs (in the following example,
> Eclipse would put tabs <t> when I want spaces <s>).
>
> <t>METHOD_A
> <t>{
> <t><t>EXPRESSION;
> <t><t>EXPRESSION;
> <t><t>IF(CONDITION)
> <t><t>{
> <t><t><t>EXPRESSION;
> <t><t><t>METHOD_B_WITH_LONG_NAME(ARGUMENT_A,
> <t><t><t><s><s><s><s><s><s><s><s>ARGUMENT_B,
> <t><t><t><s><s><s><s><s><s><s><s>ARGUMENT_C);
> <t><t><t>EXPRESSION;
> <t><t>{
> <t><t>EXPRESSION;
> <t>}
>
> Thanks for your help,
>
> JL
>
Re: Smart indentation for multiline expression [message #267797 is a reply to message #267706] Thu, 19 August 2004 12:36 Go to previous message
Eclipse UserFriend
Originally posted by: jl+eclipse.lists.wasmer.ca

Thanks for the help.
Perhaps this should be added in the TODO list?

The main reason for this feature is to make sure the indentation looks
good on any editor. If the tab size is different in another tool and
there's no way to set it (like the output of a diff) the tabs inserted by
Eclipse will not end at the right position.

JL


Tom Eicher wrote:

> There is no setting for precisely what you want at all times,
> auto-indent will create the indentation based on your formatter and tab
> settings.

> Disabling Smart Typing (Edit>Smart Insert Mode) will help in the case
> you describe, because then simply the edit of the previous line is copied.

> -tom

> Jean-Luc Wasmer wrote:
> > Hi,
> >
> > When I write an expression on many lines, I expect Eclipse to insert a
> > space (and not a tab) in every position where the chracter on the previous
> > line is not a tab. I don't know if there's a setting somewhere to enable.
> > Right now Eclipse only indents with tabs (in the following example,
> > Eclipse would put tabs <t> when I want spaces <s>).
> >
> > <t>METHOD_A
> > <t>{
> > <t><t>EXPRESSION;
> > <t><t>EXPRESSION;
> > <t><t>IF(CONDITION)
> > <t><t>{
> > <t><t><t>EXPRESSION;
> > <t><t><t>METHOD_B_WITH_LONG_NAME(ARGUMENT_A,
> > <t><t><t><s><s><s><s><s><s><s><s>ARGUMENT_B,
> > <t><t><t><s><s><s><s><s><s><s><s>ARGUMENT_C);
> > <t><t><t>EXPRESSION;
> > <t><t>{
> > <t><t>EXPRESSION;
> > <t>}
> >
> > Thanks for your help,
> >
> > JL
> >
Previous Topic:No Welcome Page
Next Topic:Template Editor Example
Goto Forum:
  


Current Time: Sat Jul 12 08:09:32 EDT 2025

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

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

Back to the top