Bug 430268 - Inconsistencies in DDiagram listeners after session reloading
Summary: Inconsistencies in DDiagram listeners after session reloading
Status: CLOSED FIXED
Alias: None
Product: Sirius
Classification: Modeling
Component: Diagram (show other bugs)
Version: 0.9   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: 1.0.0M7   Edit
Assignee: Laurent Redor CLA
QA Contact: Pierre-Charles David CLA
URL:
Whiteboard:
Keywords: triaged
Depends on:
Blocks:
 
Reported: 2014-03-13 06:24 EDT by Laurent Redor CLA
Modified: 2014-05-12 03:45 EDT (History)
1 user (show)

See Also:


Attachments
Use case for the steps to reproduce (3.09 KB, application/zip)
2014-03-13 06:24 EDT, Laurent Redor CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Laurent Redor CLA 2014-03-13 06:24:54 EDT
Created attachment 240858 [details]
Use case for the steps to reproduce

When extrenal changes are done on Session, the session is reloaded. If a diagram editor is opened during the reloading, its listeners (GMFDiagramUpdater) use the old Diagram (proxy) instead of the new one.

Steps to reproduce:
* Imports the project "SampleProject" of the sample.zip file
* Open diagram "root package entities"
* Modify the files "representations.aird" and "My.ecore" outside of eclipse (just add a blank line in the file)
* In Eclipse, launch a refresh on the prject
* Add a new package in "newPackage1" --> There is error in errorLog

Impossible to find an interpreter - Could not find a session for model element : org.eclipse.emf.ecore.impl.EReferenceImpl@3a6cc951 (eProxyURI: platform:/resource/SampleProject/My.ecore#//newPackage1/NewEClass1/newEReference1):
java.lang.RuntimeException
	at fr.obeo.dsl.viewpoint.tools.api.interpreter.InterpreterRegistry.getInterpreter(InterpreterRegistry.java:108)
	at fr.obeo.dsl.viewpoint.business.internal.metamodel.description.filter.spec.MappingFilterSpec.checkExpression(MappingFilterSpec.java:36)
	at fr.obeo.dsl.viewpoint.business.internal.metamodel.description.filter.spec.MappingFilterSpec.isVisible(MappingFilterSpec.java:80)
	at fr.obeo.dsl.viewpoint.business.internal.metamodel.description.filter.spec.CompositeFilterDescriptionSpec.isVisible(CompositeFilterDescriptionSpec.java:37)
	at fr.obeo.dsl.viewpoint.business.api.helper.filter.FilterService.getAppliedFiltersOnElement(FilterService.java:225)
	at fr.obeo.dsl.viewpoint.business.api.helper.filter.FilterService.getAppliedFilters(FilterService.java:212)
	at fr.obeo.dsl.viewpoint.diagram.business.api.helper.graphicalfilters.CompositeFilterApplicationBuilder.computeCompositeFilterApplications(CompositeFilterApplicationBuilder.java:57)
	at fr.obeo.dsl.viewpoint.diagram.internal.refresh.listeners.FilterListener$FilteredElementsUpdateCommand.doExecute(FilterListener.java:87)
	at org.eclipse.emf.transaction.RecordingCommand.execute(RecordingCommand.java:135)
	at fr.obeo.dsl.viewpoint.business.internal.session.SessionEventBrokerImpl$PreCommitPriorityNotifyListenersCommand.launchCommands(SessionEventBrokerImpl.java:244)
	at fr.obeo.dsl.viewpoint.business.internal.session.SessionEventBrokerImpl$PreCommitPriorityNotifyListenersCommand.doExecute(SessionEventBrokerImpl.java:235)
	at org.eclipse.emf.transaction.RecordingCommand.execute(RecordingCommand.java:135)
	at org.eclipse.emf.transaction.util.TriggerCommand.execute(TriggerCommand.java:113)
	at org.eclipse.emf.workspace.impl.WorkspaceCommandStackImpl.executeTriggers(WorkspaceCommandStackImpl.java:398)
	at org.eclipse.emf.transaction.impl.TransactionalEditingDomainImpl.precommit(TransactionalEditingDomainImpl.java:712)
	at org.eclipse.emf.transaction.impl.TransactionImpl.commit(TransactionImpl.java:414)
	at org.eclipse.emf.workspace.AbstractEMFOperation.execute(AbstractEMFOperation.java:155)
	at org.eclipse.gmf.runtime.common.core.command.CompositeCommand.doExecuteWithResult(CompositeCommand.java:403)
	at org.eclipse.gmf.runtime.common.core.command.AbstractCommand.execute(AbstractCommand.java:135)
	at org.eclipse.gmf.runtime.common.core.command.CompositeCommand.doExecuteWithResult(CompositeCommand.java:403)
	at org.eclipse.gmf.runtime.common.core.command.AbstractCommand.execute(AbstractCommand.java:135)
	at fr.obeo.dsl.viewpoint.diagram.tools.internal.commands.WrappingCommandIgnoringAffectedFiles.execute(WrappingCommandIgnoringAffectedFiles.java:121)
	at org.eclipse.core.commands.operations.DefaultOperationHistory.execute(DefaultOperationHistory.java:511)
	at fr.obeo.dsl.viewpoint.diagram.tools.internal.editor.DDiagramCommandStack.execute(DDiagramCommandStack.java:73)
	at fr.obeo.dsl.viewpoint.diagram.tools.internal.editor.DDiagramCommandStack.execute(DDiagramCommandStack.java:55)
	at org.eclipse.gmf.runtime.diagram.ui.parts.DiagramCommandStack.execute(DiagramCommandStack.java:156)
	at org.eclipse.gef.tools.AbstractTool.executeCommand(AbstractTool.java:425)
	at org.eclipse.gef.tools.AbstractTool.executeCurrentCommand(AbstractTool.java:438)
	at org.eclipse.gef.tools.CreationTool.performCreation(CreationTool.java:266)
	at org.eclipse.gef.tools.CreationTool.handleButtonUp(CreationTool.java:186)
	at org.eclipse.gef.tools.AbstractTool.mouseUp(AbstractTool.java:1201)
	at org.eclipse.gef.EditDomain.mouseUp(EditDomain.java:301)
	at org.eclipse.gef.ui.parts.DomainEventDispatcher.dispatchMouseReleased(DomainEventDispatcher.java:380)
	at org.eclipse.draw2d.LightweightSystem$EventHandler.mouseUp(LightweightSystem.java:548)
	at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:213)
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1258)
	at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3540)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3161)
	at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2640)
	at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2604)
	at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2438)
	at org.eclipse.ui.internal.Workbench$7.run(Workbench.java:671)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
	at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:664)
	at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
	at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:115)
	at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:369)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:606)
	at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:620)
	at org.eclipse.equinox.launcher.Main.basicRun(Main.java:575)
	at org.eclipse.equinox.launcher.Main.run(Main.java:1408)
	at org.eclipse.equinox.launcher.Main.main(Main.java:1384)
{code}
Comment 1 Laurent Redor CLA 2014-03-13 06:46:06 EDT
Waiting review of https://git.eclipse.org/r/#/c/23315/
Comment 2 Laurent Redor CLA 2014-03-20 05:37:35 EDT
Fixed through commit 5636a359cfb651dd123389d81f33e86ddee93e8f: http://git.eclipse.org/c/sirius/org.eclipse.sirius.git/commit/?id=5636a359cfb651dd123389d81f33e86ddee93e8f
Comment 3 Pierre-Charles David CLA 2014-05-05 07:06:06 EDT
Verified on 1.0.0M7rc1 (1.0.0.20405030833).
Comment 4 Pierre-Charles David CLA 2014-05-12 03:45:54 EDT
Available in Sirius 1.0.0M7 (see https://wiki.eclipse.org/Sirius/1.0.0M7 & http://git.eclipse.org/c/sirius/org.eclipse.sirius.git/tag/?id=v1.0.0M7).