Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » GMF (Graphical Modeling Framework) » Problem getUndoHistory (triggeredOperation) [eclipse 3.3 vs 3.4] from PropertyView
Problem getUndoHistory (triggeredOperation) [eclipse 3.3 vs 3.4] from PropertyView [message #227810] Tue, 28 April 2009 09:22 Go to next message
Eclipse UserFriend
Originally posted by: Robin.Brandstaedter.gmx.de

Hi i have a problem with the getUndoHistory of 3.4.
(I already posted it at eclipse.tools.emf
http://dev.eclipse.org/newslists/news.eclipse.tools.emf/msg4 0516.html)

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: Problem getUndoHistory (triggeredOperation) [eclipse 3.3 vs 3.4]from PropertyView [message #227896 is a reply to message #227810] Tue, 28 April 2009 11:50 Go to previous messageGo to next message
Alexander Shatalin is currently offline Alexander ShatalinFriend
Messages: 2928
Registered: July 2009
Senior Member
Hello Robin,

> 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.
Looks incorrect. How do you execute this command?

> 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
I think you can create bugzilla for it.

-----------------
Alex Shatalin
Re: Problem getUndoHistory (triggeredOperation) [eclipse 3.3 vs 3.4]from PropertyView [message #228317 is a reply to message #227896] Wed, 29 April 2009 12:44 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: Robin.Brandstaedter.gmx.de

Hello Alex,

>> 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.
> Looks incorrect. How do you execute this command?
Wich command do you mean, i just looked into the getUndoHistory command with
the debugger, until the line where the contexts are compared in the
AbstractOperation class.
You can see it in the code view:
http://img139.imageshack.us/img139/1479/elcipse33.png
http://img218.imageshack.us/img218/91/elcipse34.png

my code that executed the code.
public Object[] getElements(Object input) {

if(context!=null && history != null){

if(history.getRedoHistory(context).length >0){RedoList =
history.getRedoHistory(context);}

else RedoList = emptyArray;

Object [] elements =
connectArrays(history.getUndoHistory(context),RedoList); /*

return elements;

}

return emptyArray;

}

/* here is executed the command ; the getElements() method of the class
ViewContentProvider implements IStructuredContentProvider.
IOperationHistory history = OperationHistoryFactory.getOperationHistory();
context is the context of the current opened editor.

With command in the editor it works also in 3.4, but if i change something
in the propertyview a triggeredOperation is executed and this contains the
information (about "what you have done"),
but the context is only the WorkspaceCommandStackImpl$1 and not anymore the
ResourceUndoContext, the EditingDomainUndoContext (important this is the one
from the editor) and UndoContext.


>> 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
> I think you can create bugzilla for it.
With 3.4 generated editors it seems to work.
So you have to regenerate the editor, my fault.

thanks for your help

kind regards
Robin



"Alex Shatalin" <vano@borland.com> schrieb im Newsbeitrag
news:3c3172e62c8378cb961f6b076f85@news.eclipse.org...
> Hello Robin,
>
>> 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.
> Looks incorrect. How do you execute this command?
>
>> 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
> I think you can create bugzilla for it.
>
> -----------------
> Alex Shatalin
>
>
Re: Problem getUndoHistory (triggeredOperation) [eclipse 3.3 vs 3.4]from PropertyView [message #228992 is a reply to message #227896] Wed, 06 May 2009 13:42 Go to previous message
Eclipse UserFriend
Originally posted by: Robin.Brandstaedter.gmx.de

Hi Alex, i just tryed the new eclipse version incl. new emf gme gef etc. and
now it seems to work again.
So we try to use the newest eclipse and gmf versions and hope we have
nothing esle to change.
Thx for all aswers.

kind regards
Robin Brandstaedter


"Alex Shatalin" <vano@borland.com> schrieb im Newsbeitrag
news:3c3172e62c8378cb961f6b076f85@news.eclipse.org...
> Hello Robin,
>
>> 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.
> Looks incorrect. How do you execute this command?
>
>> 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
> I think you can create bugzilla for it.
>
> -----------------
> Alex Shatalin
>
>
Previous Topic:Views synchronization
Next Topic:[Announce] GMF 2.2.0M7 is available
Goto Forum:
  


Current Time: Fri Apr 19 16:52:34 GMT 2024

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

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

Back to the top