Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » GMF (Graphical Modeling Framework) » Name not being updated
Name not being updated [message #156242] Thu, 18 October 2007 12:02 Go to next message
Eclipse UserFriend
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 #156270 is a reply to message #156242] Thu, 18 October 2007 12:57 Go to previous messageGo to next message
Stefan Kuhn is currently offline Stefan KuhnFriend
Messages: 355
Registered: July 2009
Senior Member
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

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

iD8DBQFHF1ghIYVWjMSpDwwRAsgsAKCdg02ZT+fI+zMxe66luvU+yLa5FQCg 5DYK
XlvdQ/IqJU2fPRZ0Cs4sHcg=
=qFXZ
-----END PGP SIGNATURE-----
Re: Name not being updated [message #156286 is a reply to message #156270] Thu, 18 October 2007 13:37 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: trommas.yahoo.com

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:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> 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
>
> iD8DBQFHF1ghIYVWjMSpDwwRAsgsAKCdg02ZT+fI+zMxe66luvU+yLa5FQCg 5DYK
> XlvdQ/IqJU2fPRZ0Cs4sHcg=
> =qFXZ
> -----END PGP SIGNATURE-----
Re: Name not being updated [message #156294 is a reply to message #156286] Thu, 18 October 2007 14:20 Go to previous message
Stefan Kuhn is currently offline Stefan KuhnFriend
Messages: 355
Registered: July 2009
Senior Member
-----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-----
Previous Topic:Popup menuelements appear where they shouldn't
Next Topic:Using ColorCellEditor
Goto Forum:
  


Current Time: Sat Jul 27 19:21:06 GMT 2024

Powered by FUDForum. Page generated in 0.03486 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top