Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPawel Piech2009-10-06 15:24:19 +0000
committerPawel Piech2009-10-06 15:24:19 +0000
commit08e22395dafe88dbdb57db544d20a4025c5795c1 (patch)
tree154b4460db56ce1342bc84b7c6d88a6a97032f3f
parent4795e461e701cd487c90e25781f0b4e13c4e601e (diff)
downloadorg.eclipse.cdt-08e22395dafe88dbdb57db544d20a4025c5795c1.tar.gz
org.eclipse.cdt-08e22395dafe88dbdb57db544d20a4025c5795c1.tar.xz
org.eclipse.cdt-08e22395dafe88dbdb57db544d20a4025c5795c1.zip
[291425] Additional fix to update active policy ID for cache hits.
-rw-r--r--dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/ui/viewmodel/update/AbstractCachingVMProvider.java14
1 files changed, 14 insertions, 0 deletions
diff --git a/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/ui/viewmodel/update/AbstractCachingVMProvider.java b/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/ui/viewmodel/update/AbstractCachingVMProvider.java
index 836145a61df..aea4ff6a4c6 100644
--- a/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/ui/viewmodel/update/AbstractCachingVMProvider.java
+++ b/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/ui/viewmodel/update/AbstractCachingVMProvider.java
@@ -419,6 +419,14 @@ public class AbstractCachingVMProvider extends AbstractVMProvider
public void setActiveUpdatePolicy(IVMUpdatePolicy updatePolicy) {
getPresentationContext().setProperty(SELECTED_UPDATE_MODE, updatePolicy.getID());
+
+ // Repaint the view to allow elements using the PROP_UPDATE_POLICY_ID
+ // property to repaint themselves.
+ for (final IVMModelProxy proxyStrategy : getActiveModelProxies()) {
+ if (!proxyStrategy.isDisposed()) {
+ proxyStrategy.fireModelChanged(new ModelDelta(proxyStrategy.getRootElement(), IModelDelta.CONTENT));
+ }
+ }
}
public void refresh() {
@@ -1099,6 +1107,9 @@ public class AbstractCachingVMProvider extends AbstractVMProvider
if (DEBUG_CACHE && (DEBUG_PRESENTATION_ID == null || getPresentationContext().getId().equals(DEBUG_PRESENTATION_ID))) {
DsfUIPlugin.debug("cacheHitProperties(node = " + node + ", update = " + update + ", " + entry.fProperties + ")"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
}
+ if (entry.fProperties.containsKey(PROP_UPDATE_POLICY_ID)) {
+ entry.fProperties.put(PROP_UPDATE_POLICY_ID, getActiveUpdatePolicy().getID());
+ }
update.setAllProperties(entry.fProperties);
update.setStatus((IStatus)entry.fProperties.get(PROP_UPDATE_STATUS));
update.done();
@@ -1108,6 +1119,9 @@ public class AbstractCachingVMProvider extends AbstractVMProvider
if (DEBUG_CACHE && (DEBUG_PRESENTATION_ID == null || getPresentationContext().getId().equals(DEBUG_PRESENTATION_ID))) {
DsfUIPlugin.debug("cacheHitPropertiesPartialStaleData(node = " + node + ", update = " + update + ", " + entry.fProperties + ")"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
}
+ if (entry.fProperties.containsKey(PROP_UPDATE_POLICY_ID)) {
+ entry.fProperties.put(PROP_UPDATE_POLICY_ID, getActiveUpdatePolicy().getID());
+ }
update.setAllProperties(entry.fProperties);
update.setStatus(DsfUIPlugin.newErrorStatus(IDsfStatusConstants.INVALID_STATE, "Cache contains partial stale data for this request.", null)); //$NON-NLS-1$
update.done();

Back to the top