Bug 324747 - [Class Diagram] Error when copying elements from a package to another
Summary: [Class Diagram] Error when copying elements from a package to another
Status: RESOLVED FIXED
Alias: None
Product: Papyrus
Classification: Modeling
Component: Core (show other bugs)
Version: 1.0.0   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Benoit Maggi CLA
QA Contact:
URL:
Whiteboard: dx copy
Keywords:
Depends on:
Blocks: 290261
  Show dependency tree
 
Reported: 2010-09-08 10:18 EDT by saadia dhouib CLA
Modified: 2014-05-28 05:32 EDT (History)
3 users (show)

See Also:
rschnekenburger: luna+


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description saadia dhouib CLA 2010-09-08 10:18:26 EDT
When I copy some classes and their associations from a package to another,
I have the following error:

org.eclipse.gmf.runtime.notation.impl.DecorationNodeImpl cannot be cast to org.eclipse.gmf.runtime.notation.Diagram
java.lang.ClassCastException: org.eclipse.gmf.runtime.notation.impl.DecorationNodeImpl cannot be cast to org.eclipse.gmf.runtime.notation.Diagram
	at org.eclipse.gmf.runtime.diagram.core.util.ViewUtil.insertPersistedElement(ViewUtil.java:258)
	at org.eclipse.gmf.runtime.diagram.core.util.ViewUtil.insertChildView(ViewUtil.java:219)
	at org.eclipse.papyrus.diagram.common.commands.PapyrusDuplicateViewsCommand.doExecuteWithResult(PapyrusDuplicateViewsCommand.java:98)
	at org.eclipse.gmf.runtime.emf.commands.core.command.AbstractTransactionalCommand.doExecute(AbstractTransactionalCommand.java:247)
	at org.eclipse.emf.workspace.AbstractEMFOperation.execute(AbstractEMFOperation.java:150)
	at org.eclipse.gmf.runtime.diagram.ui.commands.ICommandProxy.execute(ICommandProxy.java:68)
	at org.eclipse.gmf.runtime.diagram.ui.commands.CommandProxy.doExecuteWithResult(CommandProxy.java:50)
	at org.eclipse.gmf.runtime.common.core.command.AbstractCommand.execute(AbstractCommand.java:135)
	at org.eclipse.papyrus.diagram.common.command.wrappers.GMFtoEMFCommandWrapper.execute(GMFtoEMFCommandWrapper.java:88)
	at org.eclipse.emf.workspace.EMFCommandOperation.doExecute(EMFCommandOperation.java:119)
	at org.eclipse.emf.workspace.AbstractEMFOperation.execute(AbstractEMFOperation.java:150)
	at org.eclipse.core.commands.operations.DefaultOperationHistory.execute(DefaultOperationHistory.java:511)
	at org.eclipse.emf.workspace.impl.WorkspaceCommandStackImpl.doExecute(WorkspaceCommandStackImpl.java:208)
	at org.eclipse.emf.transaction.impl.AbstractTransactionalCommandStack.execute(AbstractTransactionalCommandStack.java:165)
	at org.eclipse.emf.transaction.impl.AbstractTransactionalCommandStack.execute(AbstractTransactionalCommandStack.java:219)
	at org.eclipse.papyrus.diagram.common.providers.PapyrusDiagramGlobalActionHandler.getCommand(PapyrusDiagramGlobalActionHandler.java:118)
	at org.eclipse.gmf.runtime.common.ui.action.global.GlobalAction.doRun(GlobalAction.java:109)
	at org.eclipse.gmf.runtime.common.ui.action.AbstractActionHandler.run(AbstractActionHandler.java:359)
	at org.eclipse.gmf.runtime.common.ui.action.ActionManager$1.run(ActionManager.java:225)
	at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70)
	at org.eclipse.gmf.runtime.common.ui.action.ActionManager.run(ActionManager.java:223)
	at org.eclipse.gmf.runtime.common.ui.action.AbstractActionHandler.runWithEvent(AbstractActionHandler.java:377)
	at org.eclipse.jface.commands.ActionHandler.execute(ActionHandler.java:119)
	at org.eclipse.core.commands.Command.executeWithChecks(Command.java:476)
	at org.eclipse.core.commands.ParameterizedCommand.executeWithChecks(ParameterizedCommand.java:508)
	at org.eclipse.ui.internal.handlers.HandlerService.executeCommand(HandlerService.java:169)
	at org.eclipse.ui.internal.keys.WorkbenchKeyboard.executeCommand(WorkbenchKeyboard.java:468)
	at org.eclipse.ui.internal.keys.WorkbenchKeyboard.press(WorkbenchKeyboard.java:786)
	at org.eclipse.ui.internal.keys.WorkbenchKeyboard.processKeyEvent(WorkbenchKeyboard.java:885)
	at org.eclipse.ui.internal.keys.WorkbenchKeyboard.filterKeySequenceBindings(WorkbenchKeyboard.java:567)
	at org.eclipse.ui.internal.keys.WorkbenchKeyboard.access$3(WorkbenchKeyboard.java:508)
	at org.eclipse.ui.internal.keys.WorkbenchKeyboard$KeyDownFilter.handleEvent(WorkbenchKeyboard.java:123)
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
	at org.eclipse.swt.widgets.Display.filterEvent(Display.java:1253)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1052)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1077)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1062)
	at org.eclipse.swt.widgets.Widget.sendKeyEvent(Widget.java:1103)
	at org.eclipse.swt.widgets.Widget.sendKeyEvent(Widget.java:1099)
	at org.eclipse.swt.widgets.Widget.wmChar(Widget.java:1508)
	at org.eclipse.swt.widgets.Control.WM_CHAR(Control.java:4268)
	at org.eclipse.swt.widgets.Canvas.WM_CHAR(Canvas.java:345)
	at org.eclipse.swt.widgets.Control.windowProc(Control.java:4160)
	at org.eclipse.swt.widgets.Canvas.windowProc(Canvas.java:341)
	at org.eclipse.swt.widgets.Display.windowProc(Display.java:4873)
	at org.eclipse.swt.internal.win32.OS.DispatchMessageW(Native Method)
	at org.eclipse.swt.internal.win32.OS.DispatchMessage(OS.java:2459)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3655)
	at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2629)
	at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2593)
	at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2427)
	at org.eclipse.ui.internal.Workbench$7.run(Workbench.java:670)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
	at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:663)
	at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
	at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:115)
	at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:369)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.lang.reflect.Method.invoke(Unknown Source)
	at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:619)
	at org.eclipse.equinox.launcher.Main.basicRun(Main.java:574)
	at org.eclipse.equinox.launcher.Main.run(Main.java:1407)
	at org.eclipse.equinox.launcher.Main.main(Main.java:1383)
Comment 1 Patrick Tessier CLA 2013-02-13 05:49:55 EST
bug reproduced in 0.9.2 : org.eclipse.gmf.runtime.notation.impl.DecorationNodeImpl cannot be cast to org.eclipse.gmf.runtime.notation.Diagram
Comment 2 Ronan Bar CLA 2014-02-11 07:13:35 EST
I cannot reproduce this on 1.0.0v201402110553

Can it be closed?
Comment 3 Ronan Bar CLA 2014-02-11 07:14:56 EST
I performed the "copy" using drag & drop. We cannot do cut & paste as it is not supported yet.
Comment 4 Ronan Bar CLA 2014-03-18 19:09:06 EDT
Works fine in M6.
Comment 5 Remi Schnekenburger CLA 2014-05-28 05:32:08 EDT
Fixed in RC1. closing