Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Sirius » Save failed after deletion(deleting items)
Save failed after deletion [message #1585361] Mon, 26 January 2015 08:13 Go to next message
Koen Staal is currently offline Koen StaalFriend
Messages: 70
Registered: October 2014
Member
After deleting a list item node, saving will cause an error (Save Failed
java.lang.NullPointerException) and a warning

The warning contains more information, posted below

basicly the save failes and has no result but it returns OK so it expects a result and errors out.

To avoid the problem i made a custom delete action. However when i delete this item it cannot be saved either because of an missing EObjetdescription or feature. (second stacktrace below) This safety check is a bit too strong for me. Because the situation in the textual source can happen. For example you use a variable but its never declared, you can save the representation/file but with an warning that its never declared. Anyone got a solution to atleast save wihout checking if the EObject/description is used somewhere.

java.lang.NullPointerException
at org.eclipse.sirius.business.internal.session.danalysis.DAnalysisSessionImpl.doSave(DAnalysisSessionImpl.java:1023)
at org.eclipse.sirius.business.internal.session.danalysis.DAnalysisSessionImpl$Saver.saveNow(DAnalysisSessionImpl.java:248)
at org.eclipse.sirius.business.internal.session.danalysis.DAnalysisSessionImpl$Saver.save(DAnalysisSessionImpl.java:229)
at org.eclipse.sirius.business.internal.session.danalysis.DAnalysisSessionImpl.save(DAnalysisSessionImpl.java:973)
at org.eclipse.sirius.business.internal.session.danalysis.DAnalysisSessionImpl.save(DAnalysisSessionImpl.java:968)
at org.eclipse.sirius.diagram.ui.tools.internal.resource.CustomSiriusDocumentProvider.doSaveDocument(CustomSiriusDocumentProvider.java:284)
at org.eclipse.gmf.runtime.diagram.ui.resources.editor.document.AbstractDocumentProvider$1SaveOperation.execute(AbstractDocumentProvider.java:596)
at org.eclipse.gmf.runtime.diagram.ui.resources.editor.document.AbstractDocumentProvider$DocumentProviderOperation.run(AbstractDocumentProvider.java:66)
at org.eclipse.gmf.runtime.diagram.ui.resources.editor.document.AbstractDocumentProvider.executeOperation(AbstractDocumentProvider.java:530)
at org.eclipse.gmf.runtime.diagram.ui.resources.editor.document.AbstractDocumentProvider.saveDocument(AbstractDocumentProvider.java:579)
at org.eclipse.gmf.runtime.diagram.ui.resources.editor.parts.DiagramDocumentEditor.performSave(DiagramDocumentEditor.java:864)
at org.eclipse.gmf.runtime.diagram.ui.resources.editor.parts.DiagramDocumentEditor.doSave(DiagramDocumentEditor.java:684)
at org.eclipse.sirius.ui.business.internal.session.SessionSaveable.doSave(SessionSaveable.java:64)
at org.eclipse.ui.Saveable.doSave(Saveable.java:216)
at org.eclipse.ui.internal.SaveableHelper.doSaveModel(SaveableHelper.java:355)
at org.eclipse.ui.internal.SaveableHelper$3.run(SaveableHelper.java:199)
at org.eclipse.ui.internal.SaveableHelper$5.run(SaveableHelper.java:283)
at org.eclipse.jface.operation.ModalContext.runInCurrentThread(ModalContext.java:466)
at org.eclipse.jface.operation.ModalContext.run(ModalContext.java:374)
at org.eclipse.ui.internal.WorkbenchWindow$13.run(WorkbenchWindow.java:2157)
at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70)
at org.eclipse.ui.internal.WorkbenchWindow.run(WorkbenchWindow.java:2153)
at org.eclipse.ui.internal.SaveableHelper.runProgressMonitorOperation(SaveableHelper.java:291)
at org.eclipse.ui.internal.SaveableHelper.runProgressMonitorOperation(SaveableHelper.java:269)
at org.eclipse.ui.internal.SaveableHelper.saveModels(SaveableHelper.java:211)
at org.eclipse.ui.internal.SaveableHelper.savePart(SaveableHelper.java:146)
at org.eclipse.ui.internal.WorkbenchPage.saveSaveable(WorkbenchPage.java:3915)
at org.eclipse.ui.internal.WorkbenchPage.saveEditor(WorkbenchPage.java:3929)
at org.eclipse.gmf.runtime.diagram.ui.providers.DiagramGlobalActionHandler.getCommand(DiagramGlobalActionHandler.java:146)
at org.eclipse.gmf.runtime.common.ui.action.global.GlobalAction.doRun(GlobalAction.java:109)
at org.eclipse.gmf.runtime.common.ui.action.AbstractActionHandler.run(AbstractActionHandler.java:359)
at org.eclipse.gmf.runtime.common.ui.action.ActionManager$1.run(ActionManager.java:225)
at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70)
at org.eclipse.gmf.runtime.common.ui.action.ActionManager.run(ActionManager.java:223)
at org.eclipse.gmf.runtime.common.ui.action.AbstractActionHandler.runWithEvent(AbstractActionHandler.java:377)
at org.eclipse.jface.commands.ActionHandler.execute(ActionHandler.java:122)
at org.eclipse.ui.internal.handlers.E4HandlerProxy.execute(E4HandlerProxy.java:90)
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.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:55)
at org.eclipse.e4.core.internal.di.InjectorImpl.invokeUsingClass(InjectorImpl.java:247)
at org.eclipse.e4.core.internal.di.InjectorImpl.invoke(InjectorImpl.java:229)
at org.eclipse.e4.core.contexts.ContextInjectionFactory.invoke(ContextInjectionFactory.java:132)
at org.eclipse.e4.core.commands.internal.HandlerServiceHandler.execute(HandlerServiceHandler.java:149)
at org.eclipse.core.commands.Command.executeWithChecks(Command.java:499)
at org.eclipse.core.commands.ParameterizedCommand.executeWithChecks(ParameterizedCommand.java:508)
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:1262)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1060)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1085)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1070)
at org.eclipse.swt.widgets.Widget.sendKeyEvent(Widget.java:1112)
at org.eclipse.swt.widgets.Widget.sendKeyEvent(Widget.java:1108)
at org.eclipse.swt.widgets.Widget.wmChar(Widget.java:1529)
at org.eclipse.swt.widgets.Control.WM_CHAR(Control.java:4722)
at org.eclipse.swt.widgets.Canvas.WM_CHAR(Canvas.java:343)
at org.eclipse.swt.widgets.Control.windowProc(Control.java:4610)
at org.eclipse.swt.widgets.Canvas.windowProc(Canvas.java:339)
at org.eclipse.swt.widgets.Display.windowProc(Display.java:5023)
at org.eclipse.swt.internal.win32.OS.DispatchMessageW(Native Method)
at org.eclipse.swt.internal.win32.OS.DispatchMessage(OS.java:2549)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3759)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$9.run(PartRenderingEngine.java:1151)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1032)
at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:148)
at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:636)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:579)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:150)
at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:135)
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:380)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:235)
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:648)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:603)
at org.eclipse.equinox.launcher.Main.run(Main.java:1465)
at org.eclipse.equinox.launcher.Main.main(Main.java:1438)



java.lang.RuntimeException: A value for feature 'variable' is missing but required.
Semantic Object:...->...->I...->...->VariableExpression
at org.eclipse.xtext.serializer.diagnostic.ISerializationDiagnostic$ExceptionThrowingAcceptor.accept(ISerializationDiagnostic.java:70)
at nl.esi.poosl.xtext.serializer.PooslSemanticSequencer.sequence_VariableExpression(PooslSemanticSequencer.java:2180)
at nl.esi.poosl.xtext.serializer.PooslSemanticSequencer.createSequence(PooslSemanticSequencer.java:1063)
at org.eclipse.xtext.serializer.acceptor.SequenceFeeder.acceptEObjectRuleCall(SequenceFeeder.java:299)
at org.eclipse.xtext.serializer.acceptor.SequenceFeeder.acceptRuleCall(SequenceFeeder.java:325)
at org.eclipse.xtext.serializer.acceptor.SequenceFeeder.accept(SequenceFeeder.java:215)
at nl.esi.poosl.xtext.serializer.PooslSemanticSequencer.sequence_InstanceParameter(PooslSemanticSequencer.java:1726)
at nl.esi.poosl.xtext.serializer.PooslSemanticSequencer.createSequence(PooslSemanticSequencer.java:564)
at org.eclipse.xtext.serializer.acceptor.SequenceFeeder.acceptEObjectRuleCall(SequenceFeeder.java:299)
at org.eclipse.xtext.serializer.acceptor.SequenceFeeder.acceptRuleCall(SequenceFeeder.java:325)
at org.eclipse.xtext.serializer.acceptor.SequenceFeeder.accept(SequenceFeeder.java:239)
at org.eclipse.xtext.serializer.sequencer.BacktrackingSemanticSequencer.accept(BacktrackingSemanticSequencer.java:400)
at org.eclipse.xtext.serializer.sequencer.BacktrackingSemanticSequencer.createSequence(BacktrackingSemanticSequencer.java:449)
at nl.esi.poosl.xtext.serializer.PooslSemanticSequencer.sequence_Instance(PooslSemanticSequencer.java:1755)
at nl.esi.poosl.xtext.serializer.PooslSemanticSequencer.createSequence(PooslSemanticSequencer.java:558)
at org.eclipse.xtext.serializer.acceptor.SequenceFeeder.acceptEObjectRuleCall(SequenceFeeder.java:299)
at org.eclipse.xtext.serializer.acceptor.SequenceFeeder.acceptRuleCall(SequenceFeeder.java:325)
at org.eclipse.xtext.serializer.acceptor.SequenceFeeder.accept(SequenceFeeder.java:239)
at org.eclipse.xtext.serializer.sequencer.BacktrackingSemanticSequencer.accept(BacktrackingSemanticSequencer.java:400)
at org.eclipse.xtext.serializer.sequencer.BacktrackingSemanticSequencer.createSequence(BacktrackingSemanticSequencer.java:449)
at nl.esi.poosl.xtext.serializer.PooslSemanticSequencer.sequence_ClusterClass(PooslSemanticSequencer.java:1402)
at nl.esi.poosl.xtext.serializer.PooslSemanticSequencer.createSequence(PooslSemanticSequencer.java:303)
at org.eclipse.xtext.serializer.acceptor.SequenceFeeder.acceptEObjectRuleCall(SequenceFeeder.java:299)
at org.eclipse.xtext.serializer.acceptor.SequenceFeeder.acceptRuleCall(SequenceFeeder.java:325)
at org.eclipse.xtext.serializer.acceptor.SequenceFeeder.accept(SequenceFeeder.java:239)
at org.eclipse.xtext.serializer.sequencer.BacktrackingSemanticSequencer.accept(BacktrackingSemanticSequencer.java:400)
at org.eclipse.xtext.serializer.sequencer.BacktrackingSemanticSequencer.createSequence(BacktrackingSemanticSequencer.java:449)
at nl.esi.poosl.xtext.serializer.PooslSemanticSequencer.sequence_Poosl(PooslSemanticSequencer.java:1948)
at nl.esi.poosl.xtext.serializer.PooslSemanticSequencer.createSequence(PooslSemanticSequencer.java:736)
at org.eclipse.xtext.serializer.impl.Serializer.serialize(Serializer.java:85)
at org.eclipse.xtext.serializer.impl.Serializer.serialize(Serializer.java:108)
at org.eclipse.xtext.serializer.impl.Serializer.serialize(Serializer.java:130)
at org.eclipse.xtext.resource.XtextResource.doSave(XtextResource.java:336)
at org.eclipse.emf.ecore.resource.impl.ResourceImpl.save(ResourceImpl.java:1430)
at org.eclipse.sirius.business.internal.session.danalysis.ResourceSaveDiagnose.hasDifferentSerialization(ResourceSaveDiagnose.java:84)
at org.eclipse.sirius.business.internal.session.danalysis.DifferentSerialization.apply(DifferentSerialization.java:51)
at org.eclipse.sirius.business.internal.session.danalysis.DifferentSerialization.apply(DifferentSerialization.java:1)
at org.eclipse.sirius.business.internal.session.IsModifiedSavingPolicy.computeResourcesToSave(IsModifiedSavingPolicy.java:172)
at org.eclipse.sirius.business.api.session.AbstractSavingPolicy$1.run(AbstractSavingPolicy.java:70)
at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2313)
at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2295)
at org.eclipse.sirius.business.api.session.AbstractSavingPolicy.save(AbstractSavingPolicy.java:68)
at org.eclipse.sirius.common.xtext.internal.XtextSavingPolicy.save(XtextSavingPolicy.java:56)
at org.eclipse.sirius.business.internal.session.danalysis.DAnalysisSessionImpl$1.run(DAnalysisSessionImpl.java:1000)
at org.eclipse.emf.transaction.impl.TransactionalEditingDomainImpl.runExclusive(TransactionalEditingDomainImpl.java:328)
at org.eclipse.sirius.business.internal.session.danalysis.DAnalysisSessionImpl.doSave(DAnalysisSessionImpl.java:1014)
at org.eclipse.sirius.business.internal.session.danalysis.DAnalysisSessionImpl$Saver.saveNow(DAnalysisSessionImpl.java:248)
at org.eclipse.sirius.business.internal.session.danalysis.DAnalysisSessionImpl$Saver.resourceSetChanged(DAnalysisSessionImpl.java:220)
at org.eclipse.emf.transaction.impl.TransactionalEditingDomainImpl$1.run(TransactionalEditingDomainImpl.java:781)
at org.eclipse.emf.transaction.impl.TransactionalEditingDomainImpl.runExclusive(TransactionalEditingDomainImpl.java:328)
at org.eclipse.emf.transaction.impl.TransactionalEditingDomainImpl.postcommit(TransactionalEditingDomainImpl.java:771)
at org.eclipse.emf.transaction.impl.TransactionalEditingDomainImpl.deactivate(TransactionalEditingDomainImpl.java:543)
at org.eclipse.emf.transaction.impl.TransactionImpl.close(TransactionImpl.java:712)
at org.eclipse.emf.transaction.impl.TransactionImpl.commit(TransactionImpl.java:474)
at org.eclipse.emf.workspace.AbstractEMFOperation.execute(AbstractEMFOperation.java:155)
at org.eclipse.sirius.diagram.ui.tools.internal.commands.WrappingCommandIgnoringAffectedFiles.execute(WrappingCommandIgnoringAffectedFiles.java:124)
at org.eclipse.core.commands.operations.DefaultOperationHistory.execute(DefaultOperationHistory.java:513)
at org.eclipse.sirius.diagram.ui.tools.internal.editor.DDiagramCommandStack.execute(DDiagramCommandStack.java:75)
at org.eclipse.sirius.diagram.ui.tools.internal.editor.DDiagramCommandStack.execute(DDiagramCommandStack.java:57)
at org.eclipse.gmf.runtime.diagram.ui.parts.DiagramCommandStack.execute(DiagramCommandStack.java:156)
at org.eclipse.gef.ui.actions.WorkbenchPartAction.execute(WorkbenchPartAction.java:83)
at org.eclipse.sirius.diagram.ui.tools.internal.actions.delete.DeleteWithHookAction.execute(DeleteWithHookAction.java:74)
at org.eclipse.gmf.runtime.diagram.ui.internal.actions.PromptingDeleteAction.run(PromptingDeleteAction.java:173)
at org.eclipse.gef.KeyHandler.performStroke(KeyHandler.java:83)
at org.eclipse.gef.KeyHandler.keyPressed(KeyHandler.java:55)
at org.eclipse.gef.KeyHandler.keyPressed(KeyHandler.java:59)
at org.eclipse.gef.ui.parts.GraphicalViewerKeyHandler.keyPressed(GraphicalViewerKeyHandler.java:355)
at org.eclipse.gmf.runtime.diagram.ui.internal.parts.DiagramGraphicalViewerKeyHandler.keyPressed(DiagramGraphicalViewerKeyHandler.java:104)
at org.eclipse.gef.KeyHandler.keyPressed(KeyHandler.java:59)
at org.eclipse.gmf.runtime.diagram.ui.internal.parts.DirectEditKeyHandler.keyPressed(DirectEditKeyHandler.java:89)
at org.eclipse.gef.tools.SelectionTool.handleKeyDown(SelectionTool.java:331)
at org.eclipse.gef.tools.PanningSelectionTool.handleKeyDown(PanningSelectionTool.java:161)
at org.eclipse.gmf.runtime.diagram.ui.services.palette.SelectionToolEx.handleKeyDown(SelectionToolEx.java:112)
at org.eclipse.gef.tools.AbstractTool.keyDown(AbstractTool.java:1016)
at org.eclipse.gef.tools.SelectionTool.keyDown(SelectionTool.java:491)
at org.eclipse.gef.EditDomain.keyDown(EditDomain.java:169)
at org.eclipse.gef.ui.parts.DomainEventDispatcher.dispatchKeyPressed(DomainEventDispatcher.java:252)
at org.eclipse.draw2d.LightweightSystem$EventHandler.keyPressed(LightweightSystem.java:497)
at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:167)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4353)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1061)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1085)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1070)
at org.eclipse.swt.widgets.Widget.sendKeyEvent(Widget.java:1112)
at org.eclipse.swt.widgets.Widget.sendKeyEvent(Widget.java:1108)
at org.eclipse.swt.widgets.Widget.wmKeyDown(Widget.java:1831)
at org.eclipse.swt.widgets.Control.WM_KEYDOWN(Control.java:4975)
at org.eclipse.swt.widgets.Canvas.WM_KEYDOWN(Canvas.java:428)
at org.eclipse.swt.widgets.Control.windowProc(Control.java:4642)
at org.eclipse.swt.widgets.Canvas.windowProc(Canvas.java:339)
at org.eclipse.swt.widgets.Display.windowProc(Display.java:5023)
at org.eclipse.swt.internal.win32.OS.DispatchMessageW(Native Method)
at org.eclipse.swt.internal.win32.OS.DispatchMessage(OS.java:2549)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3759)
at org.eclipse.jface.window.Window.runEventLoop(Window.java:832)
at org.eclipse.jface.window.Window.open(Window.java:808)
at org.eclipse.ui.internal.views.log.EventDetailsDialog.open(EventDetailsDialog.java:181)
at org.eclipse.ui.internal.views.log.EventDetailsDialogAction.run(EventDetailsDialogAction.java:98)
at org.eclipse.ui.internal.views.log.LogView$15.doubleClick(LogView.java:537)
at org.eclipse.jface.viewers.StructuredViewer$1.run(StructuredViewer.java:831)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
at org.eclipse.ui.internal.JFaceUtil$1.run(JFaceUtil.java:50)
at org.eclipse.jface.util.SafeRunnable.run(SafeRunnable.java:178)
at org.eclipse.jface.viewers.StructuredViewer.fireDoubleClick(StructuredViewer.java:828)
at org.eclipse.jface.viewers.AbstractTreeViewer.handleDoubleSelect(AbstractTreeViewer.java:1472)
at org.eclipse.jface.viewers.StructuredViewer$4.widgetDefaultSelected(StructuredViewer.java:1237)
at org.eclipse.jface.util.OpenStrategy.fireDefaultSelectionEvent(OpenStrategy.java:252)
at org.eclipse.jface.util.OpenStrategy.access$0(OpenStrategy.java:249)
at org.eclipse.jface.util.OpenStrategy$1.handleEvent(OpenStrategy.java:311)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4353)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1061)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4172)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3761)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$9.run(PartRenderingEngine.java:1151)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1032)
at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:148)
at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:636)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:579)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:150)
at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:135)
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:380)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:235)
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:648)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:603)
at org.eclipse.equinox.launcher.Main.run(Main.java:1465)
at org.eclipse.equinox.launcher.Main.main(Main.java:1438)

[Updated on: Tue, 27 January 2015 08:10]

Report message to a moderator

Re: Save failed after deletion [message #1589341 is a reply to message #1585361] Wed, 28 January 2015 11:34 Go to previous messageGo to next message
Laurent Redor is currently offline Laurent RedorFriend
Messages: 252
Registered: July 2009
Senior Member
Hi,

Which version of Sirius are you using?
There are some changes recently [1], [2] about the saving of the session.

I have no idea about the second part of your post concerning xtext.

Regards,

[1] https://bugs.eclipse.org/bugs/show_bug.cgi?id=445603
[2] https://bugs.eclipse.org/bugs/show_bug.cgi?id=455589

Le 26/01/2015 09:13, Koen Staal a écrit :
> After deleting a list item node, saving will cause an error (Save Failed
> java.lang.NullPointerException) and an error
>
> The error contains some more information
>
> java.lang.NullPointerException
> at
> org.eclipse.sirius.business.internal.session.danalysis.DAnalysisSessionImpl.doSave(DAnalysisSessionImpl.java:1023)
>
> at
> org.eclipse.sirius.business.internal.session.danalysis.DAnalysisSessionImpl$Saver.saveNow(DAnalysisSessionImpl.java:248)
>
> at
> org.eclipse.sirius.business.internal.session.danalysis.DAnalysisSessionImpl$Saver.save(DAnalysisSessionImpl.java:229)
>
> at
> org.eclipse.sirius.business.internal.session.danalysis.DAnalysisSessionImpl.save(DAnalysisSessionImpl.java:973)
>
> at
> org.eclipse.sirius.business.internal.session.danalysis.DAnalysisSessionImpl.save(DAnalysisSessionImpl.java:968)
>
> at
> org.eclipse.sirius.diagram.ui.tools.internal.resource.CustomSiriusDocumentProvider.doSaveDocument(CustomSiriusDocumentProvider.java:284)
>
> at
> org.eclipse.gmf.runtime.diagram.ui.resources.editor.document.AbstractDocumentProvider$1SaveOperation.execute(AbstractDocumentProvider.java:596)
>
> at
> org.eclipse.gmf.runtime.diagram.ui.resources.editor.document.AbstractDocumentProvider$DocumentProviderOperation.run(AbstractDocumentProvider.java:66)
>
> at
> org.eclipse.gmf.runtime.diagram.ui.resources.editor.document.AbstractDocumentProvider.executeOperation(AbstractDocumentProvider.java:530)
>
> at
> org.eclipse.gmf.runtime.diagram.ui.resources.editor.document.AbstractDocumentProvider.saveDocument(AbstractDocumentProvider.java:579)
>
> at
> org.eclipse.gmf.runtime.diagram.ui.resources.editor.parts.DiagramDocumentEditor.performSave(DiagramDocumentEditor.java:864)
>
> at
> org.eclipse.gmf.runtime.diagram.ui.resources.editor.parts.DiagramDocumentEditor.doSave(DiagramDocumentEditor.java:684)
>
> at
> org.eclipse.sirius.ui.business.internal.session.SessionSaveable.doSave(SessionSaveable.java:64)
>
> at org.eclipse.ui.Saveable.doSave(Saveable.java:216)
> at
> org.eclipse.ui.internal.SaveableHelper.doSaveModel(SaveableHelper.java:355)
> at
> org.eclipse.ui.internal.SaveableHelper$3.run(SaveableHelper.java:199)
> at
> org.eclipse.ui.internal.SaveableHelper$5.run(SaveableHelper.java:283)
> at
> org.eclipse.jface.operation.ModalContext.runInCurrentThread(ModalContext.java:466)
>
> at org.eclipse.jface.operation.ModalContext.run(ModalContext.java:374)
> at
> org.eclipse.ui.internal.WorkbenchWindow$13.run(WorkbenchWindow.java:2157)
> at
> org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70)
> at
> org.eclipse.ui.internal.WorkbenchWindow.run(WorkbenchWindow.java:2153)
> at
> org.eclipse.ui.internal.SaveableHelper.runProgressMonitorOperation(SaveableHelper.java:291)
>
> at
> org.eclipse.ui.internal.SaveableHelper.runProgressMonitorOperation(SaveableHelper.java:269)
>
> at
> org.eclipse.ui.internal.SaveableHelper.saveModels(SaveableHelper.java:211)
> at
> org.eclipse.ui.internal.SaveableHelper.savePart(SaveableHelper.java:146)
> at
> org.eclipse.ui.internal.WorkbenchPage.saveSaveable(WorkbenchPage.java:3915)
> at
> org.eclipse.ui.internal.WorkbenchPage.saveEditor(WorkbenchPage.java:3929)
> at
> org.eclipse.gmf.runtime.diagram.ui.providers.DiagramGlobalActionHandler.getCommand(DiagramGlobalActionHandler.java:146)
>
> at
> org.eclipse.gmf.runtime.common.ui.action.global.GlobalAction.doRun(GlobalAction.java:109)
>
> at
> org.eclipse.gmf.runtime.common.ui.action.AbstractActionHandler.run(AbstractActionHandler.java:359)
>
> at
> org.eclipse.gmf.runtime.common.ui.action.ActionManager$1.run(ActionManager.java:225)
>
> at
> org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70)
> at
> org.eclipse.gmf.runtime.common.ui.action.ActionManager.run(ActionManager.java:223)
>
> at
> org.eclipse.gmf.runtime.common.ui.action.AbstractActionHandler.runWithEvent(AbstractActionHandler.java:377)
>
> at
> org.eclipse.jface.commands.ActionHandler.execute(ActionHandler.java:122)
> at
> org.eclipse.ui.internal.handlers.E4HandlerProxy.execute(E4HandlerProxy.java:90)
>
> 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.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:55)
>
> at
> org.eclipse.e4.core.internal.di.InjectorImpl.invokeUsingClass(InjectorImpl.java:247)
>
> at
> org.eclipse.e4.core.internal.di.InjectorImpl.invoke(InjectorImpl.java:229)
> at
> org.eclipse.e4.core.contexts.ContextInjectionFactory.invoke(ContextInjectionFactory.java:132)
>
> at
> org.eclipse.e4.core.commands.internal.HandlerServiceHandler.execute(HandlerServiceHandler.java:149)
>
> at
> org.eclipse.core.commands.Command.executeWithChecks(Command.java:499)
> at
> org.eclipse.core.commands.ParameterizedCommand.executeWithChecks(ParameterizedCommand.java:508)
>
> 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:1262)
> at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1060)
> at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1085)
> at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1070)
> at org.eclipse.swt.widgets.Widget.sendKeyEvent(Widget.java:1112)
> at org.eclipse.swt.widgets.Widget.sendKeyEvent(Widget.java:1108)
> at org.eclipse.swt.widgets.Widget.wmChar(Widget.java:1529)
> at org.eclipse.swt.widgets.Control.WM_CHAR(Control.java:4722)
> at org.eclipse.swt.widgets.Canvas.WM_CHAR(Canvas.java:343)
> at org.eclipse.swt.widgets.Control.windowProc(Control.java:4610)
> at org.eclipse.swt.widgets.Canvas.windowProc(Canvas.java:339)
> at org.eclipse.swt.widgets.Display.windowProc(Display.java:5023)
> at org.eclipse.swt.internal.win32.OS.DispatchMessageW(Native Method)
> at org.eclipse.swt.internal.win32.OS.DispatchMessage(OS.java:2549)
> at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3759)
> at
> org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$9.run(PartRenderingEngine.java:1151)
>
> at
> org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
>
> at
> org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1032)
>
> at
> org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:148)
>
> at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:636)
> at
> org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
>
> at
> org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:579)
> at
> org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:150)
> at
> org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:135)
>
> 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:380)
>
> at
> org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:235)
>
> 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:648)
> at org.eclipse.equinox.launcher.Main.basicRun(Main.java:603)
> at org.eclipse.equinox.launcher.Main.run(Main.java:1465)
> at org.eclipse.equinox.launcher.Main.main(Main.java:1438)
>
> basicly the save failes and has no result but it returns OK so it
> expects a result and errors out.
>
>
> To avoid the problem i made a custom delete action. However when i
> delete this item it cannot be saved either because of an missing
> EObjetdescription or feature. This safety check is a bit too strong for
> me. Because the situation in the textual source can happen. For example
> you use a variable but its never declared,, you can save the
> representation/file but with an warning that its never declared. I dont
> think its possible because it relates to the textual representation with
> the EObjects so it has to match/compile but i just wanted to give it a try.
>
> java.lang.RuntimeException: A value for feature 'variable' is missing
> but required.
> Semantic Object:...->...->I...->...->VariableExpression
> at
> org.eclipse.xtext.serializer.diagnostic.ISerializationDiagnostic$ExceptionThrowingAcceptor.accept(ISerializationDiagnostic.java:70)
>
> at
> nl.esi.poosl.xtext.serializer.PooslSemanticSequencer.sequence_VariableExpression(PooslSemanticSequencer.java:2180)
>
> at
> nl.esi.poosl.xtext.serializer.PooslSemanticSequencer.createSequence(PooslSemanticSequencer.java:1063)
>
> at
> org.eclipse.xtext.serializer.acceptor.SequenceFeeder.acceptEObjectRuleCall(SequenceFeeder.java:299)
>
> at
> org.eclipse.xtext.serializer.acceptor.SequenceFeeder.acceptRuleCall(SequenceFeeder.java:325)
>
> at
> org.eclipse.xtext.serializer.acceptor.SequenceFeeder.accept(SequenceFeeder.java:215)
>
> at
> nl.esi.poosl.xtext.serializer.PooslSemanticSequencer.sequence_InstanceParameter(PooslSemanticSequencer.java:1726)
>
> at
> nl.esi.poosl.xtext.serializer.PooslSemanticSequencer.createSequence(PooslSemanticSequencer.java:564)
>
> at
> org.eclipse.xtext.serializer.acceptor.SequenceFeeder.acceptEObjectRuleCall(SequenceFeeder.java:299)
>
> at
> org.eclipse.xtext.serializer.acceptor.SequenceFeeder.acceptRuleCall(SequenceFeeder.java:325)
>
> at
> org.eclipse.xtext.serializer.acceptor.SequenceFeeder.accept(SequenceFeeder.java:239)
>
> at
> org.eclipse.xtext.serializer.sequencer.BacktrackingSemanticSequencer.accept(BacktrackingSemanticSequencer.java:400)
>
> at
> org.eclipse.xtext.serializer.sequencer.BacktrackingSemanticSequencer.createSequence(BacktrackingSemanticSequencer.java:449)
>
> at
> nl.esi.poosl.xtext.serializer.PooslSemanticSequencer.sequence_Instance(PooslSemanticSequencer.java:1755)
>
> at
> nl.esi.poosl.xtext.serializer.PooslSemanticSequencer.createSequence(PooslSemanticSequencer.java:558)
>
> at
> org.eclipse.xtext.serializer.acceptor.SequenceFeeder.acceptEObjectRuleCall(SequenceFeeder.java:299)
>
> at
> org.eclipse.xtext.serializer.acceptor.SequenceFeeder.acceptRuleCall(SequenceFeeder.java:325)
>
> at
> org.eclipse.xtext.serializer.acceptor.SequenceFeeder.accept(SequenceFeeder.java:239)
>
> at
> org.eclipse.xtext.serializer.sequencer.BacktrackingSemanticSequencer.accept(BacktrackingSemanticSequencer.java:400)
>
> at
> org.eclipse.xtext.serializer.sequencer.BacktrackingSemanticSequencer.createSequence(BacktrackingSemanticSequencer.java:449)
>
> at
> nl.esi.poosl.xtext.serializer.PooslSemanticSequencer.sequence_ClusterClass(PooslSemanticSequencer.java:1402)
>
> at
> nl.esi.poosl.xtext.serializer.PooslSemanticSequencer.createSequence(PooslSemanticSequencer.java:303)
>
> at
> org.eclipse.xtext.serializer.acceptor.SequenceFeeder.acceptEObjectRuleCall(SequenceFeeder.java:299)
>
> at
> org.eclipse.xtext.serializer.acceptor.SequenceFeeder.acceptRuleCall(SequenceFeeder.java:325)
>
> at
> org.eclipse.xtext.serializer.acceptor.SequenceFeeder.accept(SequenceFeeder.java:239)
>
> at
> org.eclipse.xtext.serializer.sequencer.BacktrackingSemanticSequencer.accept(BacktrackingSemanticSequencer.java:400)
>
> at
> org.eclipse.xtext.serializer.sequencer.BacktrackingSemanticSequencer.createSequence(BacktrackingSemanticSequencer.java:449)
>
> at
> nl.esi.poosl.xtext.serializer.PooslSemanticSequencer.sequence_Poosl(PooslSemanticSequencer.java:1948)
>
> at
> nl.esi.poosl.xtext.serializer.PooslSemanticSequencer.createSequence(PooslSemanticSequencer.java:736)
>
> at
> org.eclipse.xtext.serializer.impl.Serializer.serialize(Serializer.java:85)
> at
> org.eclipse.xtext.serializer.impl.Serializer.serialize(Serializer.java:108)
> at
> org.eclipse.xtext.serializer.impl.Serializer.serialize(Serializer.java:130)
> at
> org.eclipse.xtext.resource.XtextResource.doSave(XtextResource.java:336)
> at
> org.eclipse.emf.ecore.resource.impl.ResourceImpl.save(ResourceImpl.java:1430)
>
> at
> org.eclipse.sirius.business.internal.session.danalysis.ResourceSaveDiagnose.hasDifferentSerialization(ResourceSaveDiagnose.java:84)
>
> at
> org.eclipse.sirius.business.internal.session.danalysis.DifferentSerialization.apply(DifferentSerialization.java:51)
>
> at
> org.eclipse.sirius.business.internal.session.danalysis.DifferentSerialization.apply(DifferentSerialization.java:1)
>
> at
> org.eclipse.sirius.business.internal.session.IsModifiedSavingPolicy.computeResourcesToSave(IsModifiedSavingPolicy.java:172)
>
> at
> org.eclipse.sirius.business.api.session.AbstractSavingPolicy$1.run(AbstractSavingPolicy.java:70)
>
> at
> org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2313)
> at
> org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2295)
> at
> org.eclipse.sirius.business.api.session.AbstractSavingPolicy.save(AbstractSavingPolicy.java:68)
>
> at
> org.eclipse.sirius.common.xtext.internal.XtextSavingPolicy.save(XtextSavingPolicy.java:56)
>
> at
> org.eclipse.sirius.business.internal.session.danalysis.DAnalysisSessionImpl$1.run(DAnalysisSessionImpl.java:1000)
>
> at
> org.eclipse.emf.transaction.impl.TransactionalEditingDomainImpl.runExclusive(TransactionalEditingDomainImpl.java:328)
>
> at
> org.eclipse.sirius.business.internal.session.danalysis.DAnalysisSessionImpl.doSave(DAnalysisSessionImpl.java:1014)
>
> at
> org.eclipse.sirius.business.internal.session.danalysis.DAnalysisSessionImpl$Saver.saveNow(DAnalysisSessionImpl.java:248)
>
> at
> org.eclipse.sirius.business.internal.session.danalysis.DAnalysisSessionImpl$Saver.resourceSetChanged(DAnalysisSessionImpl.java:220)
>
> at
> org.eclipse.emf.transaction.impl.TransactionalEditingDomainImpl$1.run(TransactionalEditingDomainImpl.java:781)
>
> at
> org.eclipse.emf.transaction.impl.TransactionalEditingDomainImpl.runExclusive(TransactionalEditingDomainImpl.java:328)
>
> at
> org.eclipse.emf.transaction.impl.TransactionalEditingDomainImpl.postcommit(TransactionalEditingDomainImpl.java:771)
>
> at
> org.eclipse.emf.transaction.impl.TransactionalEditingDomainImpl.deactivate(TransactionalEditingDomainImpl.java:543)
>
> at
> org.eclipse.emf.transaction.impl.TransactionImpl.close(TransactionImpl.java:712)
>
> at
> org.eclipse.emf.transaction.impl.TransactionImpl.commit(TransactionImpl.java:474)
>
> at
> org.eclipse.emf.workspace.AbstractEMFOperation.execute(AbstractEMFOperation.java:155)
>
> at
> org.eclipse.sirius.diagram.ui.tools.internal.commands.WrappingCommandIgnoringAffectedFiles.execute(WrappingCommandIgnoringAffectedFiles.java:124)
>
> at
> org.eclipse.core.commands.operations.DefaultOperationHistory.execute(DefaultOperationHistory.java:513)
>
> at
> org.eclipse.sirius.diagram.ui.tools.internal.editor.DDiagramCommandStack.execute(DDiagramCommandStack.java:75)
>
> at
> org.eclipse.sirius.diagram.ui.tools.internal.editor.DDiagramCommandStack.execute(DDiagramCommandStack.java:57)
>
> at
> org.eclipse.gmf.runtime.diagram.ui.parts.DiagramCommandStack.execute(DiagramCommandStack.java:156)
>
> at
> org.eclipse.gef.ui.actions.WorkbenchPartAction.execute(WorkbenchPartAction.java:83)
>
> at
> org.eclipse.sirius.diagram.ui.tools.internal.actions.delete.DeleteWithHookAction.execute(DeleteWithHookAction.java:74)
>
> at
> org.eclipse.gmf.runtime.diagram.ui.internal.actions.PromptingDeleteAction.run(PromptingDeleteAction.java:173)
>
> at org.eclipse.gef.KeyHandler.performStroke(KeyHandler.java:83)
> at org.eclipse.gef.KeyHandler.keyPressed(KeyHandler.java:55)
> at org.eclipse.gef.KeyHandler.keyPressed(KeyHandler.java:59)
> at
> org.eclipse.gef.ui.parts.GraphicalViewerKeyHandler.keyPressed(GraphicalViewerKeyHandler.java:355)
>
> at
> org.eclipse.gmf.runtime.diagram.ui.internal.parts.DiagramGraphicalViewerKeyHandler.keyPressed(DiagramGraphicalViewerKeyHandler.java:104)
>
> at org.eclipse.gef.KeyHandler.keyPressed(KeyHandler.java:59)
> at
> org.eclipse.gmf.runtime.diagram.ui.internal.parts.DirectEditKeyHandler.keyPressed(DirectEditKeyHandler.java:89)
>
> at
> org.eclipse.gef.tools.SelectionTool.handleKeyDown(SelectionTool.java:331)
> at
> org.eclipse.gef.tools.PanningSelectionTool.handleKeyDown(PanningSelectionTool.java:161)
>
> at
> org.eclipse.gmf.runtime.diagram.ui.services.palette.SelectionToolEx.handleKeyDown(SelectionToolEx.java:112)
>
> at org.eclipse.gef.tools.AbstractTool.keyDown(AbstractTool.java:1016)
> at org.eclipse.gef.tools.SelectionTool.keyDown(SelectionTool.java:491)
> at org.eclipse.gef.EditDomain.keyDown(EditDomain.java:169)
> at
> org.eclipse.gef.ui.parts.DomainEventDispatcher.dispatchKeyPressed(DomainEventDispatcher.java:252)
>
> at
> org.eclipse.draw2d.LightweightSystem$EventHandler.keyPressed(LightweightSystem.java:497)
>
> at
> org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:167)
> at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
> at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4353)
> at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1061)
> at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1085)
> at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1070)
> at org.eclipse.swt.widgets.Widget.sendKeyEvent(Widget.java:1112)
> at org.eclipse.swt.widgets.Widget.sendKeyEvent(Widget.java:1108)
> at org.eclipse.swt.widgets.Widget.wmKeyDown(Widget.java:1831)
> at org.eclipse.swt.widgets.Control.WM_KEYDOWN(Control.java:4975)
> at org.eclipse.swt.widgets.Canvas.WM_KEYDOWN(Canvas.java:428)
> at org.eclipse.swt.widgets.Control.windowProc(Control.java:4642)
> at org.eclipse.swt.widgets.Canvas.windowProc(Canvas.java:339)
> at org.eclipse.swt.widgets.Display.windowProc(Display.java:5023)
> at org.eclipse.swt.internal.win32.OS.DispatchMessageW(Native Method)
> at org.eclipse.swt.internal.win32.OS.DispatchMessage(OS.java:2549)
> at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3759)
> at org.eclipse.jface.window.Window.runEventLoop(Window.java:832)
> at org.eclipse.jface.window.Window.open(Window.java:808)
> at
> org.eclipse.ui.internal.views.log.EventDetailsDialog.open(EventDetailsDialog.java:181)
>
> at
> org.eclipse.ui.internal.views.log.EventDetailsDialogAction.run(EventDetailsDialogAction.java:98)
>
> at
> org.eclipse.ui.internal.views.log.LogView$15.doubleClick(LogView.java:537)
> at
> org.eclipse.jface.viewers.StructuredViewer$1.run(StructuredViewer.java:831)
> at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
> at org.eclipse.ui.internal.JFaceUtil$1.run(JFaceUtil.java:50)
> at org.eclipse.jface.util.SafeRunnable.run(SafeRunnable.java:178)
> at
> org.eclipse.jface.viewers.StructuredViewer.fireDoubleClick(StructuredViewer.java:828)
>
> at
> org.eclipse.jface.viewers.AbstractTreeViewer.handleDoubleSelect(AbstractTreeViewer.java:1472)
>
> at
> org.eclipse.jface.viewers.StructuredViewer$4.widgetDefaultSelected(StructuredViewer.java:1237)
>
> at
> org.eclipse.jface.util.OpenStrategy.fireDefaultSelectionEvent(OpenStrategy.java:252)
>
> at org.eclipse.jface.util.OpenStrategy.access$0(OpenStrategy.java:249)
> at
> org.eclipse.jface.util.OpenStrategy$1.handleEvent(OpenStrategy.java:311)
> at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
> at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4353)
> at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1061)
> at
> org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4172)
> at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3761)
> at
> org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$9.run(PartRenderingEngine.java:1151)
>
> at
> org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
>
> at
> org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1032)
>
> at
> org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:148)
>
> at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:636)
> at
> org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
>
> at
> org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:579)
> at
> org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:150)
> at
> org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:135)
>
> 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:380)
>
> at
> org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:235)
>
> 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:648)
> at org.eclipse.equinox.launcher.Main.basicRun(Main.java:603)
> at org.eclipse.equinox.launcher.Main.run(Main.java:1465)
> at org.eclipse.equinox.launcher.Main.main(Main.java:1438)


--
Laurent - Obeo

Need professional services for Sirius?
http://www.obeodesigner.com/sirius


Laurent Redor - Obeo

Need training or professional services for Sirius?
http://www.obeodesigner.com/sirius
Re: Save failed after deletion [message #1600332 is a reply to message #1589341] Wed, 04 February 2015 06:55 Go to previous messageGo to next message
Huy Le is currently offline Huy LeFriend
Messages: 18
Registered: November 2014
Junior Member
Hello,

The exception is about saving diagram with invalid model. As i see your given log:

java.lang.RuntimeException: A value for feature 'variable' is missing but required.
Semantic Object:...->...->I...->...->VariableExpression


I also face the same case.

The coming question is How to customize the NullpointerException message box when doing save with invalid model.

For example, when saving with invalid model => a friendly message look like "...unable to save the diagram due to...blabla.."

Thanks,

Thanh Huy LE

[Updated on: Wed, 04 February 2015 06:56]

Report message to a moderator

Re: Save failed after deletion [message #1600419 is a reply to message #1600332] Wed, 04 February 2015 08:14 Go to previous messageGo to next message
Koen Staal is currently offline Koen StaalFriend
Messages: 70
Registered: October 2014
Member
Hey Thanh Huy LE

The documentation and presentations i looked at in the meanwhile urge you to just make "diagram" serializable after using a tool.

At the moment i do some form of refactor to make it serializable. I got some code behind a tool that checks if the deleted object behind a node is still in use and if possible perform the "refactor" otherwise show a (custom) dialog that it is not possible to delete the node.

Im basicly trying to find out what sirius already knows, if i can remove the object and still serialize. I wonder if i can ask sirius something like "canSerialize()"
Re: Save failed after deletion [message #1603638 is a reply to message #1600419] Fri, 06 February 2015 09:43 Go to previous message
Maxime Porhel is currently offline Maxime PorhelFriend
Messages: 482
Registered: July 2009
Location: Nantes, France
Senior Member
Hi Koen,
Hi Huy


Le 04/02/2015 09:14, Koen Staal a écrit :
> Hey Thanh Huy LE
>
> The documentation and presentations i looked at in the meanwhile urge
> you to just make "diagram" serializable after using a tool.

As mentionned by Cédric Brus in his "Sirius + Xtext = <3" EclipseCon
presentation [1][2], one solution consists in add model operation in
your tool (creation, direct edit, delete tool, ...) to always produce a
valid or serializable model. You might also try to reduce the
sensibility of your XText grammar and make it less strict for the
serialization.

>
> At the moment i do some form of refactor to make it serializable. I got
> some code behind a tool that checks if the deleted object behind a node
> is still in use and if possible perform the "refactor" otherwise show a
> (custom) dialog that it is not possible to delete the node.

When you delete an element, Sirius is intended to look for inverse cross
references and delete those references to the deleted objects. But in
your case this could produce some non serializable elements.

An idea could be to react to changes affecting you model (tools,
property view, ...) at the end of each transaction: you could add a
ModelChangeTrigger with priority=0 and a NotificationFilter targetting
the semantic resources to the SessionEventBroker, equivalent to an
aggregate precommit resourceset listener but it will allow you to make
the change before the first refresh (computation of the Sirius internal
model from your semantic model and you VSM) of the opened editors. You
might also have to look into DanglingRefRemovalTrigger to see how to
disable the RefreshEditorListener for the current precommit loop
iteration when you make modification in your semantic model to avoid to
trigger the refresh several time.
In your ModelChangeTrigger, you could detect the
modified/created/deleted elements, compute the elements which needs to
be modified to allow the serialization and then add some default/stub
values when required.
>
> Im basicly trying to find out what sirius already knows, if i can remove
> the object and still serialize. I wonder if i can ask sirius something
> like "canSerialize()"




Regards
--
Maxime - Obeo

Need professional services for Sirius?
http://www.obeodesigner.com/sirius
--
[1] http://fr.slideshare.net/cbrun/xtext-sirius
[2] https://www.eclipsecon.org/europe2014/session/sirius-xtext-%E2%99%A5


Maxime Porhel - Obeo

Need training or professional services for Sirius?
http://www.obeodesigner.com/sirius

Join the Sirius community at SiriusCon. Register for free: Nov. 9th Paris
http://www.siriuscon.org/
Previous Topic:External Java Action with null parameters
Next Topic:How to add Ecore types as a platform resource to a Sirius design project
Goto Forum:
  


Current Time: Sun Apr 05 01:59:34 GMT 2020

Powered by FUDForum. Page generated in 0.02426 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top