Removal of sticky ports does not work
When removing a sticky port form a component, an exception is thrown and the port is not removed.
org.eclipse.emf.common.util.WrappedException: An exception was ignored during command execution
at org.eclipse.emf.common.command.BasicCommandStack.handleError(BasicCommandStack.java:281)
at org.eclipse.emf.transaction.impl.AbstractTransactionalCommandStack.handleError(AbstractTransactionalCommandStack.java:125)
at org.eclipse.emf.common.command.BasicCommandStack.execute(BasicCommandStack.java:112)
at org.eclipse.emf.transaction.impl.AbstractTransactionalCommandStack.basicExecute(AbstractTransactionalCommandStack.java:241)
at org.eclipse.emf.transaction.impl.TransactionalCommandStackImpl.doExecute(TransactionalCommandStackImpl.java:63)
at org.eclipse.emf.transaction.impl.AbstractTransactionalCommandStack.execute(AbstractTransactionalCommandStack.java:165)
at org.eclipse.emf.transaction.impl.AbstractTransactionalCommandStack.execute(AbstractTransactionalCommandStack.java:219)
at org.fortiss.tooling.kernel.internal.storage.eclipse.AutoUndoCommandStack.execute(AutoUndoCommandStack.java:79)
at org.fortiss.tooling.kernel.internal.storage.eclipse.ModelContext.runAsCommand(ModelContext.java:393)
at org.fortiss.tooling.kernel.internal.CommandStackService.runAsCommand(CommandStackService.java:103)
at org.fortiss.tooling.kernel.ui.extension.base.LWFXEFEditorBase.applyModelChange(LWFXEFEditorBase.java:115)
at org.fortiss.tooling.kernel.ui.extension.base.LWFXEFEditorBase.lambda$1(LWFXEFEditorBase.java:71)
at org.fortiss.tooling.common.ui.javafx.lwfxef.MouseState$9.handle(MouseState.java:323)
at org.fortiss.tooling.common.ui.javafx.lwfxef.MouseState$9.handle(MouseState.java:1)
at javafx.base/com.sun.javafx.event.CompositeEventHandler.dispatchBubblingEvent(CompositeEventHandler.java:86)
at javafx.base/com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(EventHandlerManager.java:238)
at javafx.base/com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(EventHandlerManager.java:191)
at javafx.base/com.sun.javafx.event.CompositeEventDispatcher.dispatchBubblingEvent(CompositeEventDispatcher.java:59)
at javafx.base/com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:58)
at javafx.base/com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
at javafx.base/com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
at javafx.base/com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
at javafx.base/com.sun.javafx.event.EventUtil.fireEventImpl(EventUtil.java:74)
at javafx.base/com.sun.javafx.event.EventUtil.fireEvent(EventUtil.java:54)
at javafx.base/javafx.event.Event.fireEvent(Event.java:198)
at javafx.graphics/javafx.scene.Scene$KeyHandler.process(Scene.java:4070)
at javafx.graphics/javafx.scene.Scene.processKeyEvent(Scene.java:2121)
at javafx.graphics/javafx.scene.Scene$ScenePeerListener.keyEvent(Scene.java:2597)
at javafx.graphics/com.sun.javafx.tk.quantum.EmbeddedScene.lambda$keyEvent$12(EmbeddedScene.java:365)
at java.base/java.security.AccessController.doPrivileged(Native Method)
at javafx.graphics/com.sun.javafx.tk.quantum.EmbeddedScene.lambda$keyEvent$13(EmbeddedScene.java:351)
at javafx.graphics/com.sun.javafx.application.PlatformImpl.lambda$runLater$10(PlatformImpl.java:428)
at java.base/java.security.AccessController.doPrivileged(Native Method)
at javafx.graphics/com.sun.javafx.application.PlatformImpl.lambda$runLater$11(PlatformImpl.java:427)
at org.eclipse.swt.internal.cocoa.OS.objc_msgSendSuper(Native Method)
at org.eclipse.swt.widgets.Display.applicationNextEventMatchingMask(Display.java:5284)
at org.eclipse.swt.widgets.Display.applicationProc(Display.java:5716)
at org.eclipse.swt.internal.cocoa.OS.objc_msgSend(Native Method)
at org.eclipse.swt.internal.cocoa.NSApplication.nextEventMatchingMask(NSApplication.java:97)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3804)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$5.run(PartRenderingEngine.java:1160)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:338)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1049)
at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:155)
at org.eclipse.ui.internal.Workbench.lambda$3(Workbench.java:660)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:338)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:559)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:154)
at org.fortiss.af3.rcapplication.AF3Application.start(AF3Application.java:49)
at org.eclipse.equinox.internal.apEclipseAppHandle.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 java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
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:1465)
at org.eclipse.equinox.launcher.Main.main(Main.java:1438)
Caused by: java.lang.NullPointerException
at org.fortiss.tooling.base.ui.utils.LWFXEditorUtils.stickyConnectorHasVisibleConnections(LWFXEditorUtils.java:112)
at org.fortiss.tooling.base.ui.editor.fx.visual.NamedLayoutedCircularAnchorageContentVisual.enableName(NamedLayoutedCircularAnchorageContentVisual.java:71)
at org.fortiss.tooling.base.ui.editor.fx.visual.NamedLayoutedCircularAnchorageContentVisual.updateNodes(NamedLayoutedCircularAnchorageContentVisual.java:56)
at org.fortiss.tooling.common.ui.javafx.lwfxef.MVCBundleManager.setSingleSelectedMVCBundle(MVCBundleManager.java:126)
at org.fortiss.tooling.common.ui.javafx.lwfxef.MVCBundleManager.updateContentObjects(MVCBundleManager.java:219)
at org.fortiss.tooling.common.ui.javafx.lwfxef.DiagramViewer.updateFromModel(DiagramViewer.java:466)
at org.fortiss.tooling.common.ui.javafx.lwfxef.mvc.impl.MVCBundleBase.changed(MVCBundleBase.java:127)
at org.fortiss.tooling.common.ui.javafx.lwfxef.mvc.impl.ContentMVCBundle.changed(ContentMVCBundle.java:103)
at org.fortiss.tooling.common.ui.javafx.lwfxef.model.ModelChangeProviderBase.fireUpdateComplete(ModelChangeProviderBase.java:54)
at org.fortiss.tooling.base.ui.editor.fx.controller.KernelServiceBasedModelChangeProviderBase.commandStackChanged(KernelServiceBasedModelChangeProviderBase.java:86)
at org.fortiss.tooling.kernel.internal.storage.eclipse.ModelContext.commandStackChanged(ModelContext.java:494)
at org.eclipse.emf.common.command.BasicCommandStack.notifyListeners(BasicCommandStack.java:270)
at org.eclipse.emf.common.command.BasicCommandStack.execute(BasicCommandStack.java:104)
... 59 more
Exception in thread "JavaFX Application Thread" java.lang.NullPointerException
at org.fortiss.tooling.base.ui.utils.LWFXEditorUtils.stickyConnectorHasVisibleConnections(LWFXEditorUtils.java:112)
at org.fortiss.tooling.base.ui.editor.fx.visual.NamedLayoutedCircularAnchorageContentVisual.enableName(NamedLayoutedCircularAnchorageContentVisual.java:71)
at org.fortiss.tooling.base.ui.editor.fx.visual.NamedLayoutedCircularAnchorageContentVisual.updateNodes(NamedLayoutedCircularAnchorageContentVisual.java:56)
at org.fortiss.tooling.common.ui.javafx.lwfxef.MVCBundleManager.setSingleSelectedMVCBundle(MVCBundleManager.java:126)
at org.fortiss.tooling.common.ui.javafx.lwfxef.MVCBundleManager.updateContentObjects(MVCBundleManager.java:219)
at org.fortiss.tooling.common.ui.javafx.lwfxef.DiagramViewer.updateFromModel(DiagramViewer.java:466)
at org.fortiss.tooling.common.ui.javafx.lwfxef.mvc.impl.MVCBundleBase.changed(MVCBundleBase.java:127)
at org.fortiss.tooling.common.ui.javafx.lwfxef.mvc.impl.ContentMVCBundle.changed(ContentMVCBundle.java:103)
at org.fortiss.tooling.common.ui.javafx.lwfxef.model.ModelChangeProviderBase.fireUpdateComplete(ModelChangeProviderBase.java:54)
at org.fortiss.tooling.base.ui.editor.fx.controller.KernelServiceBasedModelChangeProviderBase.commandStackChanged(KernelServiceBasedModelChangeProviderBase.java:86)
at org.fortiss.tooling.kernel.internal.storage.eclipse.ModelContext.commandStackChanged(ModelContext.java:494)
at org.eclipse.emf.common.command.BasicCommandStack.notifyListeners(BasicCommandStack.java:270)
at org.eclipse.emf.common.command.BasicCommandStack.execute(BasicCommandStack.java:115)
at org.eclipse.emf.transaction.impl.AbstractTransactionalCommandStack.basicExecute(AbstractTransactionalCommandStack.java:241)
at org.eclipse.emf.transaction.impl.TransactionalCommandStackImpl.doExecute(TransactionalCommandStackImpl.java:63)
at org.eclipse.emf.transaction.impl.AbstractTransactionalCommandStack.execute(AbstractTransactionalCommandStack.java:165)
at org.eclipse.emf.transaction.impl.AbstractTransactionalCommandStack.execute(AbstractTransactionalCommandStack.java:219)
at org.fortiss.tooling.kernel.internal.storage.eclipse.AutoUndoCommandStack.execute(AutoUndoCommandStack.java:79)
at org.fortiss.tooling.kernel.internal.storage.eclipse.ModelContext.runAsCommand(ModelContext.java:393)
at org.fortiss.tooling.kernel.internal.CommandStackService.runAsCommand(CommandStackService.java:103)
at org.fortiss.tooling.kernel.ui.extension.base.LWFXEFEditorBase.applyModelChange(LWFXEFEditorBase.java:115)
at org.fortiss.tooling.kernel.ui.extension.base.LWFXEFEditorBase.lambda$1(LWFXEFEditorBase.java:71)
at org.fortiss.tooling.common.ui.javafx.lwfxef.MouseState$9.handle(MouseState.java:323)
at org.fortiss.tooling.common.ui.javafx.lwfxef.MouseState$9.handle(MouseState.java:1)
at javafx.base/com.sun.javafx.event.CompositeEventHandler.dispatchBubblingEvent(CompositeEventHandler.java:86)
at javafx.base/com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(EventHandlerManager.java:238)
at javafx.base/com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(EventHandlerManager.java:191)
at javafx.base/com.sun.javafx.event.CompositeEventDispatcher.dispatchBubblingEvent(CompositeEventDispatcher.java:59)
at javafx.base/com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:58)
at javafx.base/com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
at javafx.base/com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
at javafx.base/com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
at javafx.base/com.sun.javafx.event.EventUtil.fireEventImpl(EventUtil.java:74)
at javafx.base/com.sun.javafx.event.EventUtil.fireEvent(EventUtil.java:54)
at javafx.base/javafx.event.Event.fireEvent(Event.java:198)
at javafx.graphics/javafx.scene.Scene$KeyHandler.process(Scene.java:4070)
at javafx.graphics/javafx.scene.Scene.processKeyEvent(Scene.java:2121)
at javafx.graphics/javafx.scene.Scene$ScenePeerListener.keyEvent(Scene.java:2597)
at javafx.graphics/com.sun.javafx.tk.quantum.EmbeddedScene.lambda$keyEvent$12(EmbeddedScene.java:365)
at java.base/java.security.AccessController.doPrivileged(Native Method)
at javafx.graphics/com.sun.javafx.tk.quantum.EmbeddedScene.lambda$keyEvent$13(EmbeddedScene.java:351)
at javafx.graphics/com.sun.javafx.application.PlatformImpl.lambda$runLater$10(PlatformImpl.java:428)
at java.base/java.security.AccessController.doPrivileged(Native Method)
at javafx.graphics/com.sun.javafx.application.PlatformImpl.lambda$runLater$11(PlatformImpl.java:427)
at org.eclipse.swt.internal.cocoa.OS.objc_msgSendSuper(Native Method)
at org.eclipse.swt.widgets.Display.applicationNextEventMatchingMask(Display.java:5284)
at org.eclipse.swt.widgets.Display.applicationProc(Display.java:5716)
at org.eclipse.swt.internal.cocoa.OS.objc_msgSend(Native Method)
at org.eclipse.swt.internal.cocoa.NSApplication.nextEventMatchingMask(NSApplication.java:97)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3804)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$5.run(PartRenderingEngine.java:1160)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:338)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1049)
at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:155)
at org.eclipse.ui.internal.Workbench.lambda$3(Workbench.java:660)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:338)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:559)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:154)
at org.fortiss.af3.rcapplication.AF3Application.start(AF3Application.java:49)
at org.eclipse.equinox.internal.apEclipseAppHandle.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 java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
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:1465)
at org.eclipse.equinox.launcher.Main.main(Main.java:1438)
(from redmine: issue id 3985, created on 2020-04-01)