org.eclipse.cdt.internal.core.envvar
Class EnvironmentVariableManager

java.lang.Object
  extended by org.eclipse.cdt.internal.core.envvar.EnvironmentVariableManager
All Implemented Interfaces:
IEnvironmentVariableManager

public class EnvironmentVariableManager
extends java.lang.Object
implements IEnvironmentVariableManager

This class implements the IEnvironmentVariableProvider interface and provides all build environment funvtionality to the MBS

Since:
3.0

Nested Class Summary
 class EnvironmentVariableManager.EnvVarVariableSubstitutor
           
 
Field Summary
static EclipseEnvironmentSupplier fEclipseSupplier
           
static BuildSustemEnvironmentSupplier fExternalSupplier
           
static UserDefinedEnvironmentSupplier fUserSupplier
           
 
Method Summary
 IEnvironmentVariable calculateResolvedVariable(EnvVarDescriptor des, IEnvironmentContextInfo info)
           
 IEnvironmentVariable calculateResolvedVariable(EnvVarDescriptor des, org.eclipse.cdt.utils.cdtvariables.IVariableSubstitutor sub)
           
 boolean checkParentContextRelation(IEnvironmentContextInfo child, IEnvironmentContextInfo parent)
           
static IEnvironmentContextInfo[] getAllContextInfos(IEnvironmentContextInfo contextInfo)
           
 IEnvironmentContextInfo getContextInfo(java.lang.Object level)
           
 IContributedEnvironment getContributedEnvironment()
           
static EnvironmentVariableManager getDefault()
           
 java.lang.String getDefaultDelimiter()
           
 ICoreVariableContextInfo getMacroContextInfoForContext(java.lang.Object context)
           
 ICoreEnvironmentVariableSupplier[] getSuppliers(java.lang.Object level)
           
 IEnvironmentVariable getVariable(java.lang.String variableName, org.eclipse.cdt.core.settings.model.ICConfigurationDescription cfg, boolean resolveMacros)
           
static EnvVarDescriptor getVariable(java.lang.String variableName, IEnvironmentContextInfo contextInfo, boolean includeParentLevels)
           
 IEnvironmentVariable[] getVariables(org.eclipse.cdt.core.settings.model.ICConfigurationDescription cfg, boolean resolveMacros)
          if environment variable names are case insensitive in the current OS, the environment variable provider will remove the duplicates of the variables if their names differ only by case
static EnvVarCollector getVariables(IEnvironmentContextInfo contextInfo, boolean includeParentLevels)
           
 org.eclipse.cdt.utils.cdtvariables.IVariableSubstitutor getVariableSubstitutor(org.eclipse.cdt.utils.cdtvariables.IVariableContextInfo info, java.lang.String inexistentMacroValue, java.lang.String listDelimiter)
           
 boolean isVariableCaseSensitive()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

fUserSupplier

public static final UserDefinedEnvironmentSupplier fUserSupplier

fExternalSupplier

public static final BuildSustemEnvironmentSupplier fExternalSupplier

fEclipseSupplier

public static final EclipseEnvironmentSupplier fEclipseSupplier
Method Detail

getDefault

public static EnvironmentVariableManager getDefault()

getVariable

public static EnvVarDescriptor getVariable(java.lang.String variableName,
                                           IEnvironmentContextInfo contextInfo,
                                           boolean includeParentLevels)

getVariable

public IEnvironmentVariable getVariable(java.lang.String variableName,
                                        org.eclipse.cdt.core.settings.model.ICConfigurationDescription cfg,
                                        boolean resolveMacros)
Specified by:
getVariable in interface IEnvironmentVariableManager
Returns:
the reference to the IBuildEnvironmentVariable interface representing the variable of a given name

getContextInfo

public IEnvironmentContextInfo getContextInfo(java.lang.Object level)

getVariables

public static EnvVarCollector getVariables(IEnvironmentContextInfo contextInfo,
                                           boolean includeParentLevels)

getVariables

public IEnvironmentVariable[] getVariables(org.eclipse.cdt.core.settings.model.ICConfigurationDescription cfg,
                                           boolean resolveMacros)
Description copied from interface: IEnvironmentVariableManager
if environment variable names are case insensitive in the current OS, the environment variable provider will remove the duplicates of the variables if their names differ only by case

Specified by:
getVariables in interface IEnvironmentVariableManager
Returns:
the array of IBuildEnvironmentVariable that represents the environment variables

getAllContextInfos

public static IEnvironmentContextInfo[] getAllContextInfos(IEnvironmentContextInfo contextInfo)

getDefaultDelimiter

public java.lang.String getDefaultDelimiter()
Specified by:
getDefaultDelimiter in interface IEnvironmentVariableManager
Returns:
the String representing default system delimiter. That is the ":" for Unix-like systems and the ";" for Win32 systems. This method will be used by the tool-integrator provided variable supplier e.g. in order to concatenate the list of paths into the environment variable, etc.

isVariableCaseSensitive

public boolean isVariableCaseSensitive()
Specified by:
isVariableCaseSensitive in interface IEnvironmentVariableManager
Returns:
true if the OS supports case sensitive variables (Unix-like systems) or false if it does not (Win32 systems)

getSuppliers

public ICoreEnvironmentVariableSupplier[] getSuppliers(java.lang.Object level)

checkParentContextRelation

public boolean checkParentContextRelation(IEnvironmentContextInfo child,
                                          IEnvironmentContextInfo parent)

calculateResolvedVariable

public IEnvironmentVariable calculateResolvedVariable(EnvVarDescriptor des,
                                                      IEnvironmentContextInfo info)

calculateResolvedVariable

public IEnvironmentVariable calculateResolvedVariable(EnvVarDescriptor des,
                                                      org.eclipse.cdt.utils.cdtvariables.IVariableSubstitutor sub)

getMacroContextInfoForContext

public ICoreVariableContextInfo getMacroContextInfoForContext(java.lang.Object context)

getVariableSubstitutor

public org.eclipse.cdt.utils.cdtvariables.IVariableSubstitutor getVariableSubstitutor(org.eclipse.cdt.utils.cdtvariables.IVariableContextInfo info,
                                                                                      java.lang.String inexistentMacroValue,
                                                                                      java.lang.String listDelimiter)

getContributedEnvironment

public IContributedEnvironment getContributedEnvironment()
Specified by:
getContributedEnvironment in interface IEnvironmentVariableManager