org.eclipse.cdt.managedbuilder.internal.core
Class BooleanExpressionApplicabilityCalculator

java.lang.Object
  extended by org.eclipse.cdt.managedbuilder.internal.core.BooleanExpressionApplicabilityCalculator
All Implemented Interfaces:
IOptionApplicability

public class BooleanExpressionApplicabilityCalculator
extends java.lang.Object
implements IOptionApplicability


Constructor Summary
BooleanExpressionApplicabilityCalculator(IManagedConfigElement optionElement)
           
BooleanExpressionApplicabilityCalculator(IManagedConfigElement[] enablementElements)
           
 
Method Summary
 boolean adjustConfiguration(IConfiguration cfg, boolean extensionAdjustment)
           
 boolean adjustOption(IResourceInfo rcInfo, IHoldsOptions holder, IOption option, boolean extensionAdjustment)
           
 boolean adjustTool(IResourceInfo info, ITool tool, boolean extensionAdjustment)
           
 boolean adjustToolChain(IFolderInfo info, IToolChain tChain, boolean extensionAdjustment)
           
 boolean evaluate(IResourceInfo rcInfo, IHoldsOptions holder, IOption option, int flags)
           
 java.lang.String[] getReferencedPropertyIds()
           
 java.lang.String[] getReferencedValueIds(java.lang.String propertyId)
           
 boolean isInputTypeEnabled(ITool tool, IInputType type)
           
 boolean isOptionEnabled(IBuildObject configuration, IHoldsOptions holder, IOption option)
          Whenever the value of an option changes in the GUI, this method is queried on all other visible options for the same category.
 boolean isOptionUsedInCommandLine(IBuildObject configuration, IHoldsOptions holder, IOption option)
          This method is queried whenever a makefile or makefile fragment is generated which uses this option, and in the C/C++ Build property pages when displaying the current command line.
 boolean isOptionVisible(IBuildObject configuration, IHoldsOptions holder, IOption option)
          This method is queried whenever a new option category is displayed.
 boolean isOutputTypeEnabled(ITool tool, IOutputType type)
           
 boolean isToolUsedInCommandLine(IResourceInfo rcInfo, ITool tool)
           
static IResourceInfo rcInfoFromConfiguration(IBuildObject configuration)
           
 boolean referesProperty(java.lang.String id)
           
 boolean referesPropertyValue(java.lang.String propertyId, java.lang.String valueId)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BooleanExpressionApplicabilityCalculator

public BooleanExpressionApplicabilityCalculator(IManagedConfigElement optionElement)

BooleanExpressionApplicabilityCalculator

public BooleanExpressionApplicabilityCalculator(IManagedConfigElement[] enablementElements)
Method Detail

isOptionVisible

public boolean isOptionVisible(IBuildObject configuration,
                               IHoldsOptions holder,
                               IOption option)
Description copied from interface: IOptionApplicability
This method is queried whenever a new option category is displayed.

Specified by:
isOptionVisible in interface IOptionApplicability
Parameters:
configuration - build configuration of option (may be IConfiguration or IResourceConfiguration)
holder - contains the holder of the option
option - the option itself
Returns:
true if this option should be visible in the build options page, false otherwise

rcInfoFromConfiguration

public static IResourceInfo rcInfoFromConfiguration(IBuildObject configuration)

isInputTypeEnabled

public boolean isInputTypeEnabled(ITool tool,
                                  IInputType type)

isOutputTypeEnabled

public boolean isOutputTypeEnabled(ITool tool,
                                   IOutputType type)

isToolUsedInCommandLine

public boolean isToolUsedInCommandLine(IResourceInfo rcInfo,
                                       ITool tool)

isOptionEnabled

public boolean isOptionEnabled(IBuildObject configuration,
                               IHoldsOptions holder,
                               IOption option)
Description copied from interface: IOptionApplicability
Whenever the value of an option changes in the GUI, this method is queried on all other visible options for the same category. Note that this occurs when the GUI changes - the user may opt to cancel these changes.

Specified by:
isOptionEnabled in interface IOptionApplicability
Parameters:
configuration - build configuration of option (may be IConfiguration or IResourceConfiguration)
holder - contains the holder of the option
option - the option itself
Returns:
true if this option should be enabled in the build options page, or false if it should be disabled (grayed out)

isOptionUsedInCommandLine

public boolean isOptionUsedInCommandLine(IBuildObject configuration,
                                         IHoldsOptions holder,
                                         IOption option)
Description copied from interface: IOptionApplicability
This method is queried whenever a makefile or makefile fragment is generated which uses this option, and in the C/C++ Build property pages when displaying the current command line.

Specified by:
isOptionUsedInCommandLine in interface IOptionApplicability
Parameters:
configuration - build configuration of option (may be IConfiguration or IResourceConfiguration)
holder - contains the holder of the option
option - the option itself
Returns:
true if this option is to be used in command line generation, false otherwise

evaluate

public boolean evaluate(IResourceInfo rcInfo,
                        IHoldsOptions holder,
                        IOption option,
                        int flags)

adjustOption

public boolean adjustOption(IResourceInfo rcInfo,
                            IHoldsOptions holder,
                            IOption option,
                            boolean extensionAdjustment)

adjustToolChain

public boolean adjustToolChain(IFolderInfo info,
                               IToolChain tChain,
                               boolean extensionAdjustment)

adjustTool

public boolean adjustTool(IResourceInfo info,
                          ITool tool,
                          boolean extensionAdjustment)

adjustConfiguration

public boolean adjustConfiguration(IConfiguration cfg,
                                   boolean extensionAdjustment)

referesProperty

public boolean referesProperty(java.lang.String id)

referesPropertyValue

public boolean referesPropertyValue(java.lang.String propertyId,
                                    java.lang.String valueId)

getReferencedPropertyIds

public java.lang.String[] getReferencedPropertyIds()

getReferencedValueIds

public java.lang.String[] getReferencedValueIds(java.lang.String propertyId)