Class CBuildConfiguration

    • Constructor Detail

      • CBuildConfiguration

        protected CBuildConfiguration​(org.eclipse.core.resources.IBuildConfiguration config,
                                      String name)
                               throws org.eclipse.core.runtime.CoreException
        Throws:
        org.eclipse.core.runtime.CoreException
      • CBuildConfiguration

        protected CBuildConfiguration​(org.eclipse.core.resources.IBuildConfiguration config,
                                      String name,
                                      IToolChain toolChain)
      • CBuildConfiguration

        protected CBuildConfiguration​(org.eclipse.core.resources.IBuildConfiguration config,
                                      String name,
                                      IToolChain toolChain,
                                      String launchMode)
        Since:
        6.2
      • CBuildConfiguration

        protected CBuildConfiguration​(org.eclipse.core.resources.IBuildConfiguration config,
                                      IToolChain toolChain)
    • Method Detail

      • getBuildConfiguration

        public org.eclipse.core.resources.IBuildConfiguration getBuildConfiguration()
        Description copied from interface: ICBuildConfiguration
        Returns the resources build configuration that this CDT build configuration is associated with.
        Specified by:
        getBuildConfiguration in interface ICBuildConfiguration
        Returns:
        resources build configuration
      • getName

        public String getName()
      • setLaunchMode

        protected void setLaunchMode​(String launchMode)
        Since:
        6.2
      • getProject

        public org.eclipse.core.resources.IProject getProject()
      • getBinaryParserId

        public String getBinaryParserId()
                                 throws org.eclipse.core.runtime.CoreException
        Description copied from interface: ICBuildConfiguration
        Ids for the Binary Parsers to use when checking whether a file is a binary that can be launched.
        Specified by:
        getBinaryParserId in interface ICBuildConfiguration
        Returns:
        binary parser ids
        Throws:
        org.eclipse.core.runtime.CoreException
      • getBuildContainer

        public org.eclipse.core.resources.IContainer getBuildContainer()
                                                                throws org.eclipse.core.runtime.CoreException
        Throws:
        org.eclipse.core.runtime.CoreException
      • getBuildDirectoryURI

        public URI getBuildDirectoryURI()
                                 throws org.eclipse.core.runtime.CoreException
        Description copied from interface: ICBuildConfiguration2
        The URI for the directory in which the build is executed.
        Specified by:
        getBuildDirectoryURI in interface ICBuildConfiguration2
        Throws:
        org.eclipse.core.runtime.CoreException
      • getBuildDirectory

        public Path getBuildDirectory()
                               throws org.eclipse.core.runtime.CoreException
        Throws:
        org.eclipse.core.runtime.CoreException
      • getBuildOutput

        public IBinary[] getBuildOutput()
                                 throws org.eclipse.core.runtime.CoreException
        Description copied from interface: ICBuildConfiguration
        The binaries produced by the build.
        Specified by:
        getBuildOutput in interface ICBuildConfiguration
        Returns:
        binaries produced by the build.
        Throws:
        org.eclipse.core.runtime.CoreException
        Since:
        6.1
      • setActive

        public void setActive​(org.eclipse.core.runtime.IProgressMonitor monitor)
                       throws org.eclipse.core.runtime.CoreException
        Throws:
        org.eclipse.core.runtime.CoreException
      • getSettings

        protected org.osgi.service.prefs.Preferences getSettings()
      • getToolChain

        public IToolChain getToolChain()
                                throws org.eclipse.core.runtime.CoreException
        Description copied from interface: ICBuildConfiguration
        Build Configurations are configurations for a given toolchain.
        Specified by:
        getToolChain in interface ICBuildConfiguration
        Returns:
        the toolchain for this build configuration
        Throws:
        org.eclipse.core.runtime.CoreException
      • addMarker

        public void addMarker​(org.eclipse.core.resources.IResource file,
                              int lineNumber,
                              String errorDesc,
                              int severity,
                              String errorVar)
        Specified by:
        addMarker in interface IMarkerGenerator
      • findCommand

        protected Path findCommand​(String command)
      • startBuildProcess

        public Process startBuildProcess​(List<String> commands,
                                         IEnvironmentVariable[] envVars,
                                         org.eclipse.core.runtime.IPath buildDirectory,
                                         IConsole console,
                                         org.eclipse.core.runtime.IProgressMonitor monitor)
                                  throws IOException,
                                         org.eclipse.core.runtime.CoreException
        Throws:
        IOException
        org.eclipse.core.runtime.CoreException
        Since:
        6.5
      • watchProcess

        @Deprecated
        protected int watchProcess​(Process process,
                                   IConsoleParser[] consoleParsers,
                                   IConsole console)
                            throws org.eclipse.core.runtime.CoreException
        Deprecated.
        Throws:
        org.eclipse.core.runtime.CoreException
      • watchProcess

        protected int watchProcess​(Process process,
                                   IConsole console)
                            throws org.eclipse.core.runtime.CoreException
        Throws:
        org.eclipse.core.runtime.CoreException
        Since:
        6.4
      • watchProcess

        protected int watchProcess​(Process process,
                                   IConsoleParser[] consoleParsers)
                            throws org.eclipse.core.runtime.CoreException
        Throws:
        org.eclipse.core.runtime.CoreException
        Since:
        6.4
      • loadScannerInfoCache

        protected void loadScannerInfoCache()
        Since:
        6.1
      • saveScannerInfoCache

        protected void saveScannerInfoCache()
        Since:
        6.1
      • getScannerInfoCache

        protected ScannerInfoCache getScannerInfoCache()
        Since:
        6.1
      • processLine

        public boolean processLine​(String line)
        Description copied from interface: IConsoleParser
        Parse one line of output.
        Specified by:
        processLine in interface IConsoleParser
        Returns:
        true if line was successfully processed; skip other console parsers

        false - try other console parsers

      • processLine

        public boolean processLine​(String line,
                                   List<org.eclipse.core.runtime.jobs.Job> jobsArray)
        Process a compile line for Scanner info in a separate job
        Specified by:
        processLine in interface IConsoleParser2
        Parameters:
        line - - line to process
        jobsArray - - array of Jobs to keep track of open scanner info jobs
        Returns:
        - true if line processed, false otherwise
        Since:
        6.5
      • refreshScannerInfo

        protected void refreshScannerInfo()
                                   throws org.eclipse.core.runtime.CoreException
        Throws:
        org.eclipse.core.runtime.CoreException
        Since:
        6.5
      • shutdown

        public void shutdown()
        Description copied from interface: IConsoleParser
        Called to let the parser know that the end of the error stream has been reached. Can be used by the parser to flush its internal buffers.
        Specified by:
        shutdown in interface IConsoleParser
      • subscribe

        public void subscribe​(org.eclipse.core.resources.IResource resource,
                              IScannerInfoChangeListener listener)
        Description copied from interface: IScannerInfoProvider
        The receiver will register the listener specified in the argument to receive change notifications when the information for the IResource it is responsible for changes.
        Specified by:
        subscribe in interface IScannerInfoProvider
      • unsubscribe

        public void unsubscribe​(org.eclipse.core.resources.IResource resource,
                                IScannerInfoChangeListener listener)
        Description copied from interface: IScannerInfoProvider
        The receiver will no longer notify the listener specified in the argument when information about the reource it is responsible for changes.
        Specified by:
        unsubscribe in interface IScannerInfoProvider
      • getCommandFromPath

        public static Path getCommandFromPath​(Path command)
        Takes a command path and returns either the command path itself if it is absolute or the path to the command as it appears in the PATH environment variable. Also adjusts the command for Windows's .exe extension.
        Since:
        6.1
      • setProperties

        public boolean setProperties​(Map<String,​String> properties)
        Description copied from interface: ICBuildConfiguration
        Set the properties for this build configuration. These will often come from launch configurations which have build settings as attributes.
        Specified by:
        setProperties in interface ICBuildConfiguration
        Parameters:
        properties - build properties
        Returns:
        whether the properties have changed
        Since:
        6.2
      • setProperty

        public void setProperty​(String name,
                                String value)
        Description copied from interface: ICBuildConfiguration
        Set a property to the given value.
        Specified by:
        setProperty in interface ICBuildConfiguration
        Parameters:
        name - the name of the property
        value - the new value for the property
        Since:
        6.4