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

java.lang.Object
  extended by org.eclipse.cdt.make.internal.core.scannerconfig2.ScannerConfigProfileManager

public class ScannerConfigProfileManager
extends java.lang.Object

Manages profiles per project

Author:
vhirsl

Field Summary
static java.lang.String DEFAULT_SI_PROFILE_ID
           
static java.lang.String NULL_PROFILE_ID
           
static java.lang.String PER_PROJECT_PROFILE_ID
           
static java.lang.String SI_PROFILE_SIMPLE_ID
           
 
Method Summary
 void addProfile(org.eclipse.core.resources.IProject project, InfoContext context, ScannerConfigProfile profile)
           
 void addProfile(org.eclipse.core.resources.IProject project, ScannerConfigProfile profile)
          For projects that do not have profile id specified in .project file.
static IScannerConfigBuilderInfo2 createScannerConfigBuildInfo2(org.eclipse.core.resources.IProject project)
          Use stored selectedProfile
static IScannerConfigBuilderInfo2 createScannerConfigBuildInfo2(org.eclipse.core.resources.IProject project, java.lang.String profileId)
          Set selectedProfile to profileId
static IScannerConfigBuilderInfo2 createScannerConfigBuildInfo2(org.eclipse.core.runtime.Preferences prefs, boolean useDefaults)
          Use stored selectedProfile
static IScannerConfigBuilderInfo2 createScannerConfigBuildInfo2(org.eclipse.core.runtime.Preferences prefs, java.lang.String profileId, boolean useDefaults)
          Set selectedProfile to profileId
static IScannerConfigBuilderInfo2Set createScannerConfigBuildInfo2Set(org.eclipse.core.resources.IProject project)
           
static IScannerConfigBuilderInfo2Set createScannerConfigBuildInfo2Set(org.eclipse.core.resources.IProject project, java.lang.String profileId)
           
static IScannerConfigBuilderInfo2Set createScannerConfigBuildInfo2Set(org.eclipse.core.runtime.Preferences prefs, boolean useDefaults)
           
static IScannerConfigBuilderInfo2Set createScannerConfigBuildInfo2Set(org.eclipse.core.runtime.Preferences prefs, java.lang.String profileId, boolean useDefaults)
           
static java.lang.String getDefaultSIProfileId()
           
static ScannerConfigProfileManager getInstance()
           
 java.util.List getProfileIds()
           
 java.util.List getProfileIds(InfoContext context)
          returns the list od profile IDs supported for this context
 ScannerConfigProfile getSCProfileConfiguration(java.lang.String profileId)
           
 SCProfileInstance getSCProfileInstance(org.eclipse.core.resources.IProject project, InfoContext context, java.lang.String profileId)
           
 SCProfileInstance getSCProfileInstance(org.eclipse.core.resources.IProject project, java.lang.String profileId)
           
 SCProfileInstance getSCProfileInstance(java.lang.String profileId)
           
 void handleProjectRemoved(org.eclipse.core.resources.IProject project)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SI_PROFILE_SIMPLE_ID

public static final java.lang.String SI_PROFILE_SIMPLE_ID
See Also:
Constant Field Values

PER_PROJECT_PROFILE_ID

public static final java.lang.String PER_PROJECT_PROFILE_ID

DEFAULT_SI_PROFILE_ID

public static final java.lang.String DEFAULT_SI_PROFILE_ID

NULL_PROFILE_ID

public static final java.lang.String NULL_PROFILE_ID
See Also:
Constant Field Values
Method Detail

getInstance

public static ScannerConfigProfileManager getInstance()

addProfile

public void addProfile(org.eclipse.core.resources.IProject project,
                       ScannerConfigProfile profile)
For projects that do not have profile id specified in .project file. For example managed projects.

Parameters:
project -
profile -

addProfile

public void addProfile(org.eclipse.core.resources.IProject project,
                       InfoContext context,
                       ScannerConfigProfile profile)

handleProjectRemoved

public void handleProjectRemoved(org.eclipse.core.resources.IProject project)

getSCProfileInstance

public SCProfileInstance getSCProfileInstance(org.eclipse.core.resources.IProject project,
                                              java.lang.String profileId)
Parameters:
project -
profileId - - if null, get the one associated with the project
Returns:
Returns the scannerConfigProfile instance for a project.

getSCProfileInstance

public SCProfileInstance getSCProfileInstance(org.eclipse.core.resources.IProject project,
                                              InfoContext context,
                                              java.lang.String profileId)

getSCProfileInstance

public SCProfileInstance getSCProfileInstance(java.lang.String profileId)
Parameters:
profileId -
Returns:

getSCProfileConfiguration

public ScannerConfigProfile getSCProfileConfiguration(java.lang.String profileId)
Parameters:
profileId - - if null, get the default one
Returns:
Returns the scannerConfigProfile for a project.

getProfileIds

public java.util.List getProfileIds()
Returns:

getProfileIds

public java.util.List getProfileIds(InfoContext context)
returns the list od profile IDs supported for this context

Parameters:
context -
Returns:

getDefaultSIProfileId

public static java.lang.String getDefaultSIProfileId()
Returns:
default profile id

createScannerConfigBuildInfo2

public static IScannerConfigBuilderInfo2 createScannerConfigBuildInfo2(org.eclipse.core.resources.IProject project,
                                                                       java.lang.String profileId)
                                                                throws org.eclipse.core.runtime.CoreException
Set selectedProfile to profileId

Parameters:
project -
profileId -
Returns:
Throws:
org.eclipse.core.runtime.CoreException

createScannerConfigBuildInfo2

public static IScannerConfigBuilderInfo2 createScannerConfigBuildInfo2(org.eclipse.core.resources.IProject project)
                                                                throws org.eclipse.core.runtime.CoreException
Use stored selectedProfile

Parameters:
project -
Returns:
Throws:
org.eclipse.core.runtime.CoreException

createScannerConfigBuildInfo2Set

public static IScannerConfigBuilderInfo2Set createScannerConfigBuildInfo2Set(org.eclipse.core.resources.IProject project)
                                                                      throws org.eclipse.core.runtime.CoreException
Throws:
org.eclipse.core.runtime.CoreException

createScannerConfigBuildInfo2Set

public static IScannerConfigBuilderInfo2Set createScannerConfigBuildInfo2Set(org.eclipse.core.resources.IProject project,
                                                                             java.lang.String profileId)
                                                                      throws org.eclipse.core.runtime.CoreException
Throws:
org.eclipse.core.runtime.CoreException

createScannerConfigBuildInfo2Set

public static IScannerConfigBuilderInfo2Set createScannerConfigBuildInfo2Set(org.eclipse.core.runtime.Preferences prefs,
                                                                             boolean useDefaults)
                                                                      throws org.eclipse.core.runtime.CoreException
Throws:
org.eclipse.core.runtime.CoreException

createScannerConfigBuildInfo2Set

public static IScannerConfigBuilderInfo2Set createScannerConfigBuildInfo2Set(org.eclipse.core.runtime.Preferences prefs,
                                                                             java.lang.String profileId,
                                                                             boolean useDefaults)
                                                                      throws org.eclipse.core.runtime.CoreException
Throws:
org.eclipse.core.runtime.CoreException

createScannerConfigBuildInfo2

public static IScannerConfigBuilderInfo2 createScannerConfigBuildInfo2(org.eclipse.core.runtime.Preferences prefs,
                                                                       java.lang.String profileId,
                                                                       boolean useDefaults)
Set selectedProfile to profileId

Parameters:
prefs -
profileId -
useDefaults -
Returns:

createScannerConfigBuildInfo2

public static IScannerConfigBuilderInfo2 createScannerConfigBuildInfo2(org.eclipse.core.runtime.Preferences prefs,
                                                                       boolean useDefaults)
Use stored selectedProfile

Parameters:
prefs -
useDefaults -
Returns: