Package org.eclipse.cdt.core.build

# Interface ICBuildConfigurationProvider

public interface ICBuildConfigurationProvider
A CBuildConfigurationProvider provides Core Build configurations.

Since:
  6.0

## Method Summary

Modifier and Type
Method
Description
`ICBuildConfiguration`
`createCBuildConfiguration(org.eclipse.core.resources.IProject project, IToolChain toolChain, String launchMode, ILaunchTarget launchTarget, org.eclipse.core.runtime.IProgressMonitor monitor)`
Create a new Platform Build/Core Build configuration combination.
`default String`
`getCBuildConfigName(org.eclipse.core.resources.IProject project, String toolName, IToolChain toolchain, String launchMode, ILaunchTarget launchTarget)`
Name used when creating a Core Build configuration, used by `createCBuildConfiguration(org.eclipse.core.resources.IProject, org.eclipse.cdt.core.build.IToolChain, java.lang.String, org.eclipse.launchbar.core.target.ILaunchTarget, org.eclipse.core.runtime.IProgressMonitor)`.
`ICBuildConfiguration`
`getCBuildConfiguration(org.eclipse.core.resources.IBuildConfiguration buildConfig, String cBuildConfigName)`
Returns the Core Build configuration that owns this Platform Build configuration.
`String`
`getId()`
Return the id of this provider
`default Collection<IToolChain>`
`getSupportedToolchains(Collection<IToolChain> toolchains)`
Return a collection of supported toolchains for build configurations of this type.

## Method Details

### getId

String getId()
Return the id of this provider

Returns:
  provider id

### getCBuildConfiguration

ICBuildConfiguration getCBuildConfiguration(org.eclipse.core.resources.IBuildConfiguration buildConfig, String cBuildConfigName) throws org.eclipse.core.runtime.CoreException
Returns the Core Build configuration that owns this Platform Build configuration.

Parameters:
  `buildConfig` - Platform Build Configuration. Must not be null. Configs with the name `IBuildConfiguration.DEFAULT_CONFIG_NAME` are ignored.
  `cBuildConfigName` - Name to give the ICBuildConfiguration. Must not be null.
Returns:
  a Core Build configuration or null if buildConfig has name `IBuildConfiguration.DEFAULT_CONFIG_NAME`.
Throws:
  `org.eclipse.core.runtime.CoreException` - if this method fails. Reasons include:
  - Toolchain is missing,
  - Launch mode missing,
  - Launch Target is missing.

### createCBuildConfiguration

ICBuildConfiguration createCBuildConfiguration(org.eclipse.core.resources.IProject project, IToolChain toolChain, String launchMode, ILaunchTarget launchTarget, org.eclipse.core.runtime.IProgressMonitor monitor) throws org.eclipse.core.runtime.CoreException
Create a new Platform Build/Core Build configuration combination.

Parameters:
  `project` - Project to associate this Core Build configuration to. Must not be null.
  `toolChain` - Toolchain to associate with this ICBuildConfiguration. Must not be null.
  `launchMode` - Launch mode (eg "debug") to associate with this ICBuildConfiguration. Must not be null.
  `launchTarget` - Launch target to associate with this ICBuildConfiguration. Must not be null.
  `monitor` -
Returns:
  a Core Build configuration.
Throws:
  `org.eclipse.core.runtime.CoreException` - if this method fails. Reasons include:
  - This project does not exist.
  - This project is not open.
  - The reasons given in `IProject.setDescription(org.eclipse.core.resources.IProjectDescription, IProgressMonitor)`.
Since:
  9.0

### getCBuildConfigName

default String getCBuildConfigName(org.eclipse.core.resources.IProject project, String toolName, IToolChain toolchain, String launchMode, ILaunchTarget launchTarget)
Name used when creating a Core Build configuration, used by `createCBuildConfiguration(org.eclipse.core.resources.IProject, org.eclipse.cdt.core.build.IToolChain, java.lang.String, org.eclipse.launchbar.core.target.ILaunchTarget, org.eclipse.core.runtime.IProgressMonitor)`. This is the name used when the build output directory is created.

Parameters:
  `project` - Project associated with this ICBuildConfiguration. Must not be null.
  `toolName` - Name of the build tool (eg: "cmake", "make"). Must not be null.
  `toolchain` - Toolchain associated with this ICBuildConfiguration. Must not be null.
  `launchMode` - Launch mode (eg "debug") associated with this ICBuildConfiguration. Must not be null.
  `launchTarget` - Launch target associated with this ICBuildConfiguration. Must not be null.
Returns:
  Name used when a Core Build configuration is created. Default implementation uses the following pattern
  toolName.launchMode.toolchain OS.toolchain Arch.launchTarget Id

  For example, a cmake build, in debug mode, using a GCC windows toolchain with the Local launch target:
  "cmake.debug.win32.x86_64.Local"

  A different pattern is used when running in a Docker container.

Since:
  9.0

### getSupportedToolchains

default Collection<IToolChain> getSupportedToolchains(Collection<IToolChain> toolchains) throws org.eclipse.core.runtime.CoreException
Return a collection of supported toolchains for build configurations of this type.

Throws:
  `org.eclipse.core.runtime.CoreException`
Since:
  6.4