Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 320052 - User can't edit an association in a diagram
Summary: User can't edit an association in a diagram
Status: RESOLVED FIXED
Alias: None
Product: Tigerstripe
Classification: Technology
Component: UI (show other bugs)
Version: unspecified   Edit
Hardware: PC Mac OS X - Carbon (unsup.)
: P3 major (vote)
Target Milestone: 0.5M0   Edit
Assignee: Navid Mehregani CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-07-15 19:18 EDT by Navid Mehregani CLA
Modified: 2010-08-24 13:37 EDT (History)
2 users (show)

See Also:


Attachments
Patch (2.33 KB, patch)
2010-07-21 19:27 EDT, Navid Mehregani CLA
no flags Details | Diff
Patch#2 (13.39 KB, patch)
2010-08-18 12:50 EDT, Navid Mehregani CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Navid Mehregani CLA 2010-07-15 19:18:21 EDT
Build Identifier: 

Clicking on the OK button on the dialog for editing an association results in an NPE and doesn't close

java.lang.NullPointerException
at org.eclipse.tigerstripe.workbench.ui.visualeditor.diagram.dialogs.AssociationPropertiesEditDialog.okPressed(AssociationPropertiesEditDialog.java:668)
at org.eclipse.jface.dialogs.Dialog.buttonPressed(Dialog.java:472)
at org.eclipse.jface.dialogs.Dialog$2.widgetSelected(Dialog.java:624)
at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:228)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
at org.eclipse.swt.widgets.Display.sendEvent(Display.java:3543)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1250)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1273)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1258)
at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:1079)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3441)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3100)
at org.eclipse.jface.window.Window.runEventLoop(Window.java:825)
at org.eclipse.jface.window.Window.open(Window.java:801)
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:501)
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:1474)
at org.eclipse.gef.tools.SelectEditPartTracker.performOpen(SelectEditPartTracker.java:194)
at org.eclipse.gef.tools.SelectEditPartTracker.handleDoubleClick(SelectEditPartTracker.java:137)
at org.eclipse.gef.tools.AbstractTool.mouseDoubleClick(AbstractTool.java:1074)
at org.eclipse.gef.tools.SelectionTool.mouseDoubleClick(SelectionTool.java:525)
at org.eclipse.gef.EditDomain.mouseDoubleClick(EditDomain.java:231)
at org.eclipse.gef.ui.parts.DomainEventDispatcher.dispatchMouseDoubleClicked(DomainEventDispatcher.java:291)
at org.eclipse.draw2d.LightweightSystem$EventHandler.mouseDoubleClick(LightweightSystem.java:518)
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.Display.sendEvent(Display.java:3543)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1250)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1273)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1258)
at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:1079)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3441)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3100)
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(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
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)
at org.eclipse.equinox.launcher.Main.main(Main.java:1287)

Reproducible: Always

Steps to Reproduce:
1. Double click on an Association in a class diagram
2. The edit dialog should pop up > edit something 
3. Click on OK > Notice that an NPE is logged in the Error Log and the dialog stays open
Comment 1 Navid Mehregani CLA 2010-07-21 19:27:52 EDT
Created attachment 174930 [details]
Patch

This patch fixes the NPE issue in the Edit association dialog.  However, modifying the name through this dialog will not work because of bugzilla#320571.
Comment 2 Chris Hartley CLA 2010-07-21 19:46:54 EDT
So for now can the the association name 'text box' be made not editable ?

Then at least the dialog box will be 'user safe' and we can look later on if this action still makes sense or not.
Comment 3 Eric Dillon CLA 2010-08-09 21:51:03 EDT
Let's disable the name box.
Comment 4 Navid Mehregani CLA 2010-08-18 12:50:57 EDT
Created attachment 176920 [details]
Patch#2

This patch disables the name field in the dialog.  It also fixes the regression introduced by bug#317653.  The values changed in the dialog weren't updating the diagram.  This patch addresses that issue by introducing a new interface.

New/modified files:

IMarkDirty (new iterface)
IAssociationArtifact
ClassDiagramSynchronizer
AssociationUpdateCommand
ArtifactManager
Comment 5 Navid Mehregani CLA 2010-08-24 11:56:09 EDT
Submitted fix.
Comment 6 Navid Mehregani CLA 2010-08-24 13:37:31 EDT
Also modified: AssociationPropertiesEditDialog