Pictogram Element Not updating after DirectEdit [message #676190] |
Fri, 03 June 2011 02:44  |
Eclipse User |
|
|
|
Hello,
I have a pretty complicated pictogram hierarchy with nested container shapes and shapes. I have a editable 'Text' in one of the shapes. When the 'DirectEditingFeature' is called on the pictogram element, though the domain model is setting the right values, the pictogram element is not refreshed.
However when I redraw the main parent(layouting), everything is updated. Does anybody have any ideas on this? I see in the tutorial that after the name is edited for EClass upon create, a call is made to update its parent (updatePictogramElement(((Shape) pe).getContainer())). Do I have to call updation of all the parent containers to get my text updated ? [Tried that, but still no result]
Thanks in advance for help.
Thanks,
Murthy
|
|
|
|
|
|
|
Re: Pictogram Element Not updating after DirectEdit [message #692378 is a reply to message #691838] |
Mon, 04 July 2011 06:23  |
Eclipse User |
|
|
|
This sounds as if your update feature is not correctly working. Either is
does not recognize the changed value or the actual update does not work
correctly.
In general ConnectionDecorators are children of Connections. Usually you
would link a Connection to a business object, as soon as that changes a
corresponding update feature for that BO is searched. That would then need
to update both the Connection and ConnectionDecorator.
There's also a section on editable property sheets in our FAQ:
http://www.eclipse.org/graphiti/developers/faq.php . Maybe that helps.
Michael
"Kalle" schrieb im Newsbeitrag news:iun98v$vko$1@news.eclipse.org...
Again using a topic for a similar problem: I created and added a Connection
to the diagram between two Classes. The Connection is initially labeled with
a text. This works fine. Furthermore I created a DirectEditingFeature for
the Connection and a ConnectionFilter and a ConnectionSection for the
property view of my Connection. This also works fine, the value of the label
is shown in the properties view and it can be changed. I use a FocusListener
and an UpdateFeature to refresh the pictogramElement of the Connection but
this doesn't work.
Interestingly the directEdit or the edit in the properties view is executed:
Wenn I click on the label of the Connection or the Connection itself, the
current labelText is shown in my properties view and when I change the
labelText via properties view or via the directEdit, the new labelText is
saved. When I click on the label or the Connection again, the new labelText
is shown in my properties view. When I click on the label, so that the text
can be directly edited, the editable textField shows the new labelText. But
when I confirm the change of the textLabel, the old textLabel is shown on
the diagram. However the new labelText is shown in the properties view.
I'm a bit confused about the behavior of my diagram. Any common mistakes I
made?
Maybe I'm not quite familiar with Connections and ConnectionDecorators: How
does Graphiti handle the connection of these two elements? How is the change
of one element recognized by the other element?
Thanks for your reply.
|
|
|
Powered by
FUDForum. Page generated in 0.25413 seconds