Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » GMF (Graphical Modeling Framework) » Stupid Layout
Stupid Layout [message #219943] Wed, 25 February 2009 11:19 Go to next message
Eclipse UserFriend
Originally posted by: cayla_sha.gmx.net

Hello!

I`m "a bit" angry.
In my project I put above every code-part which I wrote the "@generated
NOT". When I re-generated my project after a model-change, my code was
still there. But it looked completly chaotic!

Normally the layout of my code is like this (for example):
if
{
...
}
else
{
...
}

// Or I write comments
// like this, to explain things further

And now all my layout is broken. The brackets all look like this:
if {
...
} else {
...
}
And the indents of my comments are also away.
And when GMF thinks, that a line of code is too long, it make a line break.

This looks so chaotic. No one could read such a code! Not in a
reasonable amount of time.
I`m writing my masters thesis and I want to make it my corrector as
comfortable as possible when he reads my code.

And now I have to look through my whole code and rearrange the whole
code! About one hour of work!
Why can`t GMF just let my code alone??

Julia
Re: Stupid Layout [message #219952 is a reply to message #219943] Wed, 25 February 2009 11:54 Go to previous messageGo to next message
Martin Jacob is currently offline Martin JacobFriend
Messages: 189
Registered: July 2009
Senior Member
Hi Julia,

try so make your own code formater. Its easy in Eclipse. Go to preferences=>Java=>Code Style=>Formater.
I just changed a archived profile and regenerate the diagram code. At least for the diagram it
works. Other code generation I have not tried.

let me know if it works, Martin


Cayla Sha wrote, On 25.02.2009 12:19:
> Hello!
>
> I`m "a bit" angry.
> In my project I put above every code-part which I wrote the "@generated
> NOT". When I re-generated my project after a model-change, my code was
> still there. But it looked completly chaotic!
>
> Normally the layout of my code is like this (for example):
> if
> {
> ...
> }
> else
> {
> ...
> }
>
> // Or I write comments
> // like this, to explain things further
>
> And now all my layout is broken. The brackets all look like this:
> if {
> ...
> } else {
> ...
> }
> And the indents of my comments are also away.
> And when GMF thinks, that a line of code is too long, it make a line break.
>
> This looks so chaotic. No one could read such a code! Not in a
> reasonable amount of time.
> I`m writing my masters thesis and I want to make it my corrector as
> comfortable as possible when he reads my code.
>
> And now I have to look through my whole code and rearrange the whole
> code! About one hour of work!
> Why can`t GMF just let my code alone??
>
> Julia
Re: Stupid Layout [message #219960 is a reply to message #219943] Wed, 25 February 2009 11:55 Go to previous message
Maurice O'Connor is currently offline Maurice O'ConnorFriend
Messages: 86
Registered: July 2009
Member
Maybe look at code formatters in Preferences -> Java -> Code Style ?

Not sure whether GMF uses the default formatter (I'm guessing it does) but
it's pretty easy to manually apply anyway...

Maurice
Previous Topic:IDecorator with context menu support
Next Topic:gmf-diagram change
Goto Forum:
  


Current Time: Fri Feb 26 22:39:19 GMT 2021

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

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

Back to the top