Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMaxime Porhel2019-07-09 05:10:12 -0400
committerMaxime Porhel2019-07-19 09:15:57 -0400
commitf9d1ae10498f49be6fab545712d37a5f7f96ad9a (patch)
treee3a98af8c686f5abdf62b87d7c0997ad7ec8e093
parent24376041a20137535046ecd3b9a776bdbc911192 (diff)
downloadorg.eclipse.sirius-f9d1ae10498f49be6fab545712d37a5f7f96ad9a.tar.gz
org.eclipse.sirius-f9d1ae10498f49be6fab545712d37a5f7f96ad9a.tar.xz
org.eclipse.sirius-f9d1ae10498f49be6fab545712d37a5f7f96ad9a.zip
[549054] Activate uri fragment cache during visibility computation.
Bug: 549054 Change-Id: I4db6a15878b5a1743dda3ecc61c207965551439d Signed-off-by: Maxime Porhel <maxime.porhel@obeo.fr>
-rw-r--r--plugins/org.eclipse.sirius.diagram/src-core/org/eclipse/sirius/diagram/business/internal/helper/display/DisplayServiceImpl.java24
1 files changed, 15 insertions, 9 deletions
diff --git a/plugins/org.eclipse.sirius.diagram/src-core/org/eclipse/sirius/diagram/business/internal/helper/display/DisplayServiceImpl.java b/plugins/org.eclipse.sirius.diagram/src-core/org/eclipse/sirius/diagram/business/internal/helper/display/DisplayServiceImpl.java
index 42bbe84534..ce49e0c703 100644
--- a/plugins/org.eclipse.sirius.diagram/src-core/org/eclipse/sirius/diagram/business/internal/helper/display/DisplayServiceImpl.java
+++ b/plugins/org.eclipse.sirius.diagram/src-core/org/eclipse/sirius/diagram/business/internal/helper/display/DisplayServiceImpl.java
@@ -21,6 +21,7 @@ import org.eclipse.sirius.business.api.session.SessionManager;
import org.eclipse.sirius.common.tools.DslCommonPlugin;
import org.eclipse.sirius.common.tools.api.listener.Notification;
import org.eclipse.sirius.common.tools.api.listener.NotificationUtil;
+import org.eclipse.sirius.common.tools.api.util.EqualityHelper;
import org.eclipse.sirius.diagram.DDiagram;
import org.eclipse.sirius.diagram.DDiagramElement;
import org.eclipse.sirius.diagram.DEdge;
@@ -75,17 +76,22 @@ public final class DisplayServiceImpl implements DisplayService {
Session session = SessionManager.INSTANCE.getSession(((DSemanticDiagram) diagram).getTarget());
DiagramMappingsManager mappingManager = DiagramMappingsManagerRegistry.INSTANCE.getDiagramMappingsManager(session, diagram);
- NotificationUtil.sendNotification(diagram, Notification.Kind.START, Notification.REFRESH_VISIBILITY_ON_DIAGRAM);
- DslCommonPlugin.PROFILER.startWork(SiriusTasksKey.IS_VISIBLE_KEY);
- for (final DDiagramElement diagramElement : diagram.getDiagramElements()) {
- boolean visibility = computeVisibility(mappingManager, diagram, diagramElement);
- if (visibility != diagramElement.isVisible()) {
- diagramElement.setVisible(visibility);
+ try {
+ EqualityHelper.setUriFragmentCacheEnabled(true);
+ NotificationUtil.sendNotification(diagram, Notification.Kind.START, Notification.REFRESH_VISIBILITY_ON_DIAGRAM);
+ DslCommonPlugin.PROFILER.startWork(SiriusTasksKey.IS_VISIBLE_KEY);
+ for (final DDiagramElement diagramElement : diagram.getDiagramElements()) {
+ boolean visibility = computeVisibility(mappingManager, diagram, diagramElement);
+ if (visibility != diagramElement.isVisible()) {
+ diagramElement.setVisible(visibility);
+ }
}
+ DslCommonPlugin.PROFILER.stopWork(SiriusTasksKey.IS_VISIBLE_KEY);
+ NotificationUtil.sendNotification(diagram, Notification.Kind.STOP, Notification.REFRESH_VISIBILITY_ON_DIAGRAM);
+ } finally {
+ deactivateCache();
+ EqualityHelper.setUriFragmentCacheEnabled(false);
}
- DslCommonPlugin.PROFILER.stopWork(SiriusTasksKey.IS_VISIBLE_KEY);
- NotificationUtil.sendNotification(diagram, Notification.Kind.STOP, Notification.REFRESH_VISIBILITY_ON_DIAGRAM);
- deactivateCache();
}
/**

Back to the top