mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-29 19:45:01 +02:00
[291425] Additional fix to update active policy ID for cache hits.
This commit is contained in:
parent
4795e461e7
commit
08e22395da
1 changed files with 14 additions and 0 deletions
|
@ -419,6 +419,14 @@ public class AbstractCachingVMProvider extends AbstractVMProvider
|
||||||
|
|
||||||
public void setActiveUpdatePolicy(IVMUpdatePolicy updatePolicy) {
|
public void setActiveUpdatePolicy(IVMUpdatePolicy updatePolicy) {
|
||||||
getPresentationContext().setProperty(SELECTED_UPDATE_MODE, updatePolicy.getID());
|
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() {
|
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))) {
|
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$
|
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.setAllProperties(entry.fProperties);
|
||||||
update.setStatus((IStatus)entry.fProperties.get(PROP_UPDATE_STATUS));
|
update.setStatus((IStatus)entry.fProperties.get(PROP_UPDATE_STATUS));
|
||||||
update.done();
|
update.done();
|
||||||
|
@ -1108,6 +1119,9 @@ public class AbstractCachingVMProvider extends AbstractVMProvider
|
||||||
if (DEBUG_CACHE && (DEBUG_PRESENTATION_ID == null || getPresentationContext().getId().equals(DEBUG_PRESENTATION_ID))) {
|
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$
|
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.setAllProperties(entry.fProperties);
|
||||||
update.setStatus(DsfUIPlugin.newErrorStatus(IDsfStatusConstants.INVALID_STATE, "Cache contains partial stale data for this request.", null)); //$NON-NLS-1$
|
update.setStatus(DsfUIPlugin.newErrorStatus(IDsfStatusConstants.INVALID_STATE, "Cache contains partial stale data for this request.", null)); //$NON-NLS-1$
|
||||||
update.done();
|
update.done();
|
||||||
|
|
Loading…
Add table
Reference in a new issue