[245708] indexer preferences not passed to remote indexer
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/indexer/IStandaloneScannerInfoProvider.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/indexer/IStandaloneScannerInfoProvider.java
index 0e33a44..7ac5697 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/indexer/IStandaloneScannerInfoProvider.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/indexer/IStandaloneScannerInfoProvider.java
@@ -15,8 +15,6 @@
 import org.eclipse.cdt.core.parser.IScannerInfoProvider;
 
 /**
- * Returns a IScannerInfo for the given file by a path.
- * 
  * Similar to IScannerInfoProvider but computes the IScannerInfo
  * based on a String path instead of IResource.
  * 
@@ -24,5 +22,20 @@
  */
 public interface IStandaloneScannerInfoProvider {
 
+	/**
+	 * Returns an IScannerInfo for the given file path,
+	 * or an empty IScannerInfo object if the file path is invalid.
+	 */
 	IScannerInfo getScannerInformation(String path);
+	
+	/**
+	 * Returns an IScannerInfo when you don't necessary have access to a path. 
+	 * 
+	 * This is used by the "parse up front" feature. Since we are parsing
+	 * files outside of the project a "default" IScannerInfo object
+	 * is needed to get the minimal amount of available info in order
+	 * to parse the file.
+	 * @param linkageID 
+	 */
+	IScannerInfo getDefaultScannerInformation(int linkageID);
 }
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/indexer/StandaloneIndexer.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/indexer/StandaloneIndexer.java
index 21c3e93..dc0f3a1 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/indexer/StandaloneIndexer.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/indexer/StandaloneIndexer.java
@@ -25,6 +25,7 @@
 import org.eclipse.cdt.core.parser.IScannerInfo;
 import org.eclipse.cdt.internal.core.index.IWritableIndex;
 import org.eclipse.cdt.internal.core.pdom.IndexerProgress;
+import org.eclipse.cdt.internal.core.pdom.PDOMWriter;
 import org.eclipse.core.runtime.CoreException;
 import org.eclipse.core.runtime.IProgressMonitor;
 
@@ -47,17 +48,17 @@
 	/**
 	 * Parser should not skip any references.
 	 */
-	public static final int SKIP_NO_REFERENCES= 0;
+	public static final int SKIP_NO_REFERENCES = PDOMWriter.SKIP_NO_REFERENCES;
 	
 	/**
 	 * Parser to skip all references.
 	 */
-	public static final int SKIP_ALL_REFERENCES= 1; 
+	public static final int SKIP_ALL_REFERENCES = PDOMWriter.SKIP_ALL_REFERENCES; 
 	
 	/**
-	 * Parser to skp type references.
+	 * Parser to skip type references.
 	 */
-	public static final int SKIP_TYPE_REFERENCES= 2;
+	public static final int SKIP_TYPE_REFERENCES = PDOMWriter.SKIP_TYPE_REFERENCES;
 	
 	/**
 	 * Constant for indicating to update all translation units.
@@ -98,6 +99,7 @@
 	 * be provided, but not both. If a single IScannerInfo object is provided
 	 * it will always be used. Otherwise the provider will be used.
 	 */
+	@Deprecated
 	protected IScannerInfo fScanner;
 	
 	/**
@@ -158,6 +160,10 @@
 		}
 	};
 	
+	/**
+	 * @deprecated Its better to provide a scanner info provider instead.
+	 */
+	@Deprecated
 	public StandaloneIndexer(IWritableIndex index, boolean indexAllFiles,  
 			                 ILanguageMapper mapper, IParserLogService log, IScannerInfo scanner) {
 		fIndex = index;
@@ -202,6 +208,13 @@
 	}
 	
 	/**
+	 * If true then all files will be indexed.
+	 */
+	public void setIndexAllFiles(boolean indexAllFiles) {
+		fIndexAllFiles = indexAllFiles;
+	}
+	
+	/**
 	 * Returns the collection of valid file extensions for C/C++ source.
 	 */
 	public Set<String> getValidSourceUnitNames() {
@@ -217,7 +230,10 @@
 	
 	/**
 	 * Returns the IScannerInfo that provides include paths and defined symbols.
+	 * @deprecated Should probably be using a IStandaloneScannerInfoProvider instead and
+	 * calling getScannerInfo(String).
 	 */
+	@Deprecated
 	public IScannerInfo getScannerInfo() {
 		return fScanner;
 	}
@@ -235,7 +251,14 @@
 		
 		return fScannerInfoProvider.getScannerInformation(path);
 	}
-	
+
+
+	/**
+	 * Returns the IStandaloneScannerInfoProvider or null if one was not provided.
+	 */
+	public IStandaloneScannerInfoProvider getScannerInfoProvider() {
+		return fScannerInfoProvider;
+	}
 	
 	/**
 	 * Returns the ILanguageMapper that determines the ILanguage for a file.
@@ -355,6 +378,7 @@
 			clearIndex();
 			fDelegate= createTask(getFilesAdded(tus), NO_TUS, NO_TUS);
 			fDelegate.setUpdateFlags(fUpdateOptions);
+			fDelegate.setParseUpFront();
 			
 			if (fDelegate != null) {
 				fDelegate.run(monitor);
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/indexer/StandaloneIndexerTask.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/indexer/StandaloneIndexerTask.java
index f5dab80..b7f3023 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/indexer/StandaloneIndexerTask.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/indexer/StandaloneIndexerTask.java
@@ -21,6 +21,7 @@
 import org.eclipse.cdt.core.model.AbstractLanguage;
 import org.eclipse.cdt.core.model.ILanguage;
 import org.eclipse.cdt.core.parser.IParserLogService;
+import org.eclipse.cdt.core.parser.IScannerInfo;
 import org.eclipse.cdt.internal.core.index.IWritableIndex;
 import org.eclipse.cdt.internal.core.pdom.AbstractIndexerTask;
 import org.eclipse.cdt.internal.core.pdom.IndexerProgress;
@@ -224,6 +225,20 @@
 		getLogService().traceLog(s.getMessage());
 	}
 
+	@SuppressWarnings("deprecation")
+	@Override
+	protected IScannerInfo createDefaultScannerConfig(int linkageID) {
+		IStandaloneScannerInfoProvider provider = fIndexer.getScannerInfoProvider();
+		if(provider != null)
+			return provider.getDefaultScannerInformation(linkageID);
+		
+		IScannerInfo scannerInfo = fIndexer.getScannerInfo();
+		if(scannerInfo != null)
+			return scannerInfo;
+		
+		return super.createDefaultScannerConfig(linkageID);
+	}
+	
 	/* (non-Javadoc)
 	 * @see org.eclipse.cdt.internal.core.pdom.AbstractIndexerTask#getLinkagesToParse()
 	 */