Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » Merge of TransactionalEditingDomains
Merge of TransactionalEditingDomains [message #487450] Wed, 23 September 2009 10:01 Go to next message
Francisco Javier Cano is currently offline Francisco Javier CanoFriend
Messages: 21
Registered: July 2009
Junior Member
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
--
Re: Merge of TransactionalEditingDomains [message #487496 is a reply to message #487450] Wed, 23 September 2009 12:47 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33142
Registered: July 2009
Senior Member
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
> --


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: Merge of TransactionalEditingDomains [message #487527 is a reply to message #487496] Wed, 23 September 2009 14:26 Go to previous messageGo to next message
Francisco Javier Cano is currently offline Francisco Javier CanoFriend
Messages: 21
Registered: July 2009
Junior Member
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
>> --
Re: Merge of TransactionalEditingDomains [message #487536 is a reply to message #487527] Wed, 23 September 2009 14:35 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33142
Registered: July 2009
Senior Member
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
>>> --


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: Merge of TransactionalEditingDomains [message #487559 is a reply to message #487536] Wed, 23 September 2009 15:13 Go to previous messageGo to next message
Christian Damus is currently offline Christian DamusFriend
Messages: 1270
Registered: July 2009
Location: Canada
Senior Member

--=-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 &quot;merging&quot; 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.&nbsp; You'll find it in the &quot;File -&gt; New -&gt; Example...&quot; menu, the &quot;EMF Model Transaction Plug-ins / Workspace Integration Example&quot; 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:
&gt; Hello Ed,
&gt;
&gt; the situation where I need to join two editing domains is as follows:
&gt;
&gt; 1) create a new model A in editor 1
&gt; 2) create a new model B in editor 2
&gt; 3) in editor 2, load model A via the 'Load resource...' action
&gt;
&gt; I would like that both editors shared the same editing domain after
&gt; the 'Load resource...' action was used.
&gt;
&gt; Any idea in how to get both editors to share the same editing domain?
&gt;
&gt; Thanks in advance,
&gt; Javi
&gt; --
&gt;
&gt; Ed Merks wrote:
&gt;&gt; Javi,
&gt;&gt;
&gt;&gt; I doubt that makes sense. I think you should share a single one in
&gt;&gt; cases where you want just one.
&gt;&gt;
&gt;&gt;
&gt;&gt; Francisco Javier Cano wrote:
&gt;&gt;&gt; Hello,
&gt;&gt;&gt;
&gt;&gt;&gt; I am creating a new registry for editing domains that are being used
&gt;&gt;&gt; by my editors and I have come upon certain situations where I would
&gt;&gt;&gt; like to merge two TransactionalEditingDomains into a single one.
&gt;&gt;&gt;
&gt;&gt;&gt; Is such a thing possible?
&gt;&gt;&gt; Where could I start looking?
&gt;&gt;&gt;
&gt;&gt;&gt; Thanks,
&gt;&gt;&gt; Javi
&gt;&gt;&gt; --
</PRE>
</BLOCKQUOTE>
</BODY>
</HTML>

--=-pzY5n9X6xmf/HQccb8Kh--
Re: Merge of TransactionalEditingDomains [message #487703 is a reply to message #487559] Thu, 24 September 2009 08:12 Go to previous message
Francisco Javier Cano is currently offline Francisco Javier CanoFriend
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
>> >>> --
Previous Topic:MapEntry and ecore
Next Topic:how to reorder FeatureMap?
Goto Forum:
  


Current Time: Sat Apr 27 04:15:15 GMT 2024

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

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

Back to the top