Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 316275 - [class diagram] Undo doesn't work after moving a nested classifier outside
Summary: [class diagram] Undo doesn't work after moving a nested classifier outside
Status: RESOLVED FIXED
Alias: None
Product: Papyrus
Classification: Modeling
Component: Core (show other bugs)
Version: 0.7.0   Edit
Hardware: PC Windows XP
: P3 major (vote)
Target Milestone: 0.7.0   Edit
Assignee: Patrick Tessier CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-06-09 08:17 EDT by Cedric Dumoulin CLA
Modified: 2011-08-10 04:16 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Cedric Dumoulin CLA 2010-06-09 08:17:02 EDT
- create a class A in a class diagram
- create nested class B inside A
- drag and drop B outside A
- do undo (ctrl-x) : an error occur:

org.eclipse.emf.common.util.BasicEList$BasicIndexOutOfBoundsException: index=4, size=4
	at org.eclipse.emf.common.util.BasicEList.get(BasicEList.java:352)
	at org.eclipse.emf.ecore.change.impl.ListChangeImpl.applyAndReverse(ListChangeImpl.java:535)
	at org.eclipse.emf.ecore.change.impl.ChangeDescriptionImpl.preApply(ChangeDescriptionImpl.java:474)
	at org.eclipse.emf.ecore.change.impl.ChangeDescriptionImpl.applyAndReverse(ChangeDescriptionImpl.java:321)
	at org.eclipse.emf.transaction.util.CompositeChangeDescription.applyAndReverse(CompositeChangeDescription.java:117)
	at org.eclipse.emf.workspace.AbstractEMFOperation.doUndo(AbstractEMFOperation.java:695)
	at org.eclipse.gmf.runtime.emf.commands.core.command.AbstractTransactionalCommand.doUndo(AbstractTransactionalCommand.java:260)
	at org.eclipse.emf.workspace.AbstractEMFOperation.undo(AbstractEMFOperation.java:370)
	at org.eclipse.gmf.runtime.common.core.command.CompositeCommand.doUndoWithResult(CompositeCommand.java:622)
	at org.eclipse.gmf.runtime.common.core.command.AbstractCommand.undo(AbstractCommand.java:216)
	at org.eclipse.core.commands.operations.DefaultOperationHistory.doUndo(DefaultOperationHistory.java:415)
	at org.eclipse.core.commands.operations.DefaultOperationHistory.undo(DefaultOperationHistory.java:1280)
	at org.eclipse.ui.operations.UndoActionHandler.runCommand(UndoActionHandler.java:78)
	at org.eclipse.ui.operations.OperationHistoryActionHandler$4.run(OperationHistoryActionHandler.java:311)
	at org.eclipse.jface.operation.ModalContext.runInCurrentThread(ModalContext.java:464)
	at org.eclipse.jface.operation.ModalContext.run(ModalContext.java:372)
	at org.eclipse.jface.dialogs.ProgressMonitorDialog.run(ProgressMonitorDialog.java:507)
Comment 1 Patrick Tessier CLA 2011-02-28 06:34:12 EST
it is impossible to drop outside. I change the severity of the bug to major
Comment 2 Patrick Tessier CLA 2011-08-10 04:13:19 EDT
It has been decided to not let the drop outside of an inner class .

The pb is more general. For the all label childs,the gmf layer try to do an add command on the diagram. If  the command cannot be executed, it tries to do only a drop i.e. move only the graphical element. (but the semantic has no change).

So the behavior seems strange  : sometimes this a refactor, sometimes this is only a graphical move.
Comment 3 Patrick Tessier CLA 2011-08-10 04:13:45 EDT
Done in the branch revision 5213
Comment 4 Patrick Tessier CLA 2011-08-10 04:16:23 EDT
Merge in the head 5214