Where to do initialization work? [message #66720] |
Fri, 20 October 2006 18:05 |
Eclipse User |
|
|
|
Originally posted by: tobk.gmx.de
Hello,
I would like to know where I should best do (more complex) initialization
work. The Problem: The needed initialization requires the creation of
non-graphical helping classes. These classes have to be created, stored in
a collection central to the diagram and referred to the object that has
been initialized with them.
If I do this in the EObject-Constructors and setters, the helping classes
would be created anew each time I load the File (when the constructors and
setters are used to rebuild the model). So where should I put them?
I thought about using the creation tools, but this would only cover the case
of creation, and not that of changing an attribute in the properties view,
which might require some initialization as well. For this case I could use
the notify changed method. But is there a way so that the initialization
will also work when using the generated EMF editor instead of the GMF
editor?
Another possibility I though of would be an 'Initialize' button,
initializing only on demand.
Any other ideas?
thanks,
tobias
|
|
|
Powered by
FUDForum. Page generated in 0.02356 seconds