Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 499831

Summary: Compartment layout problem when addition of semantic elements involved a refresh of a diagram
Product: [Modeling] Sirius Reporter: Pierre-Charles David <pierre-charles.david>
Component: CoreAssignee: Laurent Redor <laurent.redor>
Status: CLOSED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: julien.dupont, laurent.redor
Version: 3.1.0Keywords: triaged
Target Milestone: 4.0.1   
Hardware: All   
OS: All   
See Also: https://git.eclipse.org/r/79515
https://git.eclipse.org/r/79513
https://git.eclipse.org/r/79512
https://git.eclipse.org/r/79519
https://git.eclipse.org/r/79518
https://git.eclipse.org/r/79517
https://git.eclipse.org/c/sirius/org.eclipse.sirius.git/commit/?id=8e51a4a8624dcf148c0bbe3b8e23f71c36675e6f
https://git.eclipse.org/c/sirius/org.eclipse.sirius.git/commit/?id=5229f40ed097fffc5c9516e8c18e3990ebbccff5
https://git.eclipse.org/c/sirius/org.eclipse.sirius.git/commit/?id=129f1b22d1cba197124ebc2442f26996770a7c26
https://git.eclipse.org/c/sirius/org.eclipse.sirius.git/commit/?id=bca7a90c9158a8cd130af12b35ed9f6e578068bd
https://git.eclipse.org/c/sirius/org.eclipse.sirius.git/commit/?id=3e99da4f055493490b9c8bc43b479810461e4640
https://git.eclipse.org/c/sirius/org.eclipse.sirius.git/commit/?id=ed8a536cb5ffc783f77b67f8c55c49e2ea17c77f
Whiteboard:
Bug Depends on: 495707    
Bug Blocks: 492607, 497398    

Description Pierre-Charles David CLA 2016-08-17 08:59:15 EDT
+++ This bug was initially created as a clone of Bug #495707 +++

There is a compartment layout problem when addition of semantic elements involved a refresh of a diagram.

Steps to reproduce:
* Import the project CompartimentsLayoutProblem from attached archive file
* Open the diagram "HStackDiag"
* Open the file My.ecore with the "Sample Ecore Model Editor"
* Copy the package "P1" in package "root" and rename it to "P2"
* Save the ecore file
* The diagram "HStackDiag" is refreshed:
** The new package P2 is created: OK
** The existing package P1 is auto-sized: KO. There is also a bug in the size of the container "P1" or its region "Left_class1" (the bug 495046 corresponds to this other problem).

If you do the same with the diagram "HStackDiagPinned" there is no problem. The difference between the 2 diagrams is that the package P1 is pinned in "HStackDiagPinned".
Comment 1 Pierre-Charles David CLA 2016-08-17 08:59:43 EDT
Cloned to report the fix in Sirius 4.0.1.
Comment 2 Eclipse Genie CLA 2016-08-23 09:52:26 EDT
New Gerrit change created: https://git.eclipse.org/r/79515
Comment 3 Eclipse Genie CLA 2016-08-23 09:52:29 EDT
New Gerrit change created: https://git.eclipse.org/r/79513
Comment 4 Eclipse Genie CLA 2016-08-23 09:52:31 EDT
New Gerrit change created: https://git.eclipse.org/r/79512
Comment 5 Eclipse Genie CLA 2016-08-23 09:52:32 EDT
New Gerrit change created: https://git.eclipse.org/r/79519
Comment 6 Eclipse Genie CLA 2016-08-23 09:52:34 EDT
New Gerrit change created: https://git.eclipse.org/r/79518
Comment 7 Eclipse Genie CLA 2016-08-23 09:52:36 EDT
New Gerrit change created: https://git.eclipse.org/r/79517
Comment 14 Julien Dupont CLA 2016-08-30 10:03:25 EDT
When saving modification, errors appears in the error log
An issue has occurred during the evaluation of 'aql:eStructuralFeature.changeable'.
Couldn't find the eStructuralFeature variable

Couldn't find the aqlFeatureAccess(org.eclipse.acceleo.query.runtime.impl.Nothing,java.lang.String) service

To reproduce:
* Import the project CompartimentsLayoutProblem from attached archive file
* Open the diagram "HStackDiag"
* Open the file My.ecore with the "Sample Ecore Model Editor"
* Copy the package "P1" in package "root" and rename it to "P2"
* Save the ecore file

Multiple errors occurs in Error Log view. KO
Comment 15 Julien Dupont CLA 2016-08-30 11:03:49 EDT
In sirius 4.0.0 only a warning appears in the Error Log view:
An exception was ignored during command executionorg.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.transaction.impl.AbstractTransactionalCommandStack.execute(AbstractTransactionalCommandStack.java:229)
	at org.eclipse.sirius.tools.api.ui.RefreshEditorsPrecommitListener.notify(RefreshEditorsPrecommitListener.java:282)
	at org.eclipse.sirius.business.internal.session.danalysis.DAnalysisSessionImpl.notifyListeners(DAnalysisSessionImpl.java:1019)
	at org.eclipse.sirius.business.internal.session.danalysis.SessionResourcesSynchronizer.reloadResource(SessionResourcesSynchronizer.java:224)
	at org.eclipse.sirius.business.internal.session.danalysis.SessionResourcesSynchronizer.processAction(SessionResourcesSynchronizer.java:170)
	at org.eclipse.sirius.business.internal.session.danalysis.SessionResourcesSynchronizer.processActions(SessionResourcesSynchronizer.java:159)
	at org.eclipse.sirius.business.internal.session.danalysis.SessionResourcesSynchronizer.statusesChanged(SessionResourcesSynchronizer.java:108)
	at org.eclipse.sirius.common.tools.api.resource.ResourceSetSync.notifyClientsInBatch(ResourceSetSync.java:392)
	at org.eclipse.sirius.common.tools.api.resource.ResourceSetSync.statusesChanged(ResourceSetSync.java:447)
	at org.eclipse.sirius.common.tools.internal.resource.ResourceSyncClientNotifier.run(ResourceSyncClientNotifier.java:77)
	at org.eclipse.sirius.common.tools.internal.resource.EditingSessionWorkspaceListener.resourceChanged(EditingSessionWorkspaceListener.java:59)
	at org.eclipse.core.internal.events.NotificationManager$1.run(NotificationManager.java:299)
	at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
	at org.eclipse.core.internal.events.NotificationManager.notify(NotificationManager.java:289)
	at org.eclipse.core.internal.events.NotificationManager.broadcastChanges(NotificationManager.java:152)
	at org.eclipse.core.internal.resources.Workspace.broadcastPostChange(Workspace.java:374)
	at org.eclipse.core.internal.resources.Workspace.endOperation(Workspace.java:1469)
	at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2253)
	at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2267)
	at org.eclipse.ui.actions.WorkspaceModifyOperation.run(WorkspaceModifyOperation.java:128)
	at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:119)
Caused by: org.eclipse.emf.transaction.RollbackException: Uncaught exception during pre-commit trigger processing
	at org.eclipse.emf.workspace.impl.WorkspaceCommandStackImpl.doExecute(WorkspaceCommandStackImpl.java:213)
	at org.eclipse.emf.transaction.impl.AbstractTransactionalCommandStack.execute(AbstractTransactionalCommandStack.java:165)
	at org.eclipse.emf.transaction.impl.AbstractTransactionalCommandStack.execute(AbstractTransactionalCommandStack.java:219)
	... 20 more
Comment 16 Laurent Redor CLA 2016-09-02 09:18:52 EDT
(In reply to Julien Dupont from comment #14)
> 
> Multiple errors occurs in Error Log view. KO

These errors comes from org.eclipse.eef.core, example: An issue has occurred during the evaluation of 'aql:eStructuralFeature.changeable'.
Couldn't find the 'eStructuralFeature' variable
Couldn't find the 'aqlFeatureAccess(org.eclipse.acceleo.query.runtime.impl.Nothing,java.lang.String)' service

They have no link with this issue. You can test in an environment without new properties view feature.
Comment 17 Pierre-Charles David CLA 2016-11-04 10:15:26 EDT
Available in Sirius 4.0.1. See https://wiki.eclipse.org/Sirius/4.0.1.