Interface ICBuildConfiguration

  • All Superinterfaces:
    org.eclipse.core.runtime.IAdaptable, IScannerInfoProvider
    All Known Implementing Classes:
    CBuildConfiguration, ErrorBuildConfiguration, StandardBuildConfiguration

    public interface ICBuildConfiguration
    extends org.eclipse.core.runtime.IAdaptable, IScannerInfoProvider
    This is the root interface for "new style" CDT build configurations. Adapting IBuildConfiguration to this interface will get you one of these. From here, adapt to the specific interface that you need and the configuration will provide one.
    Since:
    6.0
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static java.lang.String DEFAULT_NAME
      CDT doesn't like that the Platform default config name is an empty string.
      static java.lang.String TOOLCHAIN_ID  
      static java.lang.String TOOLCHAIN_TYPE  
    • Method Summary

      All Methods Instance Methods Abstract Methods Default Methods 
      Modifier and Type Method Description
      org.eclipse.core.resources.IProject[] build​(int kind, java.util.Map<java.lang.String,​java.lang.String> args, IConsole console, org.eclipse.core.runtime.IProgressMonitor monitor)
      Perform the build.
      void clean​(IConsole console, org.eclipse.core.runtime.IProgressMonitor monitor)
      Perform clean.
      java.lang.String getBinaryParserId()
      Ids for the Binary Parsers to use when checking whether a file is a binary that can be launched.
      org.eclipse.core.resources.IBuildConfiguration getBuildConfiguration()
      Returns the resources build configuration that this CDT build configuration is associated with.
      default IBinary[] getBuildOutput()
      The binaries produced by the build.
      default java.util.Map<java.lang.String,​java.lang.String> getDefaultProperties()
      Returns the default values for the properties.
      default java.lang.String getLaunchMode()
      Return the launch mode associated with this build configuration.
      default java.util.Map<java.lang.String,​java.lang.String> getProperties()
      Return the properties for this build configuration.
      default java.lang.String getProperty​(java.lang.String name)
      Return the named property.
      IToolChain getToolChain()
      Build Configurations are configurations for a given toolchain.
      IEnvironmentVariable getVariable​(java.lang.String name)
      Return a build environment variable with a given name.
      IEnvironmentVariable[] getVariables()
      Return all of the build environment variables for this configuration.
      default void removeProperty​(java.lang.String name)
      Remove the named property.
      default void setBuildEnvironment​(java.util.Map<java.lang.String,​java.lang.String> env)
      Set the environment for the builds.
      default boolean setProperties​(java.util.Map<java.lang.String,​java.lang.String> properties)
      Set the properties for this build configuration.
      default void setProperty​(java.lang.String name, java.lang.String value)
      Set a property to the given value.
      default boolean supportsProperties​(java.util.Map<java.lang.String,​java.lang.String> properties)
      Returns whether this build configuration supports the given build properties.
      • Methods inherited from interface org.eclipse.core.runtime.IAdaptable

        getAdapter
    • Field Detail

      • DEFAULT_NAME

        static final java.lang.String DEFAULT_NAME
        CDT doesn't like that the Platform default config name is an empty string. It needs a real name for the name of the build directory, for example.
        See Also:
        Constant Field Values
      • TOOLCHAIN_TYPE

        static final java.lang.String TOOLCHAIN_TYPE
        Since:
        6.4
        See Also:
        Constant Field Values
    • Method Detail

      • getBuildConfiguration

        org.eclipse.core.resources.IBuildConfiguration getBuildConfiguration()
                                                                      throws org.eclipse.core.runtime.CoreException
        Returns the resources build configuration that this CDT build configuration is associated with.
        Returns:
        resources build configuration
        Throws:
        org.eclipse.core.runtime.CoreException
      • getToolChain

        IToolChain getToolChain()
                         throws org.eclipse.core.runtime.CoreException
        Build Configurations are configurations for a given toolchain.
        Returns:
        the toolchain for this build configuration
        Throws:
        org.eclipse.core.runtime.CoreException
      • getLaunchMode

        default java.lang.String getLaunchMode()
        Return the launch mode associated with this build configuration.
        Since:
        6.4
      • getBinaryParserId

        java.lang.String getBinaryParserId()
                                    throws org.eclipse.core.runtime.CoreException
        Ids for the Binary Parsers to use when checking whether a file is a binary that can be launched.
        Returns:
        binary parser ids
        Throws:
        org.eclipse.core.runtime.CoreException
      • getVariable

        IEnvironmentVariable getVariable​(java.lang.String name)
                                  throws org.eclipse.core.runtime.CoreException
        Return a build environment variable with a given name.
        Parameters:
        name - build environment variable name
        Returns:
        value of the build environment variable.
        Throws:
        org.eclipse.core.runtime.CoreException
      • getVariables

        IEnvironmentVariable[] getVariables()
                                     throws org.eclipse.core.runtime.CoreException
        Return all of the build environment variables for this configuration.
        Returns:
        environment variables
        Throws:
        org.eclipse.core.runtime.CoreException
      • build

        org.eclipse.core.resources.IProject[] build​(int kind,
                                                    java.util.Map<java.lang.String,​java.lang.String> args,
                                                    IConsole console,
                                                    org.eclipse.core.runtime.IProgressMonitor monitor)
                                             throws org.eclipse.core.runtime.CoreException
        Perform the build.
        Parameters:
        kind - build type
        args - build arguments
        console - console to show build output
        monitor - progress monitor
        Returns:
        the list of projects for which this builder would like deltas the next time it is run or null if none
        Throws:
        org.eclipse.core.runtime.CoreException
      • clean

        void clean​(IConsole console,
                   org.eclipse.core.runtime.IProgressMonitor monitor)
            throws org.eclipse.core.runtime.CoreException
        Perform clean.
        Parameters:
        console - console to show clean output
        monitor - progress monitor
        Throws:
        org.eclipse.core.runtime.CoreException
      • getBuildOutput

        default IBinary[] getBuildOutput()
                                  throws org.eclipse.core.runtime.CoreException
        The binaries produced by the build.
        Returns:
        binaries produced by the build.
        Throws:
        org.eclipse.core.runtime.CoreException
        Since:
        6.1
      • setBuildEnvironment

        default void setBuildEnvironment​(java.util.Map<java.lang.String,​java.lang.String> env)
        Set the environment for the builds. Generally the environment from a ProcessBuilder would be passed here.
        Parameters:
        env - build environment
        Since:
        6.1
      • setProperties

        default boolean setProperties​(java.util.Map<java.lang.String,​java.lang.String> properties)
        Set the properties for this build configuration. These will often come from launch configurations which have build settings as attributes.
        Parameters:
        properties - build properties
        Returns:
        whether the properties have changed
        Since:
        6.2
      • getProperties

        default java.util.Map<java.lang.String,​java.lang.String> getProperties()
        Return the properties for this build configuration.
        Returns:
        default properties
        Since:
        6.2
      • getDefaultProperties

        default java.util.Map<java.lang.String,​java.lang.String> getDefaultProperties()
        Returns the default values for the properties.
        Since:
        6.2
      • setProperty

        default void setProperty​(java.lang.String name,
                                 java.lang.String value)
        Set a property to the given value.
        Parameters:
        name - the name of the property
        value - the new value for the property
        Since:
        6.4
      • removeProperty

        default void removeProperty​(java.lang.String name)
        Remove the named property.
        Parameters:
        name - name of the property
        Since:
        6.4
      • getProperty

        default java.lang.String getProperty​(java.lang.String name)
        Return the named property.
        Parameters:
        name - the name of the property
        Since:
        6.4
      • supportsProperties

        default boolean supportsProperties​(java.util.Map<java.lang.String,​java.lang.String> properties)
        Returns whether this build configuration supports the given build properties.
        Parameters:
        properties - build properties
        Returns:
        whether this build configuration supports those properties
        Since:
        6.2