Home » Modeling » EMF » getUndoHistory (triggeredOperation) [eclipse 3.3 vs 3.4]
getUndoHistory (triggeredOperation) [eclipse 3.3 vs 3.4] [message #429251] |
Wed, 15 April 2009 13:15 |
Eclipse User |
|
|
|
Originally posted by: Robin.Brandstaedter.gmx.de
Hi i have a problem with the getUndoHistory of 3.4.
I created a HistoryView, that worked on 3.3 already, but with eclipse 3.4 it
doesn't work anymore.
If I change a property in the propertyView of an element, this
triggeredOperation is in the undoList of the history, but if i use the
getUndoHistory command I dont get all operations. This is caused by a
comparison of the contexts:
here some screenshots
http://img139.imageshack.us/img139/1479/elcipse33.png
3.3 there are 3 contexts in the list of the operation, one of these is the
same as the one from the method-call.
http://img218.imageshack.us/img218/91/elcipse34.png
3.4 there is only 1context in the list of the operation,and this one has
nothing to do with the one from the method-call. But this is not correct i
think.
Another problem is in the graphical tool (gmf), on creating a new element
the operation has no label anymore (in 3.4), but had one (to example
"creating outport") label at 3.3
what should I do, to have the behavior of 3.3 in 3.4
eclipse 3.4; emf 2.4;gmf 2.1
VS
eclipse 3.3; emf 2.3.1; gmf 2.0.1
kind regards
Robin
|
|
|
Re: getUndoHistory (triggeredOperation) [eclipse 3.3 vs 3.4] [message #429531 is a reply to message #429251] |
Fri, 24 April 2009 10:29 |
Eclipse User |
|
|
|
Originally posted by: Robin.Brandstaedter.gmx.de
Hi again!
Maybe anybody has an idea to locate the problem more detailed or does
anybody know a way to fix the problem.
And How can i add the context of the editor to the contextlist of the
triggered Operation, or can i use some code of an older version?
Please help me, if you can.
kind regards
Robin Brandst
|
|
| |
Re: getUndoHistory (triggeredOperation) [eclipse 3.3 vs 3.4] [message #429556 is a reply to message #429251] |
Fri, 24 April 2009 13:34 |
|
--=-i8ePZ+sgshz0RhSqKYZ0
Content-Type: text/plain
Content-Transfer-Encoding: 7bit
Hi, Robin,
I never did know precisely what GMF does to attach its
EditingDomainUndoContext to operations, but it is clear from the "after"
screenshot that:
(a) your application is executing Commands on the command-stack, which
is the
only way that you would get the stack's default context attached
(b) your appplication is built on GMF, as you are expecting to see a
kind of context
that it defines (the EditingDomainUndoContext)
It is not recommended to execute Commands on the editing domain's stack
in GMF, but rather to wrap them in IUndoableOperations (an
EMFCommandOperation is provided for that purpose).
I seem to recall some uproar about a change in the way that open
composites (such as TriggeredOperations) collect contexts from their
children in the 3.4 release, that ... but I could be completely wrong.
Perhaps, what changed in 3.4 is that GMF is now executing
CompositeTransactionalCommands within the open composite and this bug is
preventing contexts from further nested commands from bubbling up?
http://bugs.eclipse.org/248483
I'm afraid this isn't of much help. You may find more answers in the
GMF newsgroup. As I said, I'm not familiar with the details of how they
manage undo contexts.
HTH,
Christian
On Wed, 2009-04-15 at 15:15 +0200, Robin Brandst?dter wrote:
> Hi i have a problem with the getUndoHistory of 3.4.
>
> I created a HistoryView, that worked on 3.3 already, but with eclipse 3.4 it
> doesn't work anymore.
> If I change a property in the propertyView of an element, this
> triggeredOperation is in the undoList of the history, but if i use the
> getUndoHistory command I dont get all operations. This is caused by a
> comparison of the contexts:
> here some screenshots
> http://img139.imageshack.us/img139/1479/elcipse33.png
> 3.3 there are 3 contexts in the list of the operation, one of these is the
> same as the one from the method-call.
>
> http://img218.imageshack.us/img218/91/elcipse34.png
> 3.4 there is only 1context in the list of the operation,and this one has
> nothing to do with the one from the method-call. But this is not correct i
> think.
>
> Another problem is in the graphical tool (gmf), on creating a new element
> the operation has no label anymore (in 3.4), but had one (to example
> "creating outport") label at 3.3
>
> what should I do, to have the behavior of 3.3 in 3.4
>
> eclipse 3.4; emf 2.4;gmf 2.1
> VS
> eclipse 3.3; emf 2.3.1; gmf 2.0.1
>
> kind regards
> Robin
>
>
--=-i8ePZ+sgshz0RhSqKYZ0
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, Robin,<BR>
<BR>
I never did know precisely what GMF does to attach its EditingDomainUndoContext to operations, but it is clear from the "after" screenshot that:<BR>
<BR>
(a) your application is executing Commands on the command-stack, which is the<BR>
only way that you would get the stack's default context attached<BR>
(b) your appplication is built on GMF, as you are expecting to see a kind of context<BR>
that it defines (the EditingDomainUndoContext)<BR>
<BR>
It is not recommended to execute Commands on the editing domain's stack in GMF, but rather to wrap them in IUndoableOperations (an EMFCommandOperation is provided for that purpose).<BR>
<BR>
I seem to recall some uproar about a change in the way that open composites (such as TriggeredOperations) collect contexts from their children in the 3.4 release, that ... but I could be completely wrong. Perhaps, what changed in 3.4 is that GMF is now executing CompositeTransactionalCommands within the open composite and this bug is preventing contexts from further nested commands from bubbling up?<BR>
<BR>
<A HREF="https://bugs.eclipse.org/bugs/show_bug.cgi?id=248483">http://bugs.eclipse.org/248483</A><BR>
<BR>
I'm afraid this isn't of much help. You may find more answers in the GMF newsgroup. As I said, I'm not familiar with the details of how they manage undo contexts.<BR>
<BR>
HTH,<BR>
<BR>
Christian<BR>
<BR>
On Wed, 2009-04-15 at 15:15 +0200, Robin Brandst?dter wrote:
<BLOCKQUOTE TYPE=CITE>
<PRE>
Hi i have a problem with the getUndoHistory of 3.4.
I created a HistoryView, that worked on 3.3 already, but with eclipse 3.4 it
doesn't work anymore.
If I change a property in the propertyView of an element, this
triggeredOperation is in the undoList of the history, but if i use the
getUndoHistory command I dont get all operations. This is caused by a
comparison of the contexts:
here some screenshots
<A HREF="http://img139.imageshack.us/img139/1479/elcipse33.png">http://img139.imageshack.us/img139/1479/elcipse33.png</A>
3.3 there are 3 contexts in the list of the operation, one of these is the
same as the one from the method-call.
<A HREF="http://img218.imageshack.us/img218/91/elcipse34.png">http://img218.imageshack.us/img218/91/elcipse34.png</A>
3.4 there is only 1context in the list of the operation,and this one has
nothing to do with the one from the method-call. But this is not correct i
think.
Another problem is in the graphical tool (gmf), on creating a new element
the operation has no label anymore (in 3.4), but had one (to example
"creating outport") label at 3.3
what should I do, to have the behavior of 3.3 in 3.4
eclipse 3.4; emf 2.4;gmf 2.1
VS
eclipse 3.3; emf 2.3.1; gmf 2.0.1
kind regards
Robin
</PRE>
</BLOCKQUOTE>
</BODY>
</HTML>
--=-i8ePZ+sgshz0RhSqKYZ0--
|
|
|
Goto Forum:
Current Time: Fri Apr 26 13:57:09 GMT 2024
Powered by FUDForum. Page generated in 0.02667 seconds
|