Prevent duplicate Classes for Child References? [message #50680] |
Tue, 19 September 2006 06:11  |
Eclipse User |
|
|
|
Originally posted by: tobk.gmx.de
Hello,
is there a way to prevent the duplicate (?) EditParts, EditPolicies,
ViewFactories etc. for Child References (e.g. for States that are contained
in other States)?
When I took a look at the classes I couldn't find any differences (except
for the '2' in the classes and most of the referenced classes names).
However, when I manually deleted the 'duplicates' and bent the references
to the 'originals' the Diagram Editor didn't work anymore.
Can you tell me why there have to be these (neary?) duplicates, since a
state that is contained in a state should have the same behaviour as a
state that is placed on the top level?
It would be really annoying if I had to copy all the changes I had to do on
the EditParts to their duplicates (like for 7 types of nodes in my actual
project...).
Regards,
tobias
|
|
|
|
|
|
Re: Prevent duplicate Classes for Child References? [message #51127 is a reply to message #51044] |
Tue, 19 September 2006 09:30   |
Eclipse User |
|
|
|
Originally posted by: tobk.gmx.de
Alex Shatalin wrote:
> Hello Tobias,
>
>> @generated NOT methods, like notifyChanged()
> Did you move some other common methods to this super-class?
Only an abstract stub for getPrimaryShape, because I need it in the
notifyChanged implementation.
>> first try, so please correct me if a made some terrible mistake that
>> might turn out bad later on...
> All the modifications looks perfect. ;-)
.... but now I encounter some problems: While it works well for my "Events"
and "Gateways", it doesn't for the "Tasks". Task, in contrast to the
others, have internal Labels.
I moved the TaskNameLabelFigure inside the CustomTaskFigure and removed the
fields and methods generated by the old LabelFigure from the custom
TaskFigure Code. A new TaskFigure extending the Custom Figure is generated
in the concrete TaskEditPart, holding the label now. So far, so good.
But when I edit the task's name, the default-text ("<...>") stay visble
behind the name, meaning that there must be _two_ labels in the figure, but
i can't figure out why. Of course I could simply remove the default text,
making the second label invisible, but you surely understand that I
wouldn't like this very much...
Do you have any Idea where there could be the problem? Meanwhile, I'll try
with debuggung and inspecting the figure object...
Tobias
|
|
|
Re: Prevent duplicate Classes for Child References? [message #51155 is a reply to message #51127] |
Tue, 19 September 2006 09:41  |
Eclipse User |
|
|
|
Originally posted by: tobk.gmx.de
tobias wrote:
> Do you have any Idea where there could be the problem? Meanwhile, I'll try
> with debuggung and inspecting the figure object...
OK, I got the cause. There was a redundant call to createContents, creating
the label twice. Now everything seems to work as it should.
Tobias
|
|
|
Powered by
FUDForum. Page generated in 0.04214 seconds