Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » GMF (Graphical Modeling Framework) » Explanation of Editing Domain Id in GMF editor
Explanation of Editing Domain Id in GMF editor [message #177943] Tue, 18 March 2008 18:10 Go to next message
Eclipse UserFriend
Originally posted by: gxquarel.txin.it

Here
http://wiki.eclipse.org/GMF_Tips#Sharing_single_EditingDomai n_instance_across_several_diagrams

you read

"Generated code always creates new (own) instance of EditingDomain for each
opened diagram editor"

(do not consider the topic of the link, but only the above sentence)

Analyzing the code of my RCP GMF generated editor I understand that, but if
each editor has its own instance of EditingDomain, why all use the same ID
in the registry?

Thanks

Giovanni
Re: Explanation of Editing Domain Id in GMF editor [message #178022 is a reply to message #177943] Wed, 19 March 2008 01:42 Go to previous messageGo to next message
Alexander Shatalin is currently offline Alexander ShatalinFriend
Messages: 2928
Registered: July 2009
Senior Member
Hello Giovanni,

> Analyzing the code of my RCP GMF generated editor I understand that,
> but if each editor has its own instance of EditingDomain, why all use
> the same ID in the registry?
By default generated code does not use Registry to create EditingDomain instances.

Yes, all the newly created EditingDomains will have same ID.

-----------------
Alex Shatalin
Re: Explanation of Editing Domain Id in GMF editor [message #178171 is a reply to message #178022] Wed, 19 March 2008 17:34 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: gxquarel.txin.it

Indeed I will have trouble only if I retrive an EditingDomain from the
registry: in this case I'll get the last registered one.
So watching the code the ID is useful only for the enablement of
clientContext...
But at the moment I don't know what is a clientContentx, can you give a
brief description?
As you confirm all EditingDomains have same ID, so this "clientContext" is
always enabled, isn't it?
Thanks

Giovanni

"Alex Shatalin" <vano@borland.com> ha scritto nel messaggio
news:3c3172e61f9cb8ca573eeb435ba8@news.eclipse.org...
> Hello Giovanni,
>
>> Analyzing the code of my RCP GMF generated editor I understand that,
>> but if each editor has its own instance of EditingDomain, why all use
>> the same ID in the registry?
> By default generated code does not use Registry to create EditingDomain
> instances.
> Yes, all the newly created EditingDomains will have same ID.
>
> -----------------
> Alex Shatalin
>
>
Re: Explanation of Editing Domain Id in GMF editor [message #178246 is a reply to message #178171] Wed, 19 March 2008 21:14 Go to previous messageGo to next message
Alexander Shatalin is currently offline Alexander ShatalinFriend
Messages: 2928
Registered: July 2009
Senior Member
Hello Giovanni,

> Indeed I will have trouble only if I retrive an EditingDomain from the
> registry: in this case I'll get the last registered one.
You'll always get the same EditingDomain instance from the registry - this
is whow this registry was created. To get new instance of EditingDomain per
each "pair of eidtors" you have to create your own EditingDomain registry
and create/dispatch existing EditingDomain instances from there using additional
parameters (id of the "pair").

-----------------
Alex Shatalin
Re: Explanation of Editing Domain Id in GMF editor [message #178478 is a reply to message #178246] Thu, 20 March 2008 19:52 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: gxquarel.txin.it

I created my own registry so I have one EditingDomain per file.
Anyway I suppose it is mandatory to set the same ID to all of them to make
the client context working.
Isn't it?

Thanks

Giovanni


"Alex Shatalin" <vano@borland.com> ha scritto nel messaggio
news:3c3172e61fa988ca57e2b44f0e22@news.eclipse.org...
> Hello Giovanni,
>
>> Indeed I will have trouble only if I retrive an EditingDomain from the
>> registry: in this case I'll get the last registered one.
> You'll always get the same EditingDomain instance from the registry - this
> is whow this registry was created. To get new instance of EditingDomain
> per each "pair of eidtors" you have to create your own EditingDomain
> registry and create/dispatch existing EditingDomain instances from there
> using additional parameters (id of the "pair").
>
> -----------------
> Alex Shatalin
>
>
Re: Explanation of Editing Domain Id in GMF editor [message #178514 is a reply to message #178478] Thu, 20 March 2008 20:27 Go to previous message
Alexander Shatalin is currently offline Alexander ShatalinFriend
Messages: 2928
Registered: July 2009
Senior Member
Hello Giovanni,

Yes it is.

-----------------
Alex Shatalin
Previous Topic:Creating several nodes+links with only one palette action
Next Topic:removing items from the popup menu
Goto Forum:
  


Current Time: Sat Apr 27 02:29:59 GMT 2024

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

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

Back to the top