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

Bug 311996

Summary: TS creates broken associations
Product: [Technology] Tigerstripe Reporter: Chris Hartley <chrhartl>
Component: DiagramsAssignee: Yuri Strot <yuri>
Status: RESOLVED FIXED QA Contact:
Severity: critical    
Priority: P3 CC: erdillon, yuri
Version: 0.5M1   
Target Milestone: 0.5M0   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description Chris Hartley CLA 2010-05-06 21:35:01 EDT
both Sharmin and I have this issue

fails with this error

java.lang.IllegalArgumentException: Argument cannot be null
at org.eclipse.swt.SWT.error(SWT.java:3865)
at org.eclipse.swt.SWT.error(SWT.java:3799)
at org.eclipse.swt.SWT.error(SWT.java:3770)
at org.eclipse.swt.widgets.Widget.error(Widget.java:463)
at org.eclipse.swt.widgets.Text.setText(Text.java:1951)
at org.eclipse.tigerstripe.workbench.ui.visualeditor.diagram.dialogs.AssociationPropertiesEditDialog.createAssociationEditControl(AssociationPropertiesEditDialog.java:368)
at org.eclipse.tigerstripe.workbench.ui.visualeditor.diagram.dialogs.AssociationPropertiesEditDialog.createDialogArea(AssociationPropertiesEditDialog.java:174)
at org.eclipse.jface.dialogs.Dialog.createContents(Dialog.java:760)
at org.eclipse.jface.window.Window.create(Window.java:431)
at org.eclipse.jface.dialogs.Dialog.create(Dialog.java:1089)
at org.eclipse.jface.window.Window.open(Window.java:790)
at org.eclipse.tigerstripe.workbench.ui.visualeditor.diagram.edit.policies.AssociationOpenEditPolicy.getOpenCommand(AssociationOpenEditPolicy.java:69)
at org.eclipse.gmf.runtime.diagram.ui.editpolicies.OpenEditPolicy.getCommand(OpenEditPolicy.java:58)
at org.eclipse.gef.editparts.AbstractEditPart.getCommand(AbstractEditPart.java:473)
at org.eclipse.gmf.runtime.diagram.ui.editparts.ConnectionEditPart.access$0(ConnectionEditPart.java:1)
at org.eclipse.gmf.runtime.diagram.ui.editparts.ConnectionEditPart$3.run(ConnectionEditPart.java:598)
at org.eclipse.emf.transaction.impl.TransactionalEditingDomainImpl.runExclusive(TransactionalEditingDomainImpl.java:313)
at org.eclipse.gmf.runtime.diagram.ui.editparts.ConnectionEditPart.getCommand(ConnectionEditPart.java:593)
at org.eclipse.gmf.runtime.diagram.ui.editparts.ConnectionEditPart.performRequest(ConnectionEditPart.java:1469)
at org.eclipse.gef.tools.SelectEditPartTracker.performOpen(SelectEditPartTracker.java:187)
at org.eclipse.gef.tools.SelectEditPartTracker.handleDoubleClick(SelectEditPartTracker.java:131)
at org.eclipse.gef.tools.AbstractTool.mouseDoubleClick(AbstractTool.java:955)
at org.eclipse.gef.tools.SelectionTool.mouseDoubleClick(SelectionTool.java:501)
at org.eclipse.gef.EditDomain.mouseDoubleClick(EditDomain.java:208)
at org.eclipse.gef.ui.parts.DomainEventDispatcher.dispatchMouseDoubleClicked(DomainEventDispatcher.java:285)
at org.eclipse.draw2d.LightweightSystem$EventHandler.mouseDoubleClick(LightweightSystem.java:508)
at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:183)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1003)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3880)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3473)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2405)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2369)
at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2221)
at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:500)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:493)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:113)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:194)
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:368)
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:559)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:514)
at org.eclipse.equinox.launcher.Main.run(Main.java:1311)
Comment 1 Eric Dillon CLA 2010-06-01 18:16:30 EDT
Hi Chris,

do you have specific steps to reproduce? Creating an association on newly created model seems to work fine. So something else is probably going on,

Note that I suspect you're seeing a side effect of another bug that Richard is working on now where the model in memory gets out of sync with the state on disk when using SVN operation (e.g. an update is not correctly accounted for). As a result the model is broken in memory and could lead to scenarios like below.

See Bug 308620
Comment 2 Yuri Strot CLA 2010-06-28 10:51:33 EDT
I've reproduced this problem:
1. Add two entries and association between these entries.
2. Add class diagram and move there all components.
3. Now you can open Association Property Editor (double click on association) and enter empty value as a name of the aEnd or zEnd.
4. While on the diagram it will show old name the model will be change. So we can see empty name in the Tigerstripe Explorer. Also Artifact Editor can't be open because of NPE.
5. We can also remove association from the diagram and move it from the explorer again. It will show empty name for association end.
6. Association Property Editor can't be opened because of exception originally reported.

I think the correct solution is restrict empty names in the Association Property Editor. So we can show error message in this dialog or ignore invalid changes like it was done while saving Artifact Editor.
Comment 3 Yuri Strot CLA 2010-06-29 11:53:31 EDT
Added empty name check to the AssociationPropertiesEditDialog.