From edd73c9886191a5600f565bbca1dac85efaeabc9 Mon Sep 17 00:00:00 2001 From: Anton Leherbauer Date: Fri, 20 Aug 2010 08:06:11 +0000 Subject: [PATCH] Bug 313512 - [vm][cache][api] Add update flag to flush all properties --- .../ui/viewmodel/update/AbstractCachingVMProvider.java | 4 +++- .../cdt/dsf/ui/viewmodel/update/IVMUpdatePolicy.java | 10 +++++++++- 2 files changed, 12 insertions(+), 2 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 55eefebbafc..0340def2021 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 @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2007, 2009 Wind River Systems and others. + * Copyright (c) 2007, 2010 Wind River Systems and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -767,6 +767,8 @@ public class AbstractCachingVMProvider extends AbstractVMProvider elementDataEntry.fChildren = null; elementDataEntry.fAllChildrenKnown = false; elementDataEntry.fDirty = false; + } else if ((updateFlags & IVMUpdatePolicy.FLUSH_ALL_PROPERTIES) != 0) { + elementDataEntry.fProperties = null; } else if ((updateFlags & IVMUpdatePolicy.FLUSH_PARTIAL_PROPERTIES) != 0) { Collection propertiesToFlush = flushKey.getPropertiesToFlush(elementDataKey, elementDataEntry.fDirty); if (propertiesToFlush != null && elementDataEntry.fProperties != null) { diff --git a/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/ui/viewmodel/update/IVMUpdatePolicy.java b/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/ui/viewmodel/update/IVMUpdatePolicy.java index 925029b47a3..ec814d2cf42 100644 --- a/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/ui/viewmodel/update/IVMUpdatePolicy.java +++ b/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/ui/viewmodel/update/IVMUpdatePolicy.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2007, 2009 Wind River Systems and others. + * Copyright (c) 2007, 2010 Wind River Systems and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -50,6 +50,14 @@ public interface IVMUpdatePolicy { */ public static int FLUSH_PARTIAL_PROPERTIES = 0x8; + /** + * Flag indicating that the cache should flush all properties of + * an element. + * + * @since 2.2 + */ + public static int FLUSH_ALL_PROPERTIES = 0x10; + /** * Returns unique ID of this update policy. */