Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF "Technology" (Ecore Tools, EMFatic, etc)  » [Transactions] multiple editing domains for one resource set
[Transactions] multiple editing domains for one resource set [message #67705] Tue, 09 January 2007 12:19 Go to next message
Eclipse UserFriend
Originally posted by: jacek.pospychala.gmail.com

Hi!

is it possible to have many editing domains for one resource set?
What i would like to do is to have separate editing domain for an
editor, for my analysis plug-ins and for something else.
Then editor could easily use undo/redo in it's editing domain, and other
plugins in the same way. But they'll be operating on a shared model.

thanks for any suggestions

Jacek Pospychala
Re: [Transactions] multiple editing domains for one resource set [message #67812 is a reply to message #67705] Thu, 11 January 2007 10:31 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: jacek.pospychala.gmail.com

Ok, i have found many editing domains to work. however i am still
interested in relations between transactions from separate domains, that
use the same (and different) objects in one resource.

Jacek Pospychala napisał(a):
> Hi!
>
> is it possible to have many editing domains for one resource set?
> What i would like to do is to have separate editing domain for an
> editor, for my analysis plug-ins and for something else.
> Then editor could easily use undo/redo in it's editing domain, and other
> plugins in the same way. But they'll be operating on a shared model.
>
> thanks for any suggestions
>
> Jacek Pospychala
Re: [Transactions] multiple editing domains for one resource set [message #67997 is a reply to message #67812] Thu, 11 January 2007 22:28 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: cdamus.ca.ibm.com

Hi, Jacek,

Are you sure that this works as you expect? Each of the editing domains
that you have associated with your resource set will be independently
recording *all* changes in that resource set.

If your different editors, in their different editing domains, don't always
undo all of their command stacks and redo them in sync, then the model
(i.e., contents of the resource set) will be out of sync with the command
stacks of your editing domains. Undo/redo of a command is only valid when
the resource set is in the state that it was in when that command was last
done/undone (respectively).

The relationship between editing domain and resource set is intended to be
1:1, especially in the case of the transactional editing domain.

Cheers,

Christian


Jacek Pospychala wrote:

> Ok, i have found many editing domains to work. however i am still
> interested in relations between transactions from separate domains, that
> use the same (and different) objects in one resource.
>
> Jacek Pospychala napisał(a):
>> Hi!
>>
>> is it possible to have many editing domains for one resource set?
>> What i would like to do is to have separate editing domain for an
>> editor, for my analysis plug-ins and for something else.
>> Then editor could easily use undo/redo in it's editing domain, and other
>> plugins in the same way. But they'll be operating on a shared model.
>>
>> thanks for any suggestions
>>
>> Jacek Pospychala
Re: [Transactions] multiple editing domains for one resource set [message #68039 is a reply to message #67997] Thu, 11 January 2007 22:57 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: jacekp.siat.pl

You're right - i was tooo optimistic

I have only succeeded with creating many editing domains (for 1 ResSet)
and accessing objects through these domains. performing changes on more
than one of them resulted with "transaction is closed" or "needs write
permission".

I suppose, synchronising many domains would require much more
sophisticated transaction mechanisms, that the current ones. Anyway i
consider two other solutions now:
1. if an editing domain could be associated to only a resource or a part
of model and not whole resource set. that would be great, because most
of the time editors will be modifying distinct parts of model.

2. if i could make a copy of resource set, or a part of it, create a
temporary resource set, associate editing domain, and apply changes from
time to time by merging temporary resource set with the original one.

what do you think?

Jacek

Christian W. Damus napisał(a):
> Hi, Jacek,
>
> Are you sure that this works as you expect? Each of the editing domains
> that you have associated with your resource set will be independently
> recording *all* changes in that resource set.
>
> If your different editors, in their different editing domains, don't always
> undo all of their command stacks and redo them in sync, then the model
> (i.e., contents of the resource set) will be out of sync with the command
> stacks of your editing domains. Undo/redo of a command is only valid when
> the resource set is in the state that it was in when that command was last
> done/undone (respectively).
>
> The relationship between editing domain and resource set is intended to be
> 1:1, especially in the case of the transactional editing domain.
>
> Cheers,
>
> Christian
>
>
> Jacek Pospychala wrote:
>
>> Ok, i have found many editing domains to work. however i am still
>> interested in relations between transactions from separate domains, that
>> use the same (and different) objects in one resource.
>>
>> Jacek Pospychala napisał(a):
>>> Hi!
>>>
>>> is it possible to have many editing domains for one resource set?
>>> What i would like to do is to have separate editing domain for an
>>> editor, for my analysis plug-ins and for something else.
>>> Then editor could easily use undo/redo in it's editing domain, and other
>>> plugins in the same way. But they'll be operating on a shared model.
>>>
>>> thanks for any suggestions
>>>
>>> Jacek Pospychala
>
Re: [Transactions] multiple editing domains for one resource set [message #68057 is a reply to message #68039] Thu, 11 January 2007 23:39 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: cdamus.ca.ibm.com

Hi, Jacek,

Yes, every time that you wish to make a change to the model, you would have
to open a transaction in *every* editing domain.

The editing domain really is intended to manage an entire resource set. If
your different editors are editing independent resources, then you can
certainly keep these resources in different resource sets, each with its
own editing domain. However, merging changes between different copies of
the same resources is going to be problematic: first, you need some kind
of compare/merge facility and, second, any merge would have to be recorded
and placed on the Undo/Redo history of the editor doing the merge. I doubt
that you want your users to be able to undo these merges ;-)

Why do your editors need their own editing domains? I know of several
GMF-based applications that work very well with multiple editors editing
different resources in the same resource set and editing domain. If you
use the org.eclipse.emf.workspace plug-in to implement your Undo/Redo menus
using the Eclipse IOperationHistory API, then you will get independent
undo/redo actions in your different editors when the changes in an editor
do not affect the other editors' resources. Where a change does affect
multiple editors' resources, then all affected editors will have the same
action on their Undo menus.

Try installing the "EMFT Workspace Integration" editor example in your
workspace to see how this works in practice. You will find it in the
"New -> Project..." menu, in the Examples category.

HTH,

Christian


Jacek Pospychala wrote:

> You're right - i was tooo optimistic
>
> I have only succeeded with creating many editing domains (for 1 ResSet)
> and accessing objects through these domains. performing changes on more
> than one of them resulted with "transaction is closed" or "needs write
> permission".
>
> I suppose, synchronising many domains would require much more
> sophisticated transaction mechanisms, that the current ones. Anyway i
> consider two other solutions now:
> 1. if an editing domain could be associated to only a resource or a part
> of model and not whole resource set. that would be great, because most
> of the time editors will be modifying distinct parts of model.
>
> 2. if i could make a copy of resource set, or a part of it, create a
> temporary resource set, associate editing domain, and apply changes from
> time to time by merging temporary resource set with the original one.
>
> what do you think?
>
> Jacek

<snip>
Re: [Transactions] multiple editing domains for one resource set [message #68074 is a reply to message #68057] Fri, 12 January 2007 00:39 Go to previous message
Eclipse UserFriend
Originally posted by: jacekp.siat.pl

thanks! i'll look at emf.workspace tomorrow. i thought it only adapts
emf.transactions to eclipse operations framework, but now it looks more
like that what i want.

Christian W. Damus napisał(a):
> Hi, Jacek,
>
> Yes, every time that you wish to make a change to the model, you would have
> to open a transaction in *every* editing domain.
>
> The editing domain really is intended to manage an entire resource set. If
> your different editors are editing independent resources, then you can
> certainly keep these resources in different resource sets, each with its
> own editing domain. However, merging changes between different copies of
> the same resources is going to be problematic: first, you need some kind
> of compare/merge facility and, second, any merge would have to be recorded
> and placed on the Undo/Redo history of the editor doing the merge. I doubt
> that you want your users to be able to undo these merges ;-)
>
> Why do your editors need their own editing domains? I know of several
> GMF-based applications that work very well with multiple editors editing
> different resources in the same resource set and editing domain. If you
> use the org.eclipse.emf.workspace plug-in to implement your Undo/Redo menus
> using the Eclipse IOperationHistory API, then you will get independent
> undo/redo actions in your different editors when the changes in an editor
> do not affect the other editors' resources. Where a change does affect
> multiple editors' resources, then all affected editors will have the same
> action on their Undo menus.
>
> Try installing the "EMFT Workspace Integration" editor example in your
> workspace to see how this works in practice. You will find it in the
> "New -> Project..." menu, in the Examples category.
>
> HTH,
>
> Christian
>
>
> Jacek Pospychala wrote:
>
>> You're right - i was tooo optimistic
>>
>> I have only succeeded with creating many editing domains (for 1 ResSet)
>> and accessing objects through these domains. performing changes on more
>> than one of them resulted with "transaction is closed" or "needs write
>> permission".
>>
>> I suppose, synchronising many domains would require much more
>> sophisticated transaction mechanisms, that the current ones. Anyway i
>> consider two other solutions now:
>> 1. if an editing domain could be associated to only a resource or a part
>> of model and not whole resource set. that would be great, because most
>> of the time editors will be modifying distinct parts of model.
>>
>> 2. if i could make a copy of resource set, or a part of it, create a
>> temporary resource set, associate editing domain, and apply changes from
>> time to time by merging temporary resource set with the original one.
>>
>> what do you think?
>>
>> Jacek
>
> <snip>
Re: [Transactions] multiple editing domains for one resource set [message #601098 is a reply to message #67705] Thu, 11 January 2007 10:31 Go to previous message
Jacek Pospychala is currently offline Jacek PospychalaFriend
Messages: 159
Registered: July 2009
Senior Member
Ok, i have found many editing domains to work. however i am still
interested in relations between transactions from separate domains, that
use the same (and different) objects in one resource.

Jacek Pospychala napisał(a):
> Hi!
>
> is it possible to have many editing domains for one resource set?
> What i would like to do is to have separate editing domain for an
> editor, for my analysis plug-ins and for something else.
> Then editor could easily use undo/redo in it's editing domain, and other
> plugins in the same way. But they'll be operating on a shared model.
>
> thanks for any suggestions
>
> Jacek Pospychala
Re: [Transactions] multiple editing domains for one resource set [message #601176 is a reply to message #67812] Thu, 11 January 2007 22:28 Go to previous message
Eclipse UserFriend
Originally posted by: cdamus.ca.ibm.com

Hi, Jacek,

Are you sure that this works as you expect? Each of the editing domains
that you have associated with your resource set will be independently
recording *all* changes in that resource set.

If your different editors, in their different editing domains, don't always
undo all of their command stacks and redo them in sync, then the model
(i.e., contents of the resource set) will be out of sync with the command
stacks of your editing domains. Undo/redo of a command is only valid when
the resource set is in the state that it was in when that command was last
done/undone (respectively).

The relationship between editing domain and resource set is intended to be
1:1, especially in the case of the transactional editing domain.

Cheers,

Christian


Jacek Pospychala wrote:

> Ok, i have found many editing domains to work. however i am still
> interested in relations between transactions from separate domains, that
> use the same (and different) objects in one resource.
>
> Jacek Pospychala napisał(a):
>> Hi!
>>
>> is it possible to have many editing domains for one resource set?
>> What i would like to do is to have separate editing domain for an
>> editor, for my analysis plug-ins and for something else.
>> Then editor could easily use undo/redo in it's editing domain, and other
>> plugins in the same way. But they'll be operating on a shared model.
>>
>> thanks for any suggestions
>>
>> Jacek Pospychala
Re: [Transactions] multiple editing domains for one resource set [message #601183 is a reply to message #67997] Thu, 11 January 2007 22:57 Go to previous message
Jacek Pospychala is currently offline Jacek PospychalaFriend
Messages: 159
Registered: July 2009
Senior Member
You're right - i was tooo optimistic

I have only succeeded with creating many editing domains (for 1 ResSet)
and accessing objects through these domains. performing changes on more
than one of them resulted with "transaction is closed" or "needs write
permission".

I suppose, synchronising many domains would require much more
sophisticated transaction mechanisms, that the current ones. Anyway i
consider two other solutions now:
1. if an editing domain could be associated to only a resource or a part
of model and not whole resource set. that would be great, because most
of the time editors will be modifying distinct parts of model.

2. if i could make a copy of resource set, or a part of it, create a
temporary resource set, associate editing domain, and apply changes from
time to time by merging temporary resource set with the original one.

what do you think?

Jacek

Christian W. Damus napisał(a):
> Hi, Jacek,
>
> Are you sure that this works as you expect? Each of the editing domains
> that you have associated with your resource set will be independently
> recording *all* changes in that resource set.
>
> If your different editors, in their different editing domains, don't always
> undo all of their command stacks and redo them in sync, then the model
> (i.e., contents of the resource set) will be out of sync with the command
> stacks of your editing domains. Undo/redo of a command is only valid when
> the resource set is in the state that it was in when that command was last
> done/undone (respectively).
>
> The relationship between editing domain and resource set is intended to be
> 1:1, especially in the case of the transactional editing domain.
>
> Cheers,
>
> Christian
>
>
> Jacek Pospychala wrote:
>
>> Ok, i have found many editing domains to work. however i am still
>> interested in relations between transactions from separate domains, that
>> use the same (and different) objects in one resource.
>>
>> Jacek Pospychala napisał(a):
>>> Hi!
>>>
>>> is it possible to have many editing domains for one resource set?
>>> What i would like to do is to have separate editing domain for an
>>> editor, for my analysis plug-ins and for something else.
>>> Then editor could easily use undo/redo in it's editing domain, and other
>>> plugins in the same way. But they'll be operating on a shared model.
>>>
>>> thanks for any suggestions
>>>
>>> Jacek Pospychala
>
Re: [Transactions] multiple editing domains for one resource set [message #601192 is a reply to message #68039] Thu, 11 January 2007 23:39 Go to previous message
Eclipse UserFriend
Originally posted by: cdamus.ca.ibm.com

Hi, Jacek,

Yes, every time that you wish to make a change to the model, you would have
to open a transaction in *every* editing domain.

The editing domain really is intended to manage an entire resource set. If
your different editors are editing independent resources, then you can
certainly keep these resources in different resource sets, each with its
own editing domain. However, merging changes between different copies of
the same resources is going to be problematic: first, you need some kind
of compare/merge facility and, second, any merge would have to be recorded
and placed on the Undo/Redo history of the editor doing the merge. I doubt
that you want your users to be able to undo these merges ;-)

Why do your editors need their own editing domains? I know of several
GMF-based applications that work very well with multiple editors editing
different resources in the same resource set and editing domain. If you
use the org.eclipse.emf.workspace plug-in to implement your Undo/Redo menus
using the Eclipse IOperationHistory API, then you will get independent
undo/redo actions in your different editors when the changes in an editor
do not affect the other editors' resources. Where a change does affect
multiple editors' resources, then all affected editors will have the same
action on their Undo menus.

Try installing the "EMFT Workspace Integration" editor example in your
workspace to see how this works in practice. You will find it in the
"New -> Project..." menu, in the Examples category.

HTH,

Christian


Jacek Pospychala wrote:

> You're right - i was tooo optimistic
>
> I have only succeeded with creating many editing domains (for 1 ResSet)
> and accessing objects through these domains. performing changes on more
> than one of them resulted with "transaction is closed" or "needs write
> permission".
>
> I suppose, synchronising many domains would require much more
> sophisticated transaction mechanisms, that the current ones. Anyway i
> consider two other solutions now:
> 1. if an editing domain could be associated to only a resource or a part
> of model and not whole resource set. that would be great, because most
> of the time editors will be modifying distinct parts of model.
>
> 2. if i could make a copy of resource set, or a part of it, create a
> temporary resource set, associate editing domain, and apply changes from
> time to time by merging temporary resource set with the original one.
>
> what do you think?
>
> Jacek

<snip>
Re: [Transactions] multiple editing domains for one resource set [message #601202 is a reply to message #68057] Fri, 12 January 2007 00:39 Go to previous message
Jacek Pospychala is currently offline Jacek PospychalaFriend
Messages: 159
Registered: July 2009
Senior Member
thanks! i'll look at emf.workspace tomorrow. i thought it only adapts
emf.transactions to eclipse operations framework, but now it looks more
like that what i want.

Christian W. Damus napisał(a):
> Hi, Jacek,
>
> Yes, every time that you wish to make a change to the model, you would have
> to open a transaction in *every* editing domain.
>
> The editing domain really is intended to manage an entire resource set. If
> your different editors are editing independent resources, then you can
> certainly keep these resources in different resource sets, each with its
> own editing domain. However, merging changes between different copies of
> the same resources is going to be problematic: first, you need some kind
> of compare/merge facility and, second, any merge would have to be recorded
> and placed on the Undo/Redo history of the editor doing the merge. I doubt
> that you want your users to be able to undo these merges ;-)
>
> Why do your editors need their own editing domains? I know of several
> GMF-based applications that work very well with multiple editors editing
> different resources in the same resource set and editing domain. If you
> use the org.eclipse.emf.workspace plug-in to implement your Undo/Redo menus
> using the Eclipse IOperationHistory API, then you will get independent
> undo/redo actions in your different editors when the changes in an editor
> do not affect the other editors' resources. Where a change does affect
> multiple editors' resources, then all affected editors will have the same
> action on their Undo menus.
>
> Try installing the "EMFT Workspace Integration" editor example in your
> workspace to see how this works in practice. You will find it in the
> "New -> Project..." menu, in the Examples category.
>
> HTH,
>
> Christian
>
>
> Jacek Pospychala wrote:
>
>> You're right - i was tooo optimistic
>>
>> I have only succeeded with creating many editing domains (for 1 ResSet)
>> and accessing objects through these domains. performing changes on more
>> than one of them resulted with "transaction is closed" or "needs write
>> permission".
>>
>> I suppose, synchronising many domains would require much more
>> sophisticated transaction mechanisms, that the current ones. Anyway i
>> consider two other solutions now:
>> 1. if an editing domain could be associated to only a resource or a part
>> of model and not whole resource set. that would be great, because most
>> of the time editors will be modifying distinct parts of model.
>>
>> 2. if i could make a copy of resource set, or a part of it, create a
>> temporary resource set, associate editing domain, and apply changes from
>> time to time by merging temporary resource set with the original one.
>>
>> what do you think?
>>
>> Jacek
>
> <snip>
Previous Topic:Versions of OCL
Next Topic:How to call invoke transform agasin each eClass
Goto Forum:
  


Current Time: Fri Mar 29 08:01:21 GMT 2024

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

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

Back to the top