Where to manipulate node creation? [message #137921] |
Wed, 20 June 2007 13:50 |
Eclipse User |
|
|
|
Originally posted by: snej_NO-SPAM_.esuark.de
Hi Newsgroup,
i want to make some changes programmatically when a node is created. I
read a lot of creation commands and i think that is where i have to
start, but where do i find those? Do i have to override a method from
the XXXEditPart like the handleNotificationEvent() method or similar?
Is there any workflow map or something similar where you can see what
happens (so which methods are called and which classes are involved) in
what order if a node/link is created? I mean, if you don't know the
"hole stuff", it could be kind of difficult to get a starting point ...
regards
jens
|
|
|
Re: Where to manipulate node creation? [message #138246 is a reply to message #137921] |
Thu, 21 June 2007 11:12 |
Eclipse User |
|
|
|
Originally posted by: khai.n.situvista.com
What exactly are "some changes" that you want to make?
What to change in the code depends on what you really want to change.
Can you give more information?
-- Khai --
Jens Krause wrote:
> Hi Newsgroup,
>
> i want to make some changes programmatically when a node is created. I
> read a lot of creation commands and i think that is where i have to
> start, but where do i find those? Do i have to override a method from
> the XXXEditPart like the handleNotificationEvent() method or similar?
>
> Is there any workflow map or something similar where you can see what
> happens (so which methods are called and which classes are involved) in
> what order if a node/link is created? I mean, if you don't know the
> "hole stuff", it could be kind of difficult to get a starting point ...
>
> regards
> jens
|
|
|
Re: Where to manipulate node creation? [message #139468 is a reply to message #138246] |
Tue, 26 June 2007 08:10 |
Eclipse User |
|
|
|
Originally posted by: snej_NO-SPAM_.esuark.de
Khai M Nguyen wrote:
> What exactly are "some changes" that you want to make?
> What to change in the code depends on what you really want to change.
>
> Can you give more information?
Sure, i want to generate an id for the node at creation time. In other
nodes i could do that simply with the handleNotificationEvent() method
because they need a label and when the user edits this i could generate
my id.
But now i have nodes that only have this id and some other attributes
but no label, so the handleNotificationEvent() method is not called and
i couldn't figure out where to start with my id generation ...
regards
jens
|
|
|
|
Re: Where to manipulate node creation? [message #139535 is a reply to message #139512] |
Tue, 26 June 2007 13:28 |
Eclipse User |
|
|
|
Originally posted by: snej_NO-SPAM_.esuark.de
Cherie Revells wrote:
> Jens,
>
> Sounds like your change will affect the semantic element in which case
> you probably want to make the EditHelper infrastructure handle this.
>
> Take a look at the "Developer's Guide to the Extensible Type Registry"
> in the online help. Here for your convenience:
> [Help url]
>
> In particular, take a look at the example titled "Configuring a new
> Element".
Thanks Cherie for your reply, but i think i didn't understand how to
manage this.
Well, in this example there is less information how it should work
theoretical. I mean i can't figure out what i need for my special
purpose. What is the structure behind this ConfigureLogicElementCommand?
And do this command exist in GMF 1.0.3? I can't resolve this.
I only need access to the moment the node is created, i then generate
the id in dependency on the parent of the node ...
jens
|
|
|
Re: Where to manipulate node creation? [message #139557 is a reply to message #139535] |
Tue, 26 June 2007 14:21 |
Eclipse User |
|
|
|
Originally posted by: snej_NO-SPAM_.esuark.de
Jens Krause wrote:
> Thanks Cherie for your reply, but i think i didn't understand how to
> manage this.
Well, it was kind of confusing that i can't resolve this method, it seem
so that this is GMF 2.0 stuff. But now i get access to my object i need
with the ConfigureElementCommand .. So thans for all :).
regards
jens
|
|
|
Re: Where to manipulate node creation? [message #139860 is a reply to message #137921] |
Wed, 27 June 2007 10:44 |
Eclipse User |
|
|
|
Originally posted by: 5d5.mail.ru
Typically elements are created by CreateElementCommand and it's
subclasses. GMF tooling generates dedicated creation commands for all
diagram elements. You may override doDefaultElementCreation() method to
init newly created elements as needed.
Jens Krause wrote:
> Hi Newsgroup,
>
> i want to make some changes programmatically when a node is created. I
> read a lot of creation commands and i think that is where i have to
> start, but where do i find those? Do i have to override a method from
> the XXXEditPart like the handleNotificationEvent() method or similar?
>
> Is there any workflow map or something similar where you can see what
> happens (so which methods are called and which classes are involved) in
> what order if a node/link is created? I mean, if you don't know the
> "hole stuff", it could be kind of difficult to get a starting point ...
>
> regards
> jens
|
|
|
Powered by
FUDForum. Page generated in 0.05240 seconds