Community
Participate
Working Groups
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
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.
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.
Let's disable the name box.
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
Submitted fix.
Also modified: AssociationPropertiesEditDialog