Name not being updated [message #156242] |
Thu, 18 October 2007 08:02  |
Eclipse User |
|
|
|
Originally posted by: trommas.yahoo.com
My model element (ClassNode) wraps an object from an OWL file. When I
run several editors, the object can be wrapped by multiple ClassNodes
(in different editors). getName() returns the wrapped object's name -
But this will differ from it's own name variabel if some other ClassNode
has edited it.
What I was thinking was to use an if. If the wrapped object's name has
changed, the model element should display the new name. I have tried to
fire a notification without success.
The properties tab gets the correct name, and normally I would use a Set
request.. But I can't since the change is detected in the getName()
method of ClassNode.
Any ideas?
Regards,
Tomas
|
|
|
|
|
Re: Name not being updated [message #156294 is a reply to message #156286] |
Thu, 18 October 2007 10:20  |
Eclipse User |
|
|
|
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
your ClassNodeNameEditPart should listen to changes in the semantic
model. Normally, they're doing this through EditPolicies installed on
the editPart. The default generated EditParts should to this
automatically. I would take a look at the adapters which are listening
to your property/EObject, your ClassNodeNameEditPart or one of his
EditPolicies should be there.
- -stefan
Tomas Zijdemans schrieb:
> Thanks. I've checked out my ClassNodeNameEditPart. There don't seem to
> be happening anything (I checked with the getLabelText() method).
>
> However, if I duplicate a model element, the new element (the dup) picks
> up the correct name.
>
> Regards,
>
> Tomas
>
> SKuhn wrote:
> first check if the 'label'editPart receives the notification.
>
> -stefan
>
>
> Tomas Zijdemans schrieb:
>>>> My model element (ClassNode) wraps an object from an OWL file. When I
>>>> run several editors, the object can be wrapped by multiple ClassNodes
>>>> (in different editors). getName() returns the wrapped object's name -
>>>> But this will differ from it's own name variabel if some other ClassNode
>>>> has edited it.
>>>>
>>>> What I was thinking was to use an if. If the wrapped object's name has
>>>> changed, the model element should display the new name. I have tried to
>>>> fire a notification without success.
>>>>
>>>> The properties tab gets the correct name, and normally I would use a Set
>>>> request.. But I can't since the change is detected in the getName()
>>>> method of ClassNode.
>>>>
>>>> Any ideas?
>>>>
>>>> Regards,
>>>>
>>>> Tomas
>
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.7 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFHF2uZIYVWjMSpDwwRAmn4AKDZl97Zkb0THoI00C3x1Hvr/x6QQwCe OU9U
Jh9nNUZBcfj8Lv0BK4QQjbc=
=rUTJ
-----END PGP SIGNATURE-----
|
|
|
Powered by
FUDForum. Page generated in 0.02197 seconds