Hi Daniel,
thanks for the fast response on this.
1. Thanks for suggesting the workaround. I in fact already used
the tree editor, but I could not make the diagram refresh to show
the added edge.
2. The error-preserving editor behavior is nice. But in my
experience, such features tend to lead to unforeseen problems, as
this case shows.
Also, I'm experiencing problems with Undo after such a case. I
could not test your fix yet, but maybe you can also have a look if
undo/redo works for you.
See the stack trace below:
Best
Joel
!ENTRY org.eclipse.ui 4 0 2016-07-23 15:27:33.379
!MESSAGE index=1, size=1
!STACK 0
org.eclipse.emf.common.util.BasicEList$BasicIndexOutOfBoundsException:
index=1, size=1
at
org.eclipse.emf.common.util.BasicEList.get(BasicEList.java:346)
at
org.eclipse.emf.ecore.change.impl.ListChangeImpl.process(ListChangeImpl.java:534)
at
org.eclipse.emf.ecore.change.impl.ListChangeImpl.applyAndReverse(ListChangeImpl.java:486)
at
org.eclipse.emf.ecore.change.impl.ChangeDescriptionImpl.preApply(ChangeDescriptionImpl.java:818)
at
org.eclipse.emf.ecore.change.impl.ChangeDescriptionImpl.applyAndReverse(ChangeDescriptionImpl.java:324)
at
org.eclipse.emf.transaction.util.CompositeChangeDescription.applyAndReverse(CompositeChangeDescription.java:149)
at
org.eclipse.emf.workspace.AbstractEMFOperation.doUndo(AbstractEMFOperation.java:695)
at
org.eclipse.gmf.runtime.emf.commands.core.command.AbstractTransactionalCommand.doUndo(AbstractTransactionalCommand.java:260)
at
org.eclipse.emf.workspace.AbstractEMFOperation.undo(AbstractEMFOperation.java:370)
at
org.eclipse.gmf.runtime.common.core.command.CompositeCommand.doUndoWithResult(CompositeCommand.java:622)
at
org.eclipse.gmf.runtime.common.core.command.AbstractCommand.undo(AbstractCommand.java:215)
at
org.eclipse.gmf.runtime.common.core.command.CompositeCommand.doUndoWithResult(CompositeCommand.java:622)
at
org.eclipse.gmf.runtime.common.core.command.AbstractCommand.undo(AbstractCommand.java:215)
at
org.eclipse.gmf.runtime.common.core.command.CompositeCommand.doUndoWithResult(CompositeCommand.java:622)
at
org.eclipse.gmf.runtime.common.core.command.AbstractCommand.undo(AbstractCommand.java:215)
at
org.eclipse.core.commands.operations.DefaultOperationHistory.doUndo(DefaultOperationHistory.java:399)
at
org.eclipse.core.commands.operations.DefaultOperationHistory.undo(DefaultOperationHistory.java:1149)
at
org.eclipse.ui.operations.UndoActionHandler.runCommand(UndoActionHandler.java:87)
at
org.eclipse.ui.operations.OperationHistoryActionHandler$1.run(OperationHistoryActionHandler.java:308)
at
org.eclipse.jface.operation.ModalContext.runInCurrentThread(ModalContext.java:437)
at
org.eclipse.jface.operation.ModalContext.run(ModalContext.java:353)
at
org.eclipse.jface.dialogs.ProgressMonitorDialog.run(ProgressMonitorDialog.java:481)
at
org.eclipse.ui.internal.operations.TimeTriggeredProgressMonitorDialog.access$6(TimeTriggeredProgressMonitorDialog.java:1)
at
org.eclipse.ui.internal.operations.TimeTriggeredProgressMonitorDialog$2.run(TimeTriggeredProgressMonitorDialog.java:163)
at
org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70)
at
org.eclipse.ui.internal.operations.TimeTriggeredProgressMonitorDialog.run(TimeTriggeredProgressMonitorDialog.java:176)
at
org.eclipse.ui.operations.OperationHistoryActionHandler.run(OperationHistoryActionHandler.java:323)
at
org.eclipse.gmf.runtime.common.ui.action.actions.global.GlobalUndoAction.doRun(GlobalUndoAction.java:245)
at
org.eclipse.gmf.runtime.common.ui.action.AbstractActionHandler.run(AbstractActionHandler.java:359)
at
org.eclipse.gmf.runtime.common.ui.action.ActionManager.run(ActionManager.java:229)
at
org.eclipse.gmf.runtime.common.ui.action.AbstractActionHandler.runWithEvent(AbstractActionHandler.java:377)
at
org.eclipse.jface.commands.ActionHandler.execute(ActionHandler.java:118)
at
org.eclipse.ui.internal.handlers.E4HandlerProxy.execute(E4HandlerProxy.java:90)
at sun.reflect.GeneratedMethodAccessor112.invoke(Unknown
Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown
Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at
org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:54)
at
org.eclipse.e4.core.internal.di.InjectorImpl.invokeUsingClass(InjectorImpl.java:282)
at
org.eclipse.e4.core.internal.di.InjectorImpl.invoke(InjectorImpl.java:264)
at
org.eclipse.e4.core.contexts.ContextInjectionFactory.invoke(ContextInjectionFactory.java:132)
at
org.eclipse.e4.core.commands.internal.HandlerServiceHandler.execute(HandlerServiceHandler.java:152)
at
org.eclipse.core.commands.Command.executeWithChecks(Command.java:494)
at
org.eclipse.core.commands.ParameterizedCommand.executeWithChecks(ParameterizedCommand.java:488)
at
org.eclipse.e4.core.commands.internal.HandlerServiceImpl.executeHandler(HandlerServiceImpl.java:210)
at
org.eclipse.e4.ui.bindings.keys.KeyBindingDispatcher.executeCommand(KeyBindingDispatcher.java:286)
at
org.eclipse.e4.ui.bindings.keys.KeyBindingDispatcher.press(KeyBindingDispatcher.java:507)
at
org.eclipse.e4.ui.bindings.keys.KeyBindingDispatcher.processKeyEvent(KeyBindingDispatcher.java:558)
at
org.eclipse.e4.ui.bindings.keys.KeyBindingDispatcher.filterKeySequenceBindings(KeyBindingDispatcher.java:378)
at
org.eclipse.e4.ui.bindings.keys.KeyBindingDispatcher.access$0(KeyBindingDispatcher.java:324)
at
org.eclipse.e4.ui.bindings.keys.KeyBindingDispatcher$KeyDownFilter.handleEvent(KeyBindingDispatcher.java:86)
at
org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
at
org.eclipse.swt.widgets.Display.filterEvent(Display.java:1270)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1078)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1103)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1088)
at
org.eclipse.swt.widgets.Widget.sendKeyEvent(Widget.java:1130)
at
org.eclipse.swt.widgets.Widget.sendKeyEvent(Widget.java:1126)
at org.eclipse.swt.widgets.Widget.wmChar(Widget.java:1547)
at org.eclipse.swt.widgets.Control.WM_CHAR(Control.java:4910)
at org.eclipse.swt.widgets.Canvas.WM_CHAR(Canvas.java:364)
at
org.eclipse.swt.widgets.Control.windowProc(Control.java:4791)
at org.eclipse.swt.widgets.Canvas.windowProc(Canvas.java:359)
at
org.eclipse.swt.widgets.Display.windowProc(Display.java:5102)
at org.eclipse.swt.internal.win32.OS.DispatchMessageW(Native
Method)
at
org.eclipse.swt.internal.win32.OS.DispatchMessage(OS.java:2552)
at
org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3814)
at
org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$4.run(PartRenderingEngine.java:1121)
at
org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336)
at
org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1022)
at
org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:150)
at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:687)
at
org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336)
at
org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:604)
at
org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:148)
at
org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:138)
at
org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
at
org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134)
at
org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104)
at
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:388)
at
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:243)
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:673)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:610)
at org.eclipse.equinox.launcher.Main.run(Main.java:1519)
at org.eclipse.equinox.launcher.Main.main(Main.java:1492)
On 23.07.2016 14:33, Daniel Strüber wrote: