Class CConfigurationDataProvider

  • Direct Known Subclasses:
    CDefaultConfigurationDataProvider

    public abstract class CConfigurationDataProvider
    extends Object
    The class is to be implemented by the Configuration data provider contributed via a org.eclipse.cdt.core.CConfigurationDataProvider extension point
    • Constructor Detail

      • CConfigurationDataProvider

        public CConfigurationDataProvider()
    • Method Detail

      • loadConfiguration

        public abstract CConfigurationData loadConfiguration​(ICConfigurationDescription cfgDescription,
                                                             org.eclipse.core.runtime.IProgressMonitor monitor)
                                                      throws org.eclipse.core.runtime.CoreException
        Requests the Configuration Data to be loaded for the given ConfigurationDescription. The method can be called in following cases:
        1. Loading configuration from external data source such as .cproject.
        2. Loading preference configuration defined in Preferences -> C/C++ -> New project Wizard -> Makefile Project.
        Parameters:
        cfgDescription - - configuration description being loaded.
        monitor - - progress monitor.
        Throws:
        org.eclipse.core.runtime.CoreException
      • createConfiguration

        public abstract CConfigurationData createConfiguration​(ICConfigurationDescription cfgDescription,
                                                               ICConfigurationDescription baseCfgDescription,
                                                               CConfigurationData baseData,
                                                               boolean clone,
                                                               org.eclipse.core.runtime.IProgressMonitor monitor)
                                                        throws org.eclipse.core.runtime.CoreException
        Requests the Configuration Data to be created for the given ConfigurationDescription. The method can be called in several cases:
        1. When the new configuration is being created based upon the already existing one via ICProjectDescription.createConfiguration method call.
        2. When the configuration copy (clone) is being created for the copy description.
        Parameters:
        cfgDescription - - configuration description for the configuration data being created.
        baseCfgDescription - - configuration description for the configuration data the new data to be based upon.
        baseData - - configuration data the new data to be based upon.
        clone - - true indicates that the configuration copy (clone) is being created for the copy description.
        monitor - - progress monitor.
        Returns:
        false indicates that the new configuration is being created based upon the already existing one via ICProjectDescription.createConfiguration method call, true otherwise.
        Throws:
        org.eclipse.core.runtime.CoreException
      • removeConfiguration

        public abstract void removeConfiguration​(ICConfigurationDescription cfgDescription,
                                                 CConfigurationData data,
                                                 org.eclipse.core.runtime.IProgressMonitor monitor)
        Called to notify the provider that the configuration is removed.
        Parameters:
        cfgDescription - - configuration description being removed.
        data - - configuration data.
        monitor - - progress monitor.
      • applyConfiguration

        public CConfigurationData applyConfiguration​(ICConfigurationDescription cfgDescription,
                                                     ICConfigurationDescription baseCfgDescription,
                                                     CConfigurationData baseData,
                                                     IModificationContext context,
                                                     org.eclipse.core.runtime.IProgressMonitor monitor)
                                              throws org.eclipse.core.runtime.CoreException
        Called during the setProjectDescription operation to notify the provider that the configuration data is being applied. Provider would typically store all the necessary data configuration during this call.
        Parameters:
        cfgDescription - - configuration description where the configuration data are being applied to.
        baseCfgDescription - - configuration description of the configuration data being applied.
        baseData - - configuration data being applied.
        context - the IModificationContext allows registering workspace runnables to be run as a single batch workspace operation. If possible the runnables will be run directly in the apply context(thread) after all configuration datas get applied. Otherwise runnables will be run as a separate job. This allows to perform all workspace modifications registered by different configurations to be run as a single batch operation together with the workspace modifications performed by the ICProjectDescription framework.
        monitor - - progress monitor.
        Throws:
        org.eclipse.core.runtime.CoreException
      • dataCached

        public void dataCached​(ICConfigurationDescription cfgDescription,
                               CConfigurationData data,
                               org.eclipse.core.runtime.IProgressMonitor monitor)
        Called to notify that the configuration data was cached. Implementors can do any necessary cleaning, etc. Default implementation is empty.
        Parameters:
        cfgDescription - - configuration description which was cached.
        data - - configuration data.
        monitor - - progress monitor.