Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » Visual Editor (VE) » generated code - formatting
generated code - formatting [message #116521] Wed, 01 February 2006 01:08 Go to next message
Eclipse UserFriend
Originally posted by: stjohnsoftware.yahoo.com

I used VE to generate some code for a JFrame.

I'm very particular about formatting, and unfortunately I find what seems to
be the standard for braces in Java annoying and difficult to read.

I want to see code that looks like this:

if (checkCondition())
{
doThis();
doThat();
}

and I absolutely can't stand to see code that looks like this:

if (checkCondition()) {
doThis();
doThat();
}

So my question is this: Is there an option in Eclipse to have generated
code come out looking as I would like it?
Re: generated code - formatting [message #116590 is a reply to message #116521] Wed, 01 February 2006 21:46 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: richkulp.us.NO_SPAM.ibm.com

Set your java formatting options to this setting and the VE will respect
it and generate the code that way.

sjs wrote:
> I used VE to generate some code for a JFrame.
>
> I'm very particular about formatting, and unfortunately I find what seems to
> be the standard for braces in Java annoying and difficult to read.
>
> I want to see code that looks like this:
>
> if (checkCondition())
> {
> doThis();
> doThat();
> }
>
> and I absolutely can't stand to see code that looks like this:
>
> if (checkCondition()) {
> doThis();
> doThat();
> }
>
> So my question is this: Is there an option in Eclipse to have generated
> code come out looking as I would like it?
>
>

--
Thanks,
Rich Kulp
Re: generated code - formatting [message #116597 is a reply to message #116590] Wed, 01 February 2006 21:53 Go to previous message
Eclipse UserFriend
Originally posted by: richkulp.us.NO_SPAM.ibm.com

To get to the options: Window->Preferences->Java->Code
Style->Formatting. From there you need to show the profile and modify it
on the "braces" tab.

Rich Kulp wrote:
> Set your java formatting options to this setting and the VE will respect
> it and generate the code that way.
>
> sjs wrote:
>
>> I used VE to generate some code for a JFrame.
>>
>> I'm very particular about formatting, and unfortunately I find what
>> seems to be the standard for braces in Java annoying and difficult to
>> read.
>>
>> I want to see code that looks like this:
>>
>> if (checkCondition())
>> {
>> doThis();
>> doThat();
>> }
>>
>> and I absolutely can't stand to see code that looks like this:
>>
>> if (checkCondition()) {
>> doThis();
>> doThat();
>> }
>>
>> So my question is this: Is there an option in Eclipse to have
>> generated code come out looking as I would like it?
>>
>

--
Thanks,
Rich Kulp
Re: generated code - formatting [message #611932 is a reply to message #116521] Wed, 01 February 2006 21:46 Go to previous message
Eclipse UserFriend
Originally posted by: richkulp.us.NO_SPAM.ibm.com

Set your java formatting options to this setting and the VE will respect
it and generate the code that way.

sjs wrote:
> I used VE to generate some code for a JFrame.
>
> I'm very particular about formatting, and unfortunately I find what seems to
> be the standard for braces in Java annoying and difficult to read.
>
> I want to see code that looks like this:
>
> if (checkCondition())
> {
> doThis();
> doThat();
> }
>
> and I absolutely can't stand to see code that looks like this:
>
> if (checkCondition()) {
> doThis();
> doThat();
> }
>
> So my question is this: Is there an option in Eclipse to have generated
> code come out looking as I would like it?
>
>

--
Thanks,
Rich Kulp
Re: generated code - formatting [message #611933 is a reply to message #116590] Wed, 01 February 2006 21:53 Go to previous message
Eclipse UserFriend
Originally posted by: richkulp.us.NO_SPAM.ibm.com

To get to the options: Window->Preferences->Java->Code
Style->Formatting. From there you need to show the profile and modify it
on the "braces" tab.

Rich Kulp wrote:
> Set your java formatting options to this setting and the VE will respect
> it and generate the code that way.
>
> sjs wrote:
>
>> I used VE to generate some code for a JFrame.
>>
>> I'm very particular about formatting, and unfortunately I find what
>> seems to be the standard for braces in Java annoying and difficult to
>> read.
>>
>> I want to see code that looks like this:
>>
>> if (checkCondition())
>> {
>> doThis();
>> doThat();
>> }
>>
>> and I absolutely can't stand to see code that looks like this:
>>
>> if (checkCondition()) {
>> doThis();
>> doThat();
>> }
>>
>> So my question is this: Is there an option in Eclipse to have
>> generated code come out looking as I would like it?
>>
>

--
Thanks,
Rich Kulp
Previous Topic:Menu questions.
Next Topic:ve doesn't display gui
Goto Forum:
  


Current Time: Fri Apr 26 16:28:26 GMT 2024

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

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

Back to the top