Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » GMF (Graphical Modeling Framework) » Garbled generated code
Garbled generated code [message #502102] Sat, 05 December 2009 18:33 Go to next message
Ugo Sangiorgi is currently offline Ugo SangiorgiFriend
Messages: 44
Registered: July 2009
Member
Hi,
my editparts are being generated with a weird indentation and missing
classes, like:

/**
* @generated
*/
public org.eclipse.gef.EditPolicy getPrimaryDragEditPolicy() {
return new ();
}


does somebody have a clue about why is this happening?

thanks in advance!
Re: Garbled generated code [message #502161 is a reply to message #502102] Sun, 06 December 2009 19:27 Go to previous messageGo to next message
Boris Blajer is currently offline Boris BlajerFriend
Messages: 1
Registered: July 2009
Junior Member
Hi Ugo,

Check the property sheet for the corresponding GMFGEN node. The property
is likely to have empty value (instead of null). If it were null, a
normal code would have been generated. Locate this property, reset it to
the default value (the corresponding action should be available in the
pop-up menu) and regenerate (you will probably have to remove this class
or at least delete the method that contains syntax error).



Ugo Sangiorgi wrote:
> Hi,
> my editparts are being generated with a weird indentation and missing
> classes, like:
>
> /**
> * @generated
> */
> public org.eclipse.gef.EditPolicy getPrimaryDragEditPolicy() {
> return new ();
> }
>
>
> does somebody have a clue about why is this happening?
>
> thanks in advance!
Re: Garbled generated code [message #502172 is a reply to message #502161] Sun, 06 December 2009 21:41 Go to previous message
Ugo Sangiorgi is currently offline Ugo SangiorgiFriend
Messages: 44
Registered: July 2009
Member
Boris, thank you so much, you were absolutely right!
It would be impossible for me to figure this by myself.

I cant see how an empty parameter like this would brake my code:

primaryDragEditPolicyQualifiedClassName=""

I still dont know how i made it empty, maybe by mistake.. i've removed the parameter altogether and re-generate the code.
Anyway, the parser should be able to detect those simple mistakes, should i file a bug or something?

Thank you so much
Ugo

Boris Blajer escreveu:
> Hi Ugo,
>
> Check the property sheet for the corresponding GMFGEN node. The property
> is likely to have empty value (instead of null). If it were null, a
> normal code would have been generated. Locate this property, reset it to
> the default value (the corresponding action should be available in the
> pop-up menu) and regenerate (you will probably have to remove this class
> or at least delete the method that contains syntax error).
>
>
>
> Ugo Sangiorgi wrote:
>> Hi,
>> my editparts are being generated with a weird indentation and missing
>> classes, like:
>>
>> /**
>> * @generated
>> */
>> public org.eclipse.gef.EditPolicy
>> getPrimaryDragEditPolicy() {
>> return new ();
>> }
>>
>>
>> does somebody have a clue about why is this happening?
>>
>> thanks in advance!
Previous Topic:Set name of a created element
Next Topic:Duplicate problem
Goto Forum:
  


Current Time: Fri Apr 26 16:22:05 GMT 2024

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

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

Back to the top