# HG changeset patch # User timkelly # Date 1283198295 18000 # Node ID 4d554177f768c799a5e0acff2b4149672e5ce27d # Parent 5c50210513151010d1a6766afd1a067739159cd8 add util to flush all SBSv2 query caches. Problem with rescanning all the SBSv2 caches from UI was not writing cache back to disk. diff -r 5c5021051315 -r 4d554177f768 core/com.nokia.carbide.cpp.sdk.core/src/com/nokia/carbide/cpp/internal/api/sdk/sbsv2/SBSv2QueryUtils.java --- a/core/com.nokia.carbide.cpp.sdk.core/src/com/nokia/carbide/cpp/internal/api/sdk/sbsv2/SBSv2QueryUtils.java Mon Aug 30 14:17:20 2010 -0500 +++ b/core/com.nokia.carbide.cpp.sdk.core/src/com/nokia/carbide/cpp/internal/api/sdk/sbsv2/SBSv2QueryUtils.java Mon Aug 30 14:58:15 2010 -0500 @@ -482,5 +482,19 @@ public static void removeCachedConfigurations() { SDKCacheUtils.getCache().removeCache(CONFIG_CACHE_KEY, true); } + + /** + * Write all SBSv2 caches. + */ + public static void flushAllSBSv2Caches(){ + try { + SDKCacheUtils.getCache().flushCache(ALIAS_CACHE_KEY); + SDKCacheUtils.getCache().flushCache(PRODUCT_CACHE_KEY); + SDKCacheUtils.getCache().flushCache(CONFIG_CACHE_KEY); + } catch (Exception e) { + e.printStackTrace(); + } + + } } diff -r 5c5021051315 -r 4d554177f768 core/com.nokia.carbide.cpp.sdk.ui/src/com/nokia/carbide/cpp/internal/api/sdk/ui/SBSv2PlatformFilterComposite.java --- a/core/com.nokia.carbide.cpp.sdk.ui/src/com/nokia/carbide/cpp/internal/api/sdk/ui/SBSv2PlatformFilterComposite.java Mon Aug 30 14:17:20 2010 -0500 +++ b/core/com.nokia.carbide.cpp.sdk.ui/src/com/nokia/carbide/cpp/internal/api/sdk/ui/SBSv2PlatformFilterComposite.java Mon Aug 30 14:58:15 2010 -0500 @@ -135,13 +135,15 @@ public void widgetSelected(SelectionEvent e) { refreshButton.setEnabled(false); refreshButton.setText(Messages.getString("SBSv2PlatformFilterComposite.RefreshButtonScanningText")); //$NON-NLS-1$ - SBSv2QueryUtils.removeAllCachedQueries(); - refreshLocalSBSCacheData(); - for (ISymbianSDK sdk : SDKCorePlugin.getSDKManager().getSDKList()){ - ((SBSv2BuildInfo)sdk.getBuildInfo(ISymbianBuilderID.SBSV2_BUILDER)).clearDataFromBuildCache(); - } +// for (ISymbianSDK sdk : SDKCorePlugin.getSDKManager().getSDKList()){ +// ((SBSv2BuildInfo)sdk.getBuildInfo(ISymbianBuilderID.SBSV2_BUILDER)).clearDataFromBuildCache(); +// } + SBSv2QueryUtils.removeAllCachedQueries(); + refreshLocalSBSCacheData(); + + SBSv2QueryUtils.flushAllSBSv2Caches(); refreshButton.setText(Messages.getString("SBSv2PlatformFilterComposite.RefreshButtonText")); //$NON-NLS-1$ refreshButton.setEnabled(true); } @@ -320,6 +322,7 @@ if (customVariantListViewer != null) { customVariantListViewer.setInput(savedVariants); } + } private void refreshLocalSBSCacheData() {