Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMaxime Porhel2020-10-16 07:58:43 +0000
committerMaxime Porhel2020-10-23 13:59:23 +0000
commit533e2556210e2ade7e46e4d5fbf120b4c2e7b9f6 (patch)
treecd3568d64b3bed817dd24df61ad0204ec70305cf /plugins
parent9a2cdd5317498a80c4338499c3a0c21eda513168 (diff)
downloadorg.eclipse.sirius-533e2556210e2ade7e46e4d5fbf120b4c2e7b9f6.tar.gz
org.eclipse.sirius-533e2556210e2ade7e46e4d5fbf120b4c2e7b9f6.tar.xz
org.eclipse.sirius-533e2556210e2ade7e46e4d5fbf120b4c2e7b9f6.zip
[567517] Disable cache if RangeSetter.setVerticalRange is called.
Bug: 567517 Change-Id: I116bb2691855d82973dc4622ea905f2fe59a025b Signed-off-by: Nathalie Lepine <nathalie.lepine@obeo.fr>
Diffstat (limited to 'plugins')
-rw-r--r--plugins/org.eclipse.sirius.diagram.sequence/src/org/eclipse/sirius/diagram/sequence/business/internal/util/RangeSetter.java60
1 files changed, 38 insertions, 22 deletions
diff --git a/plugins/org.eclipse.sirius.diagram.sequence/src/org/eclipse/sirius/diagram/sequence/business/internal/util/RangeSetter.java b/plugins/org.eclipse.sirius.diagram.sequence/src/org/eclipse/sirius/diagram/sequence/business/internal/util/RangeSetter.java
index d91c5da975..b0f47886e2 100644
--- a/plugins/org.eclipse.sirius.diagram.sequence/src/org/eclipse/sirius/diagram/sequence/business/internal/util/RangeSetter.java
+++ b/plugins/org.eclipse.sirius.diagram.sequence/src/org/eclipse/sirius/diagram/sequence/business/internal/util/RangeSetter.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2010, 2011 THALES GLOBAL SERVICES.
+ * Copyright (c) 2010, 2020 THALES GLOBAL SERVICES.
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
* which accompanies this distribution, and is available at
@@ -58,9 +58,8 @@ public final class RangeSetter {
}
/**
- * Common implementation of
- * {@link ISequenceEventEditPart#setVerticalRange(Range)} for lifelines and
- * executions. Assumes the {@link ISequenceEventEditPart} is a Node.
+ * Common implementation of {@link ISequenceEventEditPart#setVerticalRange(Range)} for lifelines and executions.
+ * Assumes the {@link ISequenceEventEditPart} is a Node.
*
* @param self
* the (root) execution edit part.
@@ -68,6 +67,9 @@ public final class RangeSetter {
* the vertical range of the given sequence event.
*/
public static void setVerticalRange(AbstractNodeEvent self, Range range) {
+ if (CacheHelper.isDragTrackerCacheEnabled()) {
+ CacheHelper.clearCaches();
+ }
Range oldRange = self.getVerticalRange();
int deltaY = range.getLowerBound() - oldRange.getLowerBound();
int size = range.width();
@@ -76,9 +78,8 @@ public final class RangeSetter {
}
/**
- * Common implementation of
- * {@link ISequenceEventEditPart#setVerticalRange(Range)} for states.
- * Assumes the {@link ISequenceEventEditPart} is a Node.
+ * Common implementation of {@link ISequenceEventEditPart#setVerticalRange(Range)} for states. Assumes the
+ * {@link ISequenceEventEditPart} is a Node.
*
* @param self
* the state edit part.
@@ -86,6 +87,9 @@ public final class RangeSetter {
* the vertical range of the given sequence event.
*/
public static void setVerticalRange(State self, Range range) {
+ if (CacheHelper.isDragTrackerCacheEnabled()) {
+ CacheHelper.clearCaches();
+ }
Range oldRange = self.getVerticalRange();
int deltaY = range.getLowerBound() - oldRange.getLowerBound();
int size = range.width();
@@ -94,9 +98,8 @@ public final class RangeSetter {
}
/**
- * Common implementation of
- * {@link ISequenceEventEditPart#setVerticalRange(Range)} for interaction
- * uses. Assumes the {@link ISequenceEventEditPart} is a Node.
+ * Common implementation of {@link ISequenceEventEditPart#setVerticalRange(Range)} for interaction uses. Assumes the
+ * {@link ISequenceEventEditPart} is a Node.
*
* @param self
* the InteractionUse.
@@ -104,6 +107,9 @@ public final class RangeSetter {
* the vertical range of the given sequence event.
*/
public static void setVerticalRange(InteractionUse self, Range range) {
+ if (CacheHelper.isDragTrackerCacheEnabled()) {
+ CacheHelper.clearCaches();
+ }
Range oldRange = self.getVerticalRange();
int deltaY = range.getLowerBound() - oldRange.getLowerBound();
int size = range.width();
@@ -112,9 +118,8 @@ public final class RangeSetter {
}
/**
- * Common implementation of
- * {@link ISequenceEventEditPart#setVerticalRange(Range)} for combined
- * fragments. Assumes the {@link ISequenceEventEditPart} is a Node.
+ * Common implementation of {@link ISequenceEventEditPart#setVerticalRange(Range)} for combined fragments. Assumes
+ * the {@link ISequenceEventEditPart} is a Node.
*
* @param self
* the CombinedFragment.
@@ -122,6 +127,9 @@ public final class RangeSetter {
* the vertical range of the given sequence event.
*/
public static void setVerticalRange(CombinedFragment self, Range range) {
+ if (CacheHelper.isDragTrackerCacheEnabled()) {
+ CacheHelper.clearCaches();
+ }
Range oldRange = self.getVerticalRange();
int deltaY = range.getLowerBound() - oldRange.getLowerBound();
int size = range.width();
@@ -130,9 +138,8 @@ public final class RangeSetter {
}
/**
- * Common implementation of
- * {@link ISequenceEventEditPart#setVerticalRange(Range)} for combined
- * fragments. Assumes the {@link ISequenceEventEditPart} is a Node.
+ * Common implementation of {@link ISequenceEventEditPart#setVerticalRange(Range)} for combined fragments. Assumes
+ * the {@link ISequenceEventEditPart} is a Node.
*
* @param self
* the CombinedFragment.
@@ -140,6 +147,9 @@ public final class RangeSetter {
* the vertical range of the given sequence event.
*/
public static void setVerticalRange(Operand self, Range range) {
+ if (CacheHelper.isDragTrackerCacheEnabled()) {
+ CacheHelper.clearCaches();
+ }
Range oldRange = self.getVerticalRange();
int deltaY = range.getLowerBound() - oldRange.getLowerBound();
int size = range.width();
@@ -148,9 +158,8 @@ public final class RangeSetter {
}
/**
- * Common implementation of
- * {@link ISequenceEventEditPart#setVerticalRange(Range)} for lifelines and
- * executions. Assumes the {@link ISequenceEventEditPart} is a Node.
+ * Common implementation of {@link ISequenceEventEditPart#setVerticalRange(Range)} for lifelines and executions.
+ * Assumes the {@link ISequenceEventEditPart} is a Node.
*
* @param self
* the (root) execution edit part.
@@ -158,6 +167,10 @@ public final class RangeSetter {
* the vertical range of the given sequence event.
*/
public static void setVerticalRange(Lifeline self, Range range) {
+ if (CacheHelper.isDragTrackerCacheEnabled()) {
+ CacheHelper.clearCaches();
+ }
+
InstanceRole instanceRole = self.getInstanceRole();
Rectangle irepBounds = instanceRole.getBounds();
Range irRange = new Range(range.getLowerBound() - irepBounds.height, range.getUpperBound());
@@ -244,9 +257,8 @@ public final class RangeSetter {
}
/**
- * Common implementation of
- * {@link ISequenceEventEditPart#setVerticalRange(Range)} for lifelines and
- * executions. Assumes the {@link ISequenceEventEditPart} is a Node.
+ * Common implementation of {@link ISequenceEventEditPart#setVerticalRange(Range)} for lifelines and executions.
+ * Assumes the {@link ISequenceEventEditPart} is a Node.
*
* @param self
* the (root) execution edit part.
@@ -254,6 +266,10 @@ public final class RangeSetter {
* the vertical range of the given sequence event.
*/
public static void setVerticalRange(Message self, Range range) {
+ if (CacheHelper.isDragTrackerCacheEnabled()) {
+ CacheHelper.clearCaches();
+ }
+
RangeSetter.handlePotentialLostEnd(self.getSourceElement(), range);
RangeSetter.handlePotentialLostEnd(self.getTargetElement(), range);

Back to the top