eclipse-archived / triquetrum

Triquetrum project
Other
13 stars 14 forks source link

NPE while trying to edit parameters #353

Closed cxbrooks closed 3 years ago

cxbrooks commented 4 years ago

I'm working on updating to Bug #346 Update to Eclipse 2020-06.

I'm working in a branch: cxbrooks/enh/346/eclipse-2020-06-01

Following the instructions at http://wiki.eclipse.org/Triquetrum/Building_From_Sources, I check out the master, switch to the cxbrooks/enh/346/eclipse-2020-06-01 branch set the target and then run.

Editing parameters results in a NPE. See http://wiki.eclipse.org/Triquetrum/Getting_Started

OR

  1. Start Triquetrum
  2. Create a project
  3. Create a workflow
  4. Drag in the SDF Director and try to edit the parameters

I get the following:

  !ENTRY org.eclipse.graphiti.ui 4 0 2020-08-29 09:09:20.907
  !MESSAGE GFCommandStack.execute(Command) java.lang.NullPointerException
  !STACK 0
  java.lang.NullPointerException
    at java.util.concurrent.ConcurrentHashMap.get(ConcurrentHashMap.java:936)
    at org.eclipse.core.databinding.UpdateValueStrategy.findValidator(UpdateValueStrategy.java:281)
    at org.eclipse.core.databinding.UpdateValueStrategy.createValidator(UpdateValueStrategy.java:233)
    at org.eclipse.core.databinding.UpdateValueStrategy.fillDefaults(UpdateValueStrategy.java:258)
    at org.eclipse.core.databinding.DataBindingContext.bindValue(DataBindingContext.java:160)
    at org.eclipse.emf.ecp.view.spi.core.swt.renderer.TextControlSWTRenderer.bindValue(TextControlSWTRenderer.java:228)
    at org.eclipse.emf.ecp.view.spi.core.swt.renderer.TextControlSWTRenderer.createBindings(TextControlSWTRenderer.java:108)
    at org.eclipse.emf.ecp.view.spi.core.swt.SimpleControlSWTControlSWTRenderer.createControl(SimpleControlSWTControlSWTRenderer.java:74)
    at org.eclipse.emf.ecp.view.spi.core.swt.SimpleControlSWTRenderer.createEditControl(SimpleControlSWTRenderer.java:395)
    at org.eclipse.emf.ecp.view.spi.core.swt.SimpleControlSWTRenderer.renderControl(SimpleControlSWTRenderer.java:379)
    at org.eclipse.emfforms.spi.swt.core.AbstractSWTRenderer.render(AbstractSWTRenderer.java:205)
    at org.eclipse.emf.ecp.view.spi.core.swt.AbstractControlSWTRenderer.render(AbstractControlSWTRenderer.java:180)
    at org.eclipse.emf.ecp.view.spi.core.swt.ContainerSWTRenderer.renderControl(ContainerSWTRenderer.java:175)
    at org.eclipse.emf.ecp.view.internal.core.swt.renderer.ViewSWTRenderer.renderControl(ViewSWTRenderer.java:100)
    at org.eclipse.emfforms.spi.swt.core.AbstractSWTRenderer.render(AbstractSWTRenderer.java:205)
    at org.eclipse.emf.ecp.view.internal.swt.ECPSWTViewRendererImpl.render(ECPSWTViewRendererImpl.java:113)
    at org.eclipse.emf.ecp.view.internal.swt.ECPSWTViewRendererImpl.render(ECPSWTViewRendererImpl.java:78)
    at org.eclipse.emf.ecp.view.internal.swt.ECPSWTViewRendererImpl.render(ECPSWTViewRendererImpl.java:65)
    at org.eclipse.triquetrum.workflow.editor.views.NamedObjDialog.createDialogArea(NamedObjDialog.java:63)
    at org.eclipse.jface.dialogs.Dialog.createContents(Dialog.java:767)
    at org.eclipse.jface.window.Window.create(Window.java:431)
    at org.eclipse.jface.dialogs.Dialog.create(Dialog.java:1094)
    at org.eclipse.triquetrum.workflow.editor.views.NamedObjDialog.create(NamedObjDialog.java:79)
    at org.eclipse.jface.window.Window.open(Window.java:788)
    at org.eclipse.triquetrum.workflow.editor.features.ModelElementConfigureFeature.execute(ModelElementConfigureFeature.java:83)
    at org.eclipse.graphiti.features.custom.AbstractCustomFeature.execute(AbstractCustomFeature.java:77)
    at org.eclipse.graphiti.internal.command.GenericFeatureCommandWithContext.execute(GenericFeatureCommandWithContext.java:58)
    at org.eclipse.graphiti.ui.internal.command.GefCommandWrapper.execute(GefCommandWrapper.java:48)
    at org.eclipse.graphiti.ui.internal.editor.EmfOnGefCommand.execute(EmfOnGefCommand.java:51)
    at org.eclipse.graphiti.internal.command.GFPreparableCommand2.doExecute(GFPreparableCommand2.java:40)
    at org.eclipse.emf.transaction.RecordingCommand.execute(RecordingCommand.java:135)
    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:496)
    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.graphiti.ui.internal.editor.GFWorkspaceCommandStackImpl.execute(GFWorkspaceCommandStackImpl.java:94)
    at org.eclipse.graphiti.ui.internal.editor.GFCommandStack.execute(GFCommandStack.java:136)
    at org.eclipse.graphiti.ui.internal.parts.ShapeEditPart.performRequest(ShapeEditPart.java:572)
    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:1069)
    at org.eclipse.gef.tools.SelectionTool.mouseDoubleClick(SelectionTool.java:527)
    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:200)
    at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:89)
    at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4385)
    at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1512)
    at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1535)
    at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1520)
    at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:1324)
    at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4172)
    at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3789)
    at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$5.run(PartRenderingEngine.java:1158)
    at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:338)
    at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1047)
    at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:155)
    at org.eclipse.ui.internal.Workbench.lambda$3(Workbench.java:658)
    at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:338)
    at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:557)
    at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:154)
    at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:150)
    at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:203)
    at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:137)
    at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:107)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:401)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:255)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:657)
    at org.eclipse.equinox.launcher.Main.basicRun(Main.java:594)
    at org.eclipse.equinox.launcher.Main.run(Main.java:1447)
    at org.eclipse.equinox.launcher.Main.main(Main.java:1420)
laeubi commented 4 years ago

As org.eclipse.triquetrum.workflow.editor.views.NamedObjDialog.createDialogArea(NamedObjDialog.java:63) only calls a libary method it might be a bug/changed behavior in ECPSWTViewRenderer using the databinding wrong or a bug in the Databinding itself.

org.eclipse.core.databinding.UpdateValueStrategy.findValidator(Object, Object) has the following line:

result = validatorsByConverter.get(converter); but does not check if the converter is not null but relies on a boolean set before.

cxbrooks commented 4 years ago

This error does not occur in the origin/cxbrooks/enh/334/Triquetrum0.3.0 branch. With that branch, I can edit parameters.
A few possible resources:

cxbrooks commented 4 years ago

The error does occur in the origin/cxbrooks/enh/341/eclipse-2020-03-3 branch.

cxbrooks commented 4 years ago

The error does not occur in commit 93b013245ccc525014cb929117d358f910ad7b2f (Updated to 0.3.1., Oct 2019)

The error does occur in commit b5aff03c970ab3163f44edd00441c2e71c4531ab: (Apr 2020)

Updated to Eclipse 2019-12. Fix for xmlrpc.server/logging, too!

In progress: Triquetrum Bug #341: Update Triquetrum to Eclipse 2020-03 Fix: Triquetrum Bug #342: org.apache.xmlrpc.server: Missing Constraint: org.apache.commons.logging; version="[1.1.0,1.2.0)"

Looking at the diffs

<unit id="org.eclipse.ecf.core.feature.feature.group" version="1.5.3.v20190423-0625"/>

changed to

 <unit id="org.eclipse.ecf.core.feature.feature.group" version="1.5.400.v20191023-2007"/>
cxbrooks commented 4 years ago

Ah. It is the ecp version.

releng/org.eclipse.triquetrum.target.platform/org.eclipse.triquetrum.target.platform.tpd contains

location "http://download.eclipse.org/ecp/releases/releases_115/" {
    org.eclipse.emf.ecp.view.table.celleditor.rcp.feature.source.feature.group
    org.eclipse.emf.ecp.emfforms.sdk.feature.feature.group
}

If I update 115 to 116, regenerate the target, reload the target and run then I get further.

When attempt to edit the parameters of a SDF Director or an actor, the parameter window is displayed, which is a change from before when I got the NPE. However, now I get another NPE:

!ENTRY org.eclipse.ui 4 0 2020-08-30 09:15:21.383
!MESSAGE Unhandled event loop exception
!STACK 0
java.lang.NullPointerException
    at java.util.concurrent.ConcurrentHashMap.get(ConcurrentHashMap.java:936)
    at org.eclipse.core.databinding.UpdateValueStrategy.findValidator(UpdateValueStrategy.java:281)
    at org.eclipse.core.databinding.UpdateValueStrategy.createValidator(UpdateValueStrategy.java:233)
    at org.eclipse.core.databinding.UpdateValueStrategy.fillDefaults(UpdateValueStrategy.java:258)
    at org.eclipse.core.databinding.DataBindingContext.bindValue(DataBindingContext.java:160)
    at org.eclipse.emf.ecp.view.spi.table.swt.TableControlSWTRenderer$ECPTableEditingSupport.createBinding(TableControlSWTRenderer.java:2528)
    at org.eclipse.emf.ecp.view.spi.table.swt.TableControlSWTRenderer$ECPTableEditingSupport.initializeCellEditorValue(TableControlSWTRenderer.java:2512)
    at org.eclipse.jface.viewers.ColumnViewerEditor.activateCellEditor(ColumnViewerEditor.java:203)
    at org.eclipse.jface.viewers.ColumnViewerEditor.handleEditorActivationEvent(ColumnViewerEditor.java:435)
    at org.eclipse.jface.viewers.ColumnViewer.triggerEditorActivationEvent(ColumnViewer.java:680)
    at org.eclipse.jface.viewers.ColumnViewer.handleMouseDown(ColumnViewer.java:655)
    at org.eclipse.jface.viewers.ColumnViewer.access$0(ColumnViewer.java:651)
    at org.eclipse.jface.viewers.ColumnViewer$1.mouseDown(ColumnViewer.java:100)
    at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:196)
    at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:89)
    at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4385)
    at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1512)
    at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1535)
    at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1520)
    at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:1324)
    at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4172)
    at org.eclipse.swt.widgets.Display.applicationNextEventMatchingMask(Display.java:5253)
    at org.eclipse.swt.widgets.Display.applicationProc(Display.java:5652)
    at org.eclipse.swt.internal.cocoa.OS.objc_msgSendSuper(Native Method)
    at org.eclipse.swt.widgets.Widget.callSuper(Widget.java:235)
    at org.eclipse.swt.widgets.Widget.mouseDownSuper(Widget.java:1146)
    at org.eclipse.swt.widgets.Table.mouseDownSuper(Table.java:2106)
    at org.eclipse.swt.widgets.Widget.mouseDown(Widget.java:1138)
    at org.eclipse.swt.widgets.Control.mouseDown(Control.java:2621)
    at org.eclipse.swt.widgets.Table.mouseDown(Table.java:2077)
    at org.eclipse.swt.widgets.Display.windowProc(Display.java:6012)
    at org.eclipse.swt.internal.cocoa.OS.objc_msgSendSuper(Native Method)
    at org.eclipse.swt.widgets.Widget.callSuper(Widget.java:235)
    at org.eclipse.swt.widgets.Widget.windowSendEvent(Widget.java:2150)
    at org.eclipse.swt.widgets.Shell.windowSendEvent(Shell.java:2401)
    at org.eclipse.swt.widgets.Display.windowProc(Display.java:6136)
    at org.eclipse.swt.internal.cocoa.OS.objc_msgSendSuper(Native Method)
    at org.eclipse.swt.widgets.Display.applicationSendEvent(Display.java:5386)
    at org.eclipse.swt.widgets.Display.applicationProc(Display.java:5522)
    at org.eclipse.swt.internal.cocoa.OS.objc_msgSend(Native Method)
    at org.eclipse.swt.internal.cocoa.NSApplication.sendEvent(NSApplication.java:117)
    at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3786)
    at org.eclipse.jface.window.Window.runEventLoop(Window.java:823)
    at org.eclipse.jface.window.Window.open(Window.java:799)
    at org.eclipse.triquetrum.workflow.editor.features.ModelElementConfigureFeature.execute(ModelElementConfigureFeature.java:83)
    at org.eclipse.graphiti.features.custom.AbstractCustomFeature.execute(AbstractCustomFeature.java:77)
    at org.eclipse.graphiti.internal.command.GenericFeatureCommandWithContext.execute(GenericFeatureCommandWithContext.java:58)
    at org.eclipse.graphiti.ui.internal.command.GefCommandWrapper.execute(GefCommandWrapper.java:48)
    at org.eclipse.graphiti.ui.internal.editor.EmfOnGefCommand.execute(EmfOnGefCommand.java:51)
    at org.eclipse.graphiti.internal.command.GFPreparableCommand2.doExecute(GFPreparableCommand2.java:40)
    at org.eclipse.emf.transaction.RecordingCommand.execute(RecordingCommand.java:135)
    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:496)
    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.graphiti.ui.internal.editor.GFWorkspaceCommandStackImpl.execute(GFWorkspaceCommandStackImpl.java:94)
    at org.eclipse.graphiti.ui.internal.editor.GFCommandStack.execute(GFCommandStack.java:136)
    at org.eclipse.graphiti.ui.internal.parts.ShapeEditPart.performRequest(ShapeEditPart.java:572)
    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:1069)
    at org.eclipse.gef.tools.SelectionTool.mouseDoubleClick(SelectionTool.java:527)
    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:200)
    at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:89)
    at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4385)
    at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1512)
    at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1535)
    at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1520)
    at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:1324)
    at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4172)
    at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3789)
    at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$5.run(PartRenderingEngine.java:1158)
    at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:338)
    at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1047)
    at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:155)
    at org.eclipse.ui.internal.Workbench.lambda$3(Workbench.java:658)
    at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:338)
    at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:557)
    at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:154)
    at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:150)
    at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:203)
    at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:137)
    at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:107)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:401)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:255)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:657)
    at org.eclipse.equinox.launcher.Main.basicRun(Main.java:594)
    at org.eclipse.equinox.launcher.Main.run(Main.java:1447)
    at org.eclipse.equinox.launcher.Main.main(Main.java:1420)

BTW - I found Bug 566073 - NPE for Detail Editing "WithDialog" on a TableControl, which is recent (2020-08-14) and which has a similar stack trace as above.

I tried using release 117 and 125, and with either one, I get a different looking window that does not include the parameters and looks fairly generic:

Screen Shot 2020-08-30 at 9 21 00 AM

The Eclipse EMF Client Platform 1.7.0 Release is not much help.

So, it looks like the next steps would be to migrate Triquetrum to a more recent version of ECP, or see if Bug 566073 - NPE for Detail Editing "WithDialog" on a TableControl gets fixed.

cxbrooks commented 4 years ago

I started down the path of migrating the viewmodels in triquetrum/plugins/editor/org.eclipse.triquetrum.workflow.model.viewmodel/viewmodels/

I installed EMF into my Eclipse and updated the tpd file from ECP 115 to 124.

Opening some of the views in triquetrum/plugins/editor/org.eclipse.triquetrum.workflow.model.viewmodel/viewmodels/ resulted in them being migrated automatically. For example, Annotation.view had this line inserted:

<ecorePaths>/org.eclipse.triquetrum.workflow.model/model/triquetrum.ecore</ecorePaths>

However Actor.view did not migrate until I removed

       <columnConfigurations xsi:type="org.eclipse.emf.ecp.view.table.model:WidthConfiguration" xmi:id="_p1SGkO_1EeeD8PPv-i-9PA" columnDomainReference="_RynNcOepEea6NtatxyB-pg" weight="30" minWidth="80"/>
        <columnConfigurations xsi:type="org.eclipse.emf.ecp.view.table.model:WidthConfiguration" xmi:id="_wrNckO_1EeeD8PPv-i-9PA" columnDomainReference="_VCAhpOepEea6NtatxyB-pg" weight="70" minWidth="100"/>

and

        <columnConfigurations xsi:type="org.eclipse.emf.ecp.view.table.model:WidthConfiguration" xmi:id="_sn3RAO_3EeeD8PPv-i-9PA" columnDomainReference="_hoIxIOeoEea6NtatxyB-pg" weight="30" minWidth="50"/>
        <columnConfigurations xsi:type="org.eclipse.emf.ecp.view.table.model:WidthConfiguration" xmi:id="_wkKugO_3EeeD8PPv-i-9PA" columnDomainReference="_hoIxJeeoEea6NtatxyB-pg" weight="15" minWidth="30"/>
        <columnConfigurations xsi:type="org.eclipse.emf.ecp.view.table.model:WidthConfiguration" xmi:id="_1w4rAO_3EeeD8PPv-i-9PA" columnDomainReference="_hoIxJueoEea6NtatxyB-pg" weight="15" minWidth="30"/>
        <columnConfigurations xsi:type="org.eclipse.emf.ecp.view.table.model:WidthConfiguration" xmi:id="_3aPOcO_3EeeD8PPv-i-9PA" columnDomainReference="_hoIxJ-eoEea6NtatxyB-pg" weight="20" minWidth="30"/>
        <columnConfigurations xsi:type="org.eclipse.emf.ecp.view.table.model:WidthConfiguration" xmi:id="_5WhU8O_3EeeD8PPv-i-9PA" columnDomainReference="_zi1NgANyEeepkJB16JWj2w" weight="20" minWidth="30"/>

This improved matters because now I can see the parameters. However, when I try to edit the iterations parameter of an SDF Director, I get:

!ENTRY org.eclipse.ui 4 0 2020-08-31 09:46:56.635
!MESSAGE Unhandled event loop exception
!STACK 0
java.lang.NullPointerException
    at java.util.concurrent.ConcurrentHashMap.get(ConcurrentHashMap.java:936)
    at org.eclipse.core.databinding.UpdateValueStrategy.findValidator(UpdateValueStrategy.java:281)
    at org.eclipse.core.databinding.UpdateValueStrategy.createValidator(UpdateValueStrategy.java:233)
    at org.eclipse.core.databinding.UpdateValueStrategy.fillDefaults(UpdateValueStrategy.java:258)
    at org.eclipse.core.databinding.DataBindingContext.bindValue(DataBindingContext.java:160)
    at org.eclipse.emf.ecp.view.spi.table.swt.TableControlSWTRenderer$ECPTableEditingSupport.createBinding(TableControlSWTRenderer.java:3009)
    at org.eclipse.emf.ecp.view.spi.table.swt.TableControlSWTRenderer$ECPTableEditingSupport.initializeCellEditorValue(TableControlSWTRenderer.java:2985)
    at org.eclipse.jface.viewers.ColumnViewerEditor.activateCellEditor(ColumnViewerEditor.java:203)
    at org.eclipse.jface.viewers.ColumnViewerEditor.handleEditorActivationEvent(ColumnViewerEditor.java:435)
    at org.eclipse.jface.viewers.ColumnViewer.triggerEditorActivationEvent(ColumnViewer.java:680)
    at org.eclipse.jface.viewers.ColumnViewer.handleMouseDown(ColumnViewer.java:655)
    at org.eclipse.jface.viewers.ColumnViewer.access$0(ColumnViewer.java:651)
    at org.eclipse.jface.viewers.ColumnViewer$1.mouseDown(ColumnViewer.java:100)
    at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:196)
    at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:89)
    at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4385)
    at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1512)
    at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1535)
    at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1520)
    at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:1324)
    at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4172)
    at org.eclipse.swt.widgets.Display.applicationNextEventMatchingMask(Display.java:5253)
    at org.eclipse.swt.widgets.Display.applicationProc(Display.java:5652)
    at org.eclipse.swt.internal.cocoa.OS.objc_msgSendSuper(Native Method)
    at org.eclipse.swt.widgets.Widget.callSuper(Widget.java:235)
    at org.eclipse.swt.widgets.Widget.mouseDownSuper(Widget.java:1146)
    at org.eclipse.swt.widgets.Table.mouseDownSuper(Table.java:2106)
    at org.eclipse.swt.widgets.Widget.mouseDown(Widget.java:1138)
    at org.eclipse.swt.widgets.Control.mouseDown(Control.java:2621)
    at org.eclipse.swt.widgets.Table.mouseDown(Table.java:2077)
    at org.eclipse.swt.widgets.Display.windowProc(Display.java:6012)
    at org.eclipse.swt.internal.cocoa.OS.objc_msgSendSuper(Native Method)
    at org.eclipse.swt.widgets.Widget.callSuper(Widget.java:235)
    at org.eclipse.swt.widgets.Widget.windowSendEvent(Widget.java:2150)
    at org.eclipse.swt.widgets.Shell.windowSendEvent(Shell.java:2401)
    at org.eclipse.swt.widgets.Display.windowProc(Display.java:6136)
    at org.eclipse.swt.internal.cocoa.OS.objc_msgSendSuper(Native Method)
    at org.eclipse.swt.widgets.Display.applicationSendEvent(Display.java:5386)
    at org.eclipse.swt.widgets.Display.applicationProc(Display.java:5522)
    at org.eclipse.swt.internal.cocoa.OS.objc_msgSend(Native Method)
    at org.eclipse.swt.internal.cocoa.NSApplication.sendEvent(NSApplication.java:117)
    at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3786)
    at org.eclipse.jface.window.Window.runEventLoop(Window.java:823)
    at org.eclipse.jface.window.Window.open(Window.java:799)
    at org.eclipse.triquetrum.workflow.editor.features.ModelElementConfigureFeature.execute(ModelElementConfigureFeature.java:83)
    at org.eclipse.graphiti.features.custom.AbstractCustomFeature.execute(AbstractCustomFeature.java:77)
    at org.eclipse.graphiti.internal.command.GenericFeatureCommandWithContext.execute(GenericFeatureCommandWithContext.java:58)
    at org.eclipse.graphiti.ui.internal.command.GefCommandWrapper.execute(GefCommandWrapper.java:48)
    at org.eclipse.graphiti.ui.internal.editor.EmfOnGefCommand.execute(EmfOnGefCommand.java:51)
    at org.eclipse.graphiti.internal.command.GFPreparableCommand2.doExecute(GFPreparableCommand2.java:40)
    at org.eclipse.emf.transaction.RecordingCommand.execute(RecordingCommand.java:135)
    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:496)
    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.graphiti.ui.internal.editor.GFWorkspaceCommandStackImpl.execute(GFWorkspaceCommandStackImpl.java:94)
    at org.eclipse.graphiti.ui.internal.editor.GFCommandStack.execute(GFCommandStack.java:136)
    at org.eclipse.graphiti.ui.internal.parts.ShapeEditPart.performRequest(ShapeEditPart.java:572)
    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:1069)
    at org.eclipse.gef.tools.SelectionTool.mouseDoubleClick(SelectionTool.java:527)
    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:200)
    at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:89)
    at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4385)
    at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1512)
    at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1535)
    at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1520)
    at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:1324)
    at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4172)
    at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3789)
    at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$5.run(PartRenderingEngine.java:1158)
    at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:338)
    at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1047)
    at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:155)
    at org.eclipse.ui.internal.Workbench.lambda$3(Workbench.java:658)
    at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:338)
    at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:557)
    at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:154)
    at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:150)
    at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:203)
    at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:137)
    at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:107)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:401)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:255)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:657)
    at org.eclipse.equinox.launcher.Main.basicRun(Main.java:594)
    at org.eclipse.equinox.launcher.Main.run(Main.java:1447)
    at org.eclipse.equinox.launcher.Main.main(Main.java:1420)

I tried to replicate Bug 566073 - NPE for Detail Editing "WithDialog" on a TableControl, but I was not able to get the test case to fail.

At this point, I'm going to stop working on this issue and work on some of the other releng issues for the 0.4.0 release. Unfortunately, after today I won't have much time to spend on Triquetrum until after 9/16.

laeubi commented 4 years ago

@cxbrooks thanks for taking a look, do you know if this is related https://github.com/eclipse/triquetrum/issues/362 ?

cxbrooks commented 4 years ago

Yep, the #362 message about migration in the console is caused by this bug. I started on the migration, see my comment above, but it did not solve the problem.

When I open plugins/editor/org.eclipse.triquetrum.workflow.model.viewmodel/viewmodels/Actor.view I get a message about migrating, which fails with:

This view cannot be displayed. Reason: org.eclipse.emf.ecore.xmi.IllegalValueException: Value 'org.eclipse.emf.ecore.xml.type.impl.AnyTypeImpl@55af21a5 (eClass: org.eclipse.emf.ecore.impl.EClassImpl@fc8eb63 (name: FeaturePathDomainModelReference) (instanceClassName: null) (abstract: false, interface: false)) (mixed: [ecore.xml.type:text= , domainModelEFeature=org.eclipse.emf.ecore.impl.EAttributeImpl@77ab82ab (eProxyURI: http://www.eclipse.org/triquetrum#//NamedObj/name), ecore.xml.type:text= ], anyAttribute: null)' is not legal. (platform:/resource/org.eclipse.triquetrum.workflow.model.viewmodel/viewmodels/Actor.view, 28, 206)

If I remove these lines from Actor.view:

-        <columnConfigurations xsi:type="org.eclipse.emf.ecp.view.table.model:WidthConfiguration" xmi:id="_p1SGkO_1EeeD8PPv-i-9PA" columnDomainReference="_RynNcOepEea6N\
tatxyB-pg" weight="30" minWidth="80"/>
-        <columnConfigurations xsi:type="org.eclipse.emf.ecp.view.table.model:WidthConfiguration" xmi:id="_wrNckO_1EeeD8PPv-i-9PA" columnDomainReference="_VCAhpOepEea6N\
tatxyB-pg" weight="70" minWidth="100"/>
       </composite>
     </categorizations>
     <categorizations xsi:type="org.eclipse.emf.ecp.view.categorization.model:Category" xmi:id="_o502EOeoEea6NtatxyB-pg" name="Ports">
@@ -51,11 +50,6 @@
             <domainModelEFeature xsi:type="ecore:EReference" href="http://www.eclipse.org/triquetrum#//Entity/ports"/>
           </domainModelReference>
         </domainModelReference>
-        <columnConfigurations xsi:type="org.eclipse.emf.ecp.view.table.model:WidthConfiguration" xmi:id="_sn3RAO_3EeeD8PPv-i-9PA" columnDomainReference="_hoIxIOeoEea6N\
tatxyB-pg" weight="30" minWidth="50"/>
-        <columnConfigurations xsi:type="org.eclipse.emf.ecp.view.table.model:WidthConfiguration" xmi:id="_wkKugO_3EeeD8PPv-i-9PA" columnDomainReference="_hoIxJeeoEea6N\
tatxyB-pg" weight="15" minWidth="30"/>
-        <columnConfigurations xsi:type="org.eclipse.emf.ecp.view.table.model:WidthConfiguration" xmi:id="_1w4rAO_3EeeD8PPv-i-9PA" columnDomainReference="_hoIxJueoEea6N\
tatxyB-pg" weight="15" minWidth="30"/>
-        <columnConfigurations xsi:type="org.eclipse.emf.ecp.view.table.model:WidthConfiguration" xmi:id="_3aPOcO_3EeeD8PPv-i-9PA" columnDomainReference="_hoIxJ-eoEea6N\
tatxyB-pg" weight="20" minWidth="30"/>
-        <columnConfigurations xsi:type="org.eclipse.emf.ecp.view.table.model:WidthConfiguration" xmi:id="_5WhU8O_3EeeD8PPv-i-9PA" columnDomainReference="_zi1NgANyEeepk\
JB16JWj2w" weight="20" minWidth="30"/>
       </composite>

Then the migration of Actor.view works.

If I remove similar lines from Composite.view, then the migration works.

Editing the parameters of an actor or director works much better, the values of the parameters are visible. However, when I try to edit a parameter, I get a NPE, see above.

I've created a branch called cxbrooks/bug/353/NPE-parameters-1 that has the changes to Actor.view and Composite.view and then has the .view files migrated.

I'm hesitant to merge these changes in to the master because I have no idea how EMF/ECP forms work and I especially don't understand what the <columnConfiguration does.

erwindl0 commented 4 years ago

I'll try to look into this, but it will be for next week. This week is full...

cxbrooks commented 3 years ago

Bug 566073 - NPE for Detail Editing "WithDialog" on a TableControl was fixed on 9/23/20.

The next step would be to try the updated ECP that includes this fix.

Also, it would be good to migrate the .view files.

cxbrooks commented 3 years ago

After migrating the .view files (see 572cca790902157e9fab201cef87a0cc87a834cc), I can no longer reproduce this bug.