From 08513938be4ee536ada887a49196fdcbc4ca5c34 Mon Sep 17 00:00:00 2001 From: Sergey Prigogin Date: Sat, 15 Oct 2011 15:29:24 -0700 Subject: [PATCH] Fixed a deprecation warning. --- .../cdt/internal/core/model/Binary.java | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/Binary.java b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/Binary.java index bfda27a9c37..5e13712ffc5 100644 --- a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/Binary.java +++ b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/Binary.java @@ -45,6 +45,7 @@ import org.eclipse.core.runtime.Assert; import org.eclipse.core.runtime.IPath; import org.eclipse.core.runtime.IProgressMonitor; import org.eclipse.core.runtime.Path; +import org.eclipse.core.runtime.Platform; public class Binary extends Openable implements IBinary { @@ -273,20 +274,19 @@ public class Binary extends Openable implements IBinary { if (obj != null) { // First check if we can get the list of source // files used to build the binary from the symbol - // information. if not, fall back on information from the binary parser. - boolean showSourceFiles = CCorePlugin.getDefault().getPluginPreferences().getBoolean( CCorePreferenceConstants.SHOW_SOURCE_FILES_IN_BINARIES ); - if (!showSourceFiles || - !addSourceFiles(info, obj, hash)) - { + // information. If not, fall back on information from the binary parser. + boolean showSourceFiles = Platform.getPreferencesService().getBoolean(CCorePlugin.PLUGIN_ID, + CCorePreferenceConstants.SHOW_SOURCE_FILES_IN_BINARIES, false, null); + if (!showSourceFiles || !addSourceFiles(info, obj, hash)) { ISymbol[] symbols = obj.getSymbols(); for (ISymbol symbol : symbols) { switch (symbol.getType()) { - case ISymbol.FUNCTION : - addFunction(info, symbol, hash); + case ISymbol.FUNCTION: + addFunction(info, symbol, hash); break; - case ISymbol.VARIABLE : - addVariable(info, symbol, hash); + case ISymbol.VARIABLE: + addVariable(info, symbol, hash); break; } }