Skip to main content



      Home
Home » Language IDEs » Java Development Tools (JDT) » 3.0 code formatter question
3.0 code formatter question [message #97654] Sat, 20 September 2003 16:47 Go to next message
Eclipse UserFriend
Originally posted by: rmaker.cs.brandeis.edu

I am experimenting with 3.0M3, and I can't figure out one code formatting
customization.

| = cursor position

When I have

if(someBoolean)|

and I hit enter, the cursor position changes to:

if(someBoolean)
|

And I would like it to change to:

if(someBoolean)
|

What setting do I need to change to get this to happen?

Thanks in advance,

Reid
Re: 3.0 code formatter question [message #97741 is a reply to message #97654] Sun, 21 September 2003 17:47 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: tom.eicher.name

You can't change that at the moment. Code formatting is being reworked
in several areas for 3.0, and the current preferences have very limited
coverage. If you hit Insert, you can leave the smart mode, however, no
autoindentation what so ever will happen then - probably not what you want.

Just out of curiosity: can you explain why you want the conditional
statement on the same indentation level? Note that if you enter an
opening brace at in the situation you describe, it will automatically
move back to the correct position.

if (someBoolean)
someMethod();

but:

if (someBoolean)
{
someMethod();

-tom

Reid Maker wrote:

> I am experimenting with 3.0M3, and I can't figure out one code formatting
> customization.
>
> | = cursor position
>
> When I have
>
> if(someBoolean)|
>
> and I hit enter, the cursor position changes to:
>
> if(someBoolean)
> |
>
> And I would like it to change to:
>
> if(someBoolean)
> |
>
> What setting do I need to change to get this to happen?
>
> Thanks in advance,
>
> Reid
>
Re: 3.0 code formatter question [message #99402 is a reply to message #97741] Sat, 27 September 2003 12:56 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: rmaker.cs.brandeis.edu

Tom,

When I type:

someMethod() and hit enter, it will put me
here. If I hit {, it will make it look like:

someMethod()
{

}

Which is not what I want...

Thanks,

Reid


Tom Eicher wrote:

> You can't change that at the moment. Code formatting is being reworked
> in several areas for 3.0, and the current preferences have very limited
> coverage. If you hit Insert, you can leave the smart mode, however, no
> autoindentation what so ever will happen then - probably not what you want.

> Just out of curiosity: can you explain why you want the conditional
> statement on the same indentation level? Note that if you enter an
> opening brace at in the situation you describe, it will automatically
> move back to the correct position.

> if (someBoolean)
> someMethod();

> but:

> if (someBoolean)
> {
> someMethod();

> -tom

> Reid Maker wrote:

> > I am experimenting with 3.0M3, and I can't figure out one code formatting
> > customization.
> >
> > | = cursor position
> >
> > When I have
> >
> > if(someBoolean)|
> >
> > and I hit enter, the cursor position changes to:
> >
> > if(someBoolean)
> > |
> >
> > And I would like it to change to:
> >
> > if(someBoolean)
> > |
> >
> > What setting do I need to change to get this to happen?
> >
> > Thanks in advance,
> >
> > Reid
> >
Re: 3.0 code formatter question [message #99417 is a reply to message #99402] Sat, 27 September 2003 13:43 Go to previous message
Eclipse UserFriend
this is fixed in a newer build.

johan


Reid Maker wrote:

> Tom,
>
> When I type:
>
> someMethod() and hit enter, it will put me
> here. If I hit {, it will make it look like:
>
> someMethod()
> {
>
> }
>
> Which is not what I want...
>
> Thanks,
>
> Reid
>
>
> Tom Eicher wrote:
>
>
>>You can't change that at the moment. Code formatting is being reworked
>>in several areas for 3.0, and the current preferences have very limited
>>coverage. If you hit Insert, you can leave the smart mode, however, no
>>autoindentation what so ever will happen then - probably not what you want.
>
>
>>Just out of curiosity: can you explain why you want the conditional
>>statement on the same indentation level? Note that if you enter an
>>opening brace at in the situation you describe, it will automatically
>>move back to the correct position.
>
>
>>if (someBoolean)
>> someMethod();
>
>
>>but:
>
>
>>if (someBoolean)
>>{
>> someMethod();
>
>
>>-tom
>
>
>>Reid Maker wrote:
>
>
>>>I am experimenting with 3.0M3, and I can't figure out one code formatting
>>>customization.
>>>
>>>| = cursor position
>>>
>>>When I have
>>>
>>>if(someBoolean)|
>>>
>>>and I hit enter, the cursor position changes to:
>>>
>>>if(someBoolean)
>>> |
>>>
>>>And I would like it to change to:
>>>
>>>if(someBoolean)
>>>|
>>>
>>>What setting do I need to change to get this to happen?
>>>
>>>Thanks in advance,
>>>
>>>Reid
>>>
>
>
>
Previous Topic:ant in external vm
Next Topic:JVM terminated exit code 1
Goto Forum:
  


Current Time: Sat May 10 01:24:36 EDT 2025

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

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

Back to the top