[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [gmf-dev] First try on customizing a diagram editor
|
Hi Renzo,
I suggest going over the eclipse modeling project book. Although it may
be somewhat advanced for a beginner to modeling in eclipse, I feel it
provides an adequate overview of various modeling projects and how they
interact with each other. In addition, the book covers some possible
tweaks to the gmf editor.
The EMF modeling book and the tutorials and presentations available on
the eclipse website are also relevant.
To directly address your question:
There are multiple places where one is able to modify the underlying
domain model element when dropping a node into the GMF canvas. Some of
the possibilities include:
- Modifying the EMF generated factory creation method for the desired
domain model element. I would use this approach if the change to the
model element is required and independent of who creates it (Tree
Editor, Graphical Editor, GMF Editor, Custom Java code, etc.).
- Implementing an EditHelper that makes the necessary modification on
the element given a GEF Request. GMF generates empty EditHelpers for
most element models, this is perfect if you want to tweak the model
element when someone creates the model element only through the GMF
editor, and you don't want to modify or create new commands and possibly
the edit policies associated with them.
The above suggestions are only a few of the possibilities. Maybe someone
else can chime in and provide additional suggestions. However, the best
solution will depend on your requirements. For example, whether the
change is just for the GMF editor in question or any other client using
your domain model.
Regards,
Angel Roman
Renzo Vannucci wrote:
Hi
I need to implement the following feature:
when i create a new node, i need to set the value of one attribute
dinamically. (that value will be determined at runtime)
I tryed to take a look to the source code generated, but it seems
really complicated. Can you guys suggest me any documentation to
understand the basics on customizing gmf?
Thank you all.
Renzo Vannucci
--
MDE Systems, Inc.
www.mdesystems.com