Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 322899

Summary: [Class Diagram] Error when moving a set of classes and associations into a package
Product: [Modeling] Papyrus Reporter: saadia dhouib <dhouib>
Component: CoreAssignee: Patrick Tessier <Patrick.Tessier>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3    
Version: 0.7.0   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Attachments:
Description Flags
mylyn/context/zip none

Description saadia dhouib CLA 2010-08-17 09:22:12 EDT
When moving inside a package a set of classes linked together through associations and generalizations, I have the following error:

!ENTRY org.eclipse.core.commands 4 2 2010-08-17 15:06:10.218
!MESSAGE Problems occurred when invoking code from plug-in: "org.eclipse.core.commands".
!STACK 0
java.lang.NullPointerException
	at org.eclipse.papyrus.diagram.common.layout.SameAlignment.getEditPartRepresentationFor(SameAlignment.java:200)
	at org.eclipse.papyrus.diagram.common.helper.AlignmentLinkHelper.organizeSelection(AlignmentLinkHelper.java:145)
	at org.eclipse.papyrus.diagram.common.helper.AlignmentLinkHelper.createCommand(AlignmentLinkHelper.java:73)
	at org.eclipse.papyrus.diagram.common.actions.CustomAlignAction.getCommand(CustomAlignAction.java:210)
	at org.eclipse.gmf.runtime.diagram.ui.actions.DiagramAction.getCommand(DiagramAction.java:161)
	at org.eclipse.gmf.runtime.diagram.ui.actions.DiagramAction.calculateEnabled(DiagramAction.java:124)
	at org.eclipse.gmf.runtime.diagram.ui.actions.DiagramAction.refresh(DiagramAction.java:114)
	at org.eclipse.gmf.runtime.common.ui.action.AbstractActionHandler.historyNotification(AbstractActionHandler.java:602)
	at org.eclipse.core.commands.operations.DefaultOperationHistory$2.run(DefaultOperationHistory.java:939)
	at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
	at org.eclipse.core.commands.operations.DefaultOperationHistory.notifyListeners(DefaultOperationHistory.java:928)
	at org.eclipse.core.commands.operations.DefaultOperationHistory.notifyDone(DefaultOperationHistory.java:1002)
	at org.eclipse.core.commands.operations.DefaultOperationHistory.execute(DefaultOperationHistory.java:527)
	at org.eclipse.gmf.runtime.diagram.ui.parts.DiagramCommandStack.execute(DiagramCommandStack.java:206)
	at org.eclipse.gmf.runtime.diagram.ui.parts.DiagramCommandStack.execute(DiagramCommandStack.java:169)
	at org.eclipse.gmf.runtime.diagram.ui.parts.DiagramCommandStack.execute(DiagramCommandStack.java:156)
	at org.eclipse.gef.tools.AbstractTool.executeCommand(AbstractTool.java:426)
	at org.eclipse.gef.tools.AbstractTool.executeCurrentCommand(AbstractTool.java:443)
	at org.eclipse.gmf.runtime.diagram.ui.tools.DragEditPartsTrackerEx.executeCurrentCommand(DragEditPartsTrackerEx.java:151)
	at org.eclipse.gef.tools.DragEditPartsTracker.performDrag(DragEditPartsTracker.java:491)
	at org.eclipse.gef.tools.DragEditPartsTracker.handleButtonUp(DragEditPartsTracker.java:346)
	at org.eclipse.gef.tools.AbstractTool.mouseUp(AbstractTool.java:1206)
	at org.eclipse.gef.tools.SelectionTool.mouseUp(SelectionTool.java:572)
	at org.eclipse.gef.EditDomain.mouseUp(EditDomain.java:301)
	at org.eclipse.gef.ui.parts.DomainEventDispatcher.dispatchMouseReleased(DomainEventDispatcher.java:380)
	at org.eclipse.draw2d.LightweightSystem$EventHandler.mouseUp(LightweightSystem.java:548)
	at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:213)
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1053)
	at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4066)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3657)
	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 2010-08-17 11:19:18 EDT
Created attachment 176797 [details]
mylyn/context/zip

impacted classes
Comment 2 Patrick Tessier CLA 2010-08-17 11:20:32 EDT
the list contained null value, a test has been added.

Can you test before close the bug.
Comment 3 saadia dhouib CLA 2010-08-18 03:12:23 EDT
I have made a test, there is no more errors. But I can not see all the classes inside the package. Even if I enlarge the package, I can't see correctly all the classes and associations.
Comment 4 saadia dhouib CLA 2010-08-18 03:16:28 EDT
I works fine now, I have used the "arrange all" button, and I can see all the classes inside the package.
Comment 5 Patrick Tessier CLA 2011-02-28 08:13:53 EST
I close the bug