fix global carbide debugger prefs read by using proper plugin id for which prefs were written
authortimkelly
Fri, 12 Mar 2010 14:18:47 -0600
changeset 1103 a5d7a2345c4a
parent 1102 fc2867001a80
child 1104 e84724c7f393
fix global carbide debugger prefs read by using proper plugin id for which prefs were written
debuggercdi/com.nokia.cdt.debug.common/src/com/nokia/cdt/debug/common/internal/source/lookup/CarbideSourcePathComputerDelegate.java
--- a/debuggercdi/com.nokia.cdt.debug.common/src/com/nokia/cdt/debug/common/internal/source/lookup/CarbideSourcePathComputerDelegate.java	Fri Mar 12 12:26:03 2010 -0600
+++ b/debuggercdi/com.nokia.cdt.debug.common/src/com/nokia/cdt/debug/common/internal/source/lookup/CarbideSourcePathComputerDelegate.java	Fri Mar 12 14:18:47 2010 -0600
@@ -27,6 +27,7 @@
 import org.eclipse.core.resources.ResourcesPlugin;
 import org.eclipse.core.runtime.CoreException;
 import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.Platform;
 import org.eclipse.debug.core.ILaunchConfiguration;
 import org.eclipse.debug.core.sourcelookup.ISourceContainer;
 import org.eclipse.debug.core.sourcelookup.ISourcePathComputerDelegate;
@@ -40,7 +41,10 @@
 public class CarbideSourcePathComputerDelegate implements ISourcePathComputerDelegate {
 
 	/** From legacy DE support. */
-	public static final String PSC_FindSourceOutsideWorkspace = "com.freescale.cdt.debug.cw.PN_FindSourceOutsideWorkspace";
+	public static final String PSC_FindSourceOutsideWorkspace = "com.freescale.cdt.debug.cw.PN_FindSourceOutsideWorkspace"; // $//$NON-NLS-N$
+	
+	/** Plugin ID to look up Carbide global debugger prefs */
+	public static final String CWPluginID = "com.freescale.cdt.debug.cw.core"; // $//$NON-NLS-N$
 	
 	/** 
 	 * Constructor for CSourcePathComputerDelegate. 
@@ -68,9 +72,10 @@
 				containers.add( 0, new ProjectSourceContainer( project, true ) );
 			}
 		}
-		if (CarbideCommonDebuggerPlugin.getDefault().getPluginPreferences().getBoolean(
-				PSC_FindSourceOutsideWorkspace))		
+		
+		if (Platform.getPreferencesService().getBoolean( CWPluginID, PSC_FindSourceOutsideWorkspace, false, null)){
 			containers.add( 0, new AbsolutePathSourceContainer() );
+		}
 		return (ISourceContainer[])containers.toArray( new ISourceContainer[containers.size()] );
 	}
 }