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

Bug 512443

Summary: EditModeDecorator checks the semantic element lockStatus and the part broken state twice
Product: [Modeling] Sirius Reporter: Maxime Porhel <maxime.porhel>
Component: DiagramAssignee: Maxime Porhel <maxime.porhel>
Status: CLOSED FIXED QA Contact: Laurent Redor <laurent.redor>
Severity: normal    
Priority: P3 CC: laurent.redor, pierre-charles.david
Version: 4.1.0Keywords: triaged
Target Milestone: 4.1.4   
Hardware: PC   
OS: Mac OS X   
See Also: https://git.eclipse.org/r/91519
https://git.eclipse.org/c/sirius/org.eclipse.sirius.git/commit/?id=6b7b52280b4fee7dcaa4a1ae5f2b4180ad2800eb
https://git.eclipse.org/r/93499
https://git.eclipse.org/c/sirius/org.eclipse.sirius.git/commit/?id=18755a2e134cd5617a658862f093cf3efc1832c8
Whiteboard:
Bug Depends on: 512292, 512444    
Bug Blocks:    

Description Maxime Porhel CLA 2017-02-20 10:53:34 EST
+++ This bug was initially created as a clone of Bug #512292 +++

Steps to reproduce: 
 - launch a runtime
 - open a diagram
 - put a breakpoint in EditModeDecorator.shouldBeDecorated
 - put a breakpoint in EditModeDecorator.getDecorationImage
 - Check the calls to getPermissionAuthority(), getLockStatus(), eResource()

In several context, on a big diagram, those operations can be costly and we do them twice for each concerned edit part during decorator refresh. 

One lead would be to only check the state of the part in shouldBeDecorated and to do the complex stuff in getDecorationImage as we need to identify which image we want to return.
Comment 1 Eclipse Genie CLA 2017-02-21 03:03:25 EST
New Gerrit change created: https://git.eclipse.org/r/91519
Comment 3 Eclipse Genie CLA 2017-03-21 07:23:13 EDT
New Gerrit change created: https://git.eclipse.org/r/93499
Comment 4 Maxime Porhel CLA 2017-03-21 07:24:03 EDT
See new patch set which reset the previous decoration image computation priority.
Comment 6 Laurent Redor CLA 2017-03-22 10:06:57 EDT
Validated with T4C:
* Export the IFE sample to the server
* Connect to it
* Open diagram "[SFBD] All Actor Functions"
* In the "Capella Project Explorer" view, delete the System Function "Launch Pre-Flight Tests") (from "In-Flight Entertainment System/System Analysis/System Functions/Root System Function/Perform Cabin Management Activities")
* In the diagram, a green lock is displayed on "Launch Pre-Flight Tests" instead of a red cross.
Comment 7 Pierre-Charles David CLA 2017-04-12 04:57:44 EDT
Available in Sirius 4.1.4, see https://wiki.eclipse.org/Sirius/4.1.4 for details.