Home » Modeling » EMF » Merge of TransactionalEditingDomains
| | | |
Re: Merge of TransactionalEditingDomains [message #487559 is a reply to message #487536] |
Wed, 23 September 2009 15:13 |
|
--=-pzY5n9X6xmf/HQccb8Kh
Content-Type: text/plain
Content-Transfer-Encoding: 7bit
Hi, Javi,
If you use the org.eclipse.emf.workspace plug-in's facilities for
integrating the editing domain and its command stack with the Eclipse
Workbench's IOperationHistory, then you can have your editors always
share a single editing domain while maintaining separate Undo/Redo
histories in the Edit menu.
When it happens that one editor starts making changes to the other
editor's resources, then their operation histories become aware of
dependencies in the ordering of changes to the two resources,
effectively "merging" the command-stacks.
All of this is demonstrated by the workbench-integrated transactional
editor example, which I suggest that you install and play with to see
how it works. You'll find it in the "File -> New -> Example..." menu,
the "EMF Model Transaction Plug-ins / Workspace Integration Example"
example.
HTH,
Christian
On Wed, 2009-09-23 at 10:35 -0400, Ed Merks wrote:
> Javi,
>
> No, I don't have any good ideas for how to make that happen. You'd
> have to not actually load the resource but rather share it. You'd have
> to merge the two command stacks. There seem to be endless obstacles to
> make it work...
>
>
> Francisco Javier Cano wrote:
> > Hello Ed,
> >
> > the situation where I need to join two editing domains is as follows:
> >
> > 1) create a new model A in editor 1
> > 2) create a new model B in editor 2
> > 3) in editor 2, load model A via the 'Load resource...' action
> >
> > I would like that both editors shared the same editing domain after
> > the 'Load resource...' action was used.
> >
> > Any idea in how to get both editors to share the same editing domain?
> >
> > Thanks in advance,
> > Javi
> > --
> >
> > Ed Merks wrote:
> >> Javi,
> >>
> >> I doubt that makes sense. I think you should share a single one in
> >> cases where you want just one.
> >>
> >>
> >> Francisco Javier Cano wrote:
> >>> Hello,
> >>>
> >>> I am creating a new registry for editing domains that are being used
> >>> by my editors and I have come upon certain situations where I would
> >>> like to merge two TransactionalEditingDomains into a single one.
> >>>
> >>> Is such a thing possible?
> >>> Where could I start looking?
> >>>
> >>> Thanks,
> >>> Javi
> >>> --
--=-pzY5n9X6xmf/HQccb8Kh
Content-Type: text/html; charset="utf-8"
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 TRANSITIONAL//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=UTF-8">
<META NAME="GENERATOR" CONTENT="GtkHTML/3.24.1.1">
</HEAD>
<BODY>
Hi, Javi,<BR>
<BR>
If you use the org.eclipse.emf.workspace plug-in's facilities for integrating the editing domain and its command stack with the Eclipse Workbench's IOperationHistory, then you can have your editors always share a single editing domain while maintaining separate Undo/Redo histories in the Edit menu.<BR>
<BR>
When it happens that one editor starts making changes to the other editor's resources, then their operation histories become aware of dependencies in the ordering of changes to the two resources, effectively "merging" the command-stacks.<BR>
<BR>
All of this is demonstrated by the workbench-integrated transactional editor example, which I suggest that you install and play with to see how it works. You'll find it in the "File -> New -> Example..." menu, the "EMF Model Transaction Plug-ins / Workspace Integration Example" example.<BR>
<BR>
HTH,<BR>
<BR>
Christian<BR>
<BR>
<BR>
On Wed, 2009-09-23 at 10:35 -0400, Ed Merks wrote:
<BLOCKQUOTE TYPE=CITE>
<PRE>
Javi,
No, I don't have any good ideas for how to make that happen. You'd
have to not actually load the resource but rather share it. You'd have
to merge the two command stacks. There seem to be endless obstacles to
make it work...
Francisco Javier Cano wrote:
> Hello Ed,
>
> the situation where I need to join two editing domains is as follows:
>
> 1) create a new model A in editor 1
> 2) create a new model B in editor 2
> 3) in editor 2, load model A via the 'Load resource...' action
>
> I would like that both editors shared the same editing domain after
> the 'Load resource...' action was used.
>
> Any idea in how to get both editors to share the same editing domain?
>
> Thanks in advance,
> Javi
> --
>
> Ed Merks wrote:
>> Javi,
>>
>> I doubt that makes sense. I think you should share a single one in
>> cases where you want just one.
>>
>>
>> Francisco Javier Cano wrote:
>>> Hello,
>>>
>>> I am creating a new registry for editing domains that are being used
>>> by my editors and I have come upon certain situations where I would
>>> like to merge two TransactionalEditingDomains into a single one.
>>>
>>> Is such a thing possible?
>>> Where could I start looking?
>>>
>>> Thanks,
>>> Javi
>>> --
</PRE>
</BLOCKQUOTE>
</BODY>
</HTML>
--=-pzY5n9X6xmf/HQccb8Kh--
|
|
|
Re: Merge of TransactionalEditingDomains [message #487703 is a reply to message #487559] |
Thu, 24 September 2009 08:12 |
Francisco Javier Cano Messages: 21 Registered: July 2009 |
Junior Member |
|
|
Thaks a lot!
Seems to be what I need.
Javi
--
Christian W. Damus wrote:
> Hi, Javi,
>
> If you use the org.eclipse.emf.workspace plug-in's facilities for
> integrating the editing domain and its command stack with the Eclipse
> Workbench's IOperationHistory, then you can have your editors always
> share a single editing domain while maintaining separate Undo/Redo
> histories in the Edit menu.
>
> When it happens that one editor starts making changes to the other
> editor's resources, then their operation histories become aware of
> dependencies in the ordering of changes to the two resources,
> effectively "merging" the command-stacks.
>
> All of this is demonstrated by the workbench-integrated transactional
> editor example, which I suggest that you install and play with to see
> how it works. You'll find it in the "File -> New -> Example..." menu,
> the "EMF Model Transaction Plug-ins / Workspace Integration Example"
> example.
>
> HTH,
>
> Christian
>
>
> On Wed, 2009-09-23 at 10:35 -0400, Ed Merks wrote:
>> Javi,
>>
>> No, I don't have any good ideas for how to make that happen. You'd
>> have to not actually load the resource but rather share it. You'd have
>> to merge the two command stacks. There seem to be endless obstacles to
>> make it work...
>>
>>
>> Francisco Javier Cano wrote:
>> > Hello Ed,
>> >
>> > the situation where I need to join two editing domains is as follows:
>> >
>> > 1) create a new model A in editor 1
>> > 2) create a new model B in editor 2
>> > 3) in editor 2, load model A via the 'Load resource...' action
>> >
>> > I would like that both editors shared the same editing domain after
>> > the 'Load resource...' action was used.
>> >
>> > Any idea in how to get both editors to share the same editing domain?
>> >
>> > Thanks in advance,
>> > Javi
>> > --
>> >
>> > Ed Merks wrote:
>> >> Javi,
>> >>
>> >> I doubt that makes sense. I think you should share a single one in
>> >> cases where you want just one.
>> >>
>> >>
>> >> Francisco Javier Cano wrote:
>> >>> Hello,
>> >>>
>> >>> I am creating a new registry for editing domains that are being used
>> >>> by my editors and I have come upon certain situations where I would
>> >>> like to merge two TransactionalEditingDomains into a single one.
>> >>>
>> >>> Is such a thing possible?
>> >>> Where could I start looking?
>> >>>
>> >>> Thanks,
>> >>> Javi
>> >>> --
|
|
|
Goto Forum:
Current Time: Sat Apr 27 04:15:15 GMT 2024
Powered by FUDForum. Page generated in 0.03898 seconds
|