Interface IToolChain

All Superinterfaces:
org.eclipse.core.runtime.IAdaptable

public interface IToolChain extends org.eclipse.core.runtime.IAdaptable
Toolchains are a collection of tools that take the source code and converts it into an executable system.
Since:
6.0
  • Field Details

    • ATTR_OS

      static final String ATTR_OS
      Property: The OS the toolchain builds for.
      See Also:
    • ATTR_ARCH

      static final String ATTR_ARCH
      Property: The CPU architecture the toolchain supports.
      See Also:
    • ATTR_PACKAGE

      static final String ATTR_PACKAGE
      Property: A package ID to reflect different version/package line up of the platform this toolchain supports.
      See Also:
  • Method Details

    • getProvider

      IToolChainProvider getProvider()
      The provider of the toolchain.
      Returns:
      toolchain provider
    • getId

      String getId()
      The ID of the toolchain
      Returns:
      toolchain ID
    • getVersion

      @Deprecated String getVersion()
      Deprecated.
      the version doesn't matter. id's for a given type must be unique.
      The version of the toolchain
      Returns:
      toolchain version
    • getName

      String getName()
      The user friendly name for the toolchain
      Returns:
      toolchain name
    • getBuildConfigNameFragment

      default String getBuildConfigNameFragment()
      Return a toolchain specific part of the build configuration name. This should be enough to ensure the build config generated proper code for the selected target. As a default implementation, we do what the CMakeBuildConfigationProvider did which has been copied to a number of other providers, i.e. use the os and arch.
      Returns:
      fragment to be used in the build config name
      Since:
      6.9
    • getTypeId

      default String getTypeId()
      The type id for the toolchain. The combination of type id and toolchain id uniquely identify the toolchain in the system.
      Since:
      6.4
    • getProperty

      String getProperty(String key)
      Returns an property of the toolchain. Used to determine applicability of a toolchain for a given situation.
      Parameters:
      key - key of the property
      Returns:
      value of the property or null if the toolchain does not have that property
    • setProperty

      void setProperty(String key, String value)
      Set a property on the toolchain.
      Parameters:
      key - key of the property
      value - value of the property
    • getVariables

      IEnvironmentVariable[] getVariables()
      Return the environment variables to be set when invoking the tools in the toolchain.
      Returns:
      environment variables
    • getVariable

      IEnvironmentVariable getVariable(String name)
      Return the environment variable of the given name used when invoking the toolchain.
      Parameters:
      name - environment variable name
      Returns:
      environment variable value
    • getErrorParserIds

      String[] getErrorParserIds()
      Returns the error parser IDs use to create error markers for builds with this toolchain.
      Returns:
      error parser IDs
    • getBinaryParserIds

      List<String> getBinaryParserIds()
      Returns the IDs for the binary parsers that can parse the build output of the toolchain.
      Returns:
      binary parser IDs for this toolchain
      Since:
      8.0
    • getScannerInfo

      default IExtendedScannerInfo getScannerInfo(org.eclipse.core.resources.IBuildConfiguration buildConfig, List<String> command, IExtendedScannerInfo baseScannerInfo, org.eclipse.core.resources.IResource resource, URI buildDirectoryURI)
      Get the scanner info for a given build config, command, base scanner info, resource and build directory.
      Parameters:
      buildConfig - the build configuration this scanner info applies to
      command - the compile command that is used to build the resource
      baseScannerInfo - base scanner info that this scanner info extends/replaces
      resource - the resource this scanner info applies to, usually a source file
      buildDirectoryURI - where the build command is run to build this resource
      Returns:
      scanner info for this resource
      Since:
      6.1
    • getScannerInfo

      @Deprecated default IExtendedScannerInfo getScannerInfo(org.eclipse.core.resources.IBuildConfiguration buildConfig, Path command, String[] args, IExtendedScannerInfo baseScannerInfo, org.eclipse.core.resources.IResource resource, URI buildDirectoryURI)
      Deprecated.
    • getDefaultScannerInfo

      default IExtendedScannerInfo getDefaultScannerInfo(org.eclipse.core.resources.IBuildConfiguration buildConfig, IExtendedScannerInfo baseScannerInfo, ILanguage language, URI buildDirectoryURI)
      Return the default scanner info for this toolchain. This is used before any build information is available to provide at least a minimal scanner info based on the compiler built-ins.
      Parameters:
      buildConfig - the build configuration this scanner info applies to
      baseScannerInfo - base scanner info that this scanner info extends/replaces
      language - the source language that selects the tool to provide scanner info for
      buildDirectoryURI - the build directory that would be used to run commands
      Returns:
      default scanner info for this language
      Since:
      6.1
    • getCommandPath

      Path getCommandPath(Path command)
      Returns the absolute path of the tool represented by the command
      Parameters:
      command - the command as it usually appears on the command line
      Returns:
      the absolute path to the tool for the command
    • getCompileCommands

      String[] getCompileCommands()
      Returns the list of compiler tools.
      Returns:
      list of compiler tools
    • getCompileCommands

      default String[] getCompileCommands(ILanguage language)
      Returns the list of compiler tools for a given language.
      Parameters:
      language - the language for the commands
      Returns:
      the compile commands for the language
      Since:
      6.1
    • getResourcesFromCommand

      default org.eclipse.core.resources.IResource[] getResourcesFromCommand(List<String> command, URI buildDirectoryURI)
      Returns the list of resources referenced in a compile command.
      Parameters:
      command - the compile command
      buildDirectoryURI - the directory the compile command runs in
      Returns:
      the list of resources referenced in the compile command
      Since:
      6.1
    • getResourcesFromCommand

      @Deprecated default org.eclipse.core.resources.IResource[] getResourcesFromCommand(String[] command, URI buildDirectoryURI)
      Deprecated.
    • stripCommand

      default List<String> stripCommand(List<String> command, org.eclipse.core.resources.IResource[] resources)
      Strips the resources from the compile command. Use to produce the common parts of the command shared by a number of resources.
      Parameters:
      command - the original compile command
      resources - the resources this command compiles for usually returned by getResourcesFromCommand()
      Returns:
      the stripped command
      Since:
      6.1
    • matches

      default boolean matches(Map<String,String> properties)
      Determine if this toolchain supports targets with the given set of properties.
      Parameters:
      properties - the set of properties to test against
      Returns:
      does this toolchain support these properties
      Since:
      6.1