[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[News.eclipse.technology.gmf] Re: Modifying the generated code

The containment feature for a newly created element is set in either
the SemanticEditPolicy corresponding to the containing 
object or in its corresponding EditHelper. The autogenerated code
puts it in the former.

To choose which elements have a graphical view you must override methods
of a CanonicalEditPolicy (getSemanticChildren, getSemanticConnections).

The code in the logic example is much easier to understand than the
autogenerated code. However, I've found it difficult to understand the
semantic hints defined in the logic plugin.xml file. But that's not
directly related to your question. 

Email me offlist if you have more questions: vcciubot@xxxxxxxxx

vlad

On Fri, 28 Jul 2006 13:27:45 -0500, Arthur Molin wrote:

> Several of the threads on this board seem to recommend either changes or 
> additions to the generated code. How many people using GMF are able to 
> create a usable editor entirely from the models, versus how many are 
> finding that they have to modify the generated code?
> 
> If you have modified the generated code, how do you go about it? Is it 
> necessary to have a deep understanding of GEF to proceed?
> 
> My current problem involves having levels in my ECORE model that do not 
> correspond to graphical items in the editor.  In response to my 
> question, Artem Tikhomirov recommended:
> 
>  > You'll face an issue than, that there's nothing you can put as
>  > containment reference into ChildReference. Just ignore the warning and
>  > proceed with generation. After that, you'll need to change child's
>  > creation command to create/retrieve body and child list instances.
> 
> I am afraid that I don't even know where to start looking for the 
> child's creation command.
> 
> Arthur Molin