org.eclipse.cdt.make.internal.core.scannerconfig2
Class PerProjectSICollector

java.lang.Object
  extended by org.eclipse.cdt.make.internal.core.scannerconfig2.PerProjectSICollector
All Implemented Interfaces:
IScannerInfoCollector, IScannerInfoCollector2, IScannerInfoCollector3, IScannerInfoCollectorCleaner
Direct Known Subclasses:
DefaultGCCScannerInfoCollector

public class PerProjectSICollector
extends java.lang.Object
implements IScannerInfoCollector3, IScannerInfoCollectorCleaner

New per project scanner info collector

Since:
3.0
Author:
vhirsl

Field Summary
static java.lang.String COLLECTOR_ID
           
 
Constructor Summary
PerProjectSICollector()
           
 
Method Summary
static void calculateCompilerBuiltins(org.eclipse.core.resources.IProject project)
          Static method to return compiler built-in scanner info.
 void contributeToScannerConfig(java.lang.Object resource, java.util.Map scannerInfo)
          Contribute to resource's scanner configuration
 IDiscoveredPathManager.IDiscoveredPathInfo createPathInfoObject()
          Create and return new IDiscoveredPathInfo that can hopefully serialize discovered scanner config to a file
 void deleteAll(org.eclipse.core.resources.IResource resource)
          Delete all discovered scanner info for the resource
 void deleteAllPaths(org.eclipse.core.resources.IResource resource)
          Delete all discovered paths for the resource
 void deleteAllSymbols(org.eclipse.core.resources.IResource resource)
          Delete all discovered symbols for the resource
 void deletePath(org.eclipse.core.resources.IResource resource, java.lang.String path)
          Delete a specific include path
 void deleteSymbol(org.eclipse.core.resources.IResource resource, java.lang.String symbol)
          Delete a specific symbol definition
 void deserialize(org.w3c.dom.Element root)
           
 java.util.List getCollectedScannerInfo(java.lang.Object resource, ScannerInfoTypes type)
          Returns specific piece of discovered scanner info for a resource discovered during the last collection cycle
 java.util.Map getDefinedSymbols()
           
 java.util.List getIncludePaths()
           
 void serialize(org.w3c.dom.Element root)
           
 void setInfoContext(InfoContext context)
           
 void setProject(org.eclipse.core.resources.IProject project)
           
 void updateScannerConfiguration(org.eclipse.core.runtime.IProgressMonitor monitor)
          Relegate discovered scanner configuration to a scanner info provider
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

COLLECTOR_ID

public static final java.lang.String COLLECTOR_ID
Constructor Detail

PerProjectSICollector

public PerProjectSICollector()
Method Detail

setProject

public void setProject(org.eclipse.core.resources.IProject project)
Specified by:
setProject in interface IScannerInfoCollector2

contributeToScannerConfig

public void contributeToScannerConfig(java.lang.Object resource,
                                      java.util.Map scannerInfo)
Description copied from interface: IScannerInfoCollector
Contribute to resource's scanner configuration

Specified by:
contributeToScannerConfig in interface IScannerInfoCollector
Parameters:
resource - - if used from within Eclipse it is expected that resource is a member of org.eclipse.core.resources.IResource hierarchy. If used outside of Eclipse then resource is expected to be a java.io.File type.
scannerInfo - - a map of key - list pairs, where key is the type of extra info i.e. target specific options or imacros commands,...

updateScannerConfiguration

public void updateScannerConfiguration(org.eclipse.core.runtime.IProgressMonitor monitor)
                                throws org.eclipse.core.runtime.CoreException
Description copied from interface: IScannerInfoCollector2
Relegate discovered scanner configuration to a scanner info provider

Specified by:
updateScannerConfiguration in interface IScannerInfoCollector2
Throws:
org.eclipse.core.runtime.CoreException

getCollectedScannerInfo

public java.util.List getCollectedScannerInfo(java.lang.Object resource,
                                              ScannerInfoTypes type)
Description copied from interface: IScannerInfoCollector
Returns specific piece of discovered scanner info for a resource discovered during the last collection cycle

Specified by:
getCollectedScannerInfo in interface IScannerInfoCollector
Returns:

getDefinedSymbols

public java.util.Map getDefinedSymbols()

getIncludePaths

public java.util.List getIncludePaths()

serialize

public void serialize(org.w3c.dom.Element root)

deserialize

public void deserialize(org.w3c.dom.Element root)

deleteAllPaths

public void deleteAllPaths(org.eclipse.core.resources.IResource resource)
Description copied from interface: IScannerInfoCollectorCleaner
Delete all discovered paths for the resource

Specified by:
deleteAllPaths in interface IScannerInfoCollectorCleaner

deleteAllSymbols

public void deleteAllSymbols(org.eclipse.core.resources.IResource resource)
Description copied from interface: IScannerInfoCollectorCleaner
Delete all discovered symbols for the resource

Specified by:
deleteAllSymbols in interface IScannerInfoCollectorCleaner

deletePath

public void deletePath(org.eclipse.core.resources.IResource resource,
                       java.lang.String path)
Description copied from interface: IScannerInfoCollectorCleaner
Delete a specific include path

Specified by:
deletePath in interface IScannerInfoCollectorCleaner

deleteSymbol

public void deleteSymbol(org.eclipse.core.resources.IResource resource,
                         java.lang.String symbol)
Description copied from interface: IScannerInfoCollectorCleaner
Delete a specific symbol definition

Specified by:
deleteSymbol in interface IScannerInfoCollectorCleaner

deleteAll

public void deleteAll(org.eclipse.core.resources.IResource resource)
Description copied from interface: IScannerInfoCollectorCleaner
Delete all discovered scanner info for the resource

Specified by:
deleteAll in interface IScannerInfoCollectorCleaner

createPathInfoObject

public IDiscoveredPathManager.IDiscoveredPathInfo createPathInfoObject()
Description copied from interface: IScannerInfoCollector2
Create and return new IDiscoveredPathInfo that can hopefully serialize discovered scanner config to a file

Specified by:
createPathInfoObject in interface IScannerInfoCollector2
Returns:
pathInfo

calculateCompilerBuiltins

public static void calculateCompilerBuiltins(org.eclipse.core.resources.IProject project)
                                      throws org.eclipse.cdt.core.model.CModelException
Static method to return compiler built-in scanner info. Preconditions: resource has to be contained by a project that has following natures: C nature, CC nature (for C++ projects), Make nature and ScannerConfig nature

Parameters:
project -
Throws:
org.eclipse.cdt.core.model.CModelException

setInfoContext

public void setInfoContext(InfoContext context)
Specified by:
setInfoContext in interface IScannerInfoCollector3