Package org.eclipse.cdt.core.language.settings.providers

## Class ScannerDiscoveryLegacySupport

- java.lang.Object
- - org.eclipse.cdt.core.language.settings.providers.ScannerDiscoveryLegacySupport

    public class ScannerDiscoveryLegacySupport
    extends Object

Collection of utilities for legacy support of older Scanner Discovery functionality. This class is temporary and not intended to be used by clients.

Since:
  5.4
Restriction:
  This class is not intended to be subclassed by clients.
Restriction:
  This class is not intended to be instantiated by clients.

### Field Summary

Fields
`static String` `MBS_LANGUAGE_SETTINGS_PROVIDER_ID` ID of MBS language settings provider (from org.eclipse.cdt.managedbuilder.core)
`static String` `PATH_ENTRY_MANAGER_LANGUAGE_SETTINGS_PROVIDER_ID` ID of language settings provider wrapping `ScannerProvider` of `PathEntryManager` for 3.X projects
`static String` `SI_LANGUAGE_SETTINGS_PROVIDER_ID` ID of ScannerInfo language settings provider wrapping ScannerInfoProvider defined by org.eclipse.cdt.core.ScannerInfoProvider extension point
`static String` `USER_LANGUAGE_SETTINGS_PROVIDER_ID` ID of User language settings provider (from org.eclipse.cdt.ui)

### Constructor Summary

Constructors
`ScannerDiscoveryLegacySupport()`

### Method Summary

All Methods Static Methods Concrete Methods
`static void` `defineLanguageSettingsEnablement​(org.eclipse.core.resources.IProject project)` If not defined yet, define property that controls if language settings providers functionality enabled for a given project.
`static String[]` `getDefaultProviderIdsLegacy​(ICConfigurationDescription cfgDescription)` Return list containing User provider and one of wrapper providers to support legacy projects (backward compatibility).
`static String` `getDeprecatedLegacyProfiles​(String id)` Returns the values of scanner discovery profiles (scannerConfigDiscoveryProfileId) which were deprecated and replaced with language settings providers in plugin.xml.
`static boolean` `isLanguageSettingsProvidersFunctionalityDefined​(org.eclipse.core.resources.IProject project)` Checks if Language Settings functionality is defined for given project in preferences.
`static boolean` `isLanguageSettingsProvidersFunctionalityEnabled​(org.eclipse.core.resources.IProject project)` Checks if Language Settings functionality is enabled for given project.
`static boolean` `isLegacyScannerDiscoveryOn​(ICConfigurationDescription cfgDescription)`
`static boolean` `isLegacyScannerDiscoveryOn​(org.eclipse.core.resources.IProject project)`
`static boolean` `isMbsLanguageSettingsProviderOn​(ICConfigurationDescription cfgDescription)` Check if legacy Scanner Discovery in MBS should be active.
`static boolean` `isProviderCompatible​(String providerId, ICConfigurationDescription cfgDescription)` Checks if the provider is applicable for configuration from backward compatibility point of view
`static void` `setLanguageSettingsProvidersFunctionalityEnabled​(org.eclipse.core.resources.IProject project, boolean value)` Enable/disable Language Settings functionality for the given project.

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Field Detail

#### USER_LANGUAGE_SETTINGS_PROVIDER_ID

    public static final String USER_LANGUAGE_SETTINGS_PROVIDER_ID

ID of User language settings provider (from org.eclipse.cdt.ui)

See Also:
  Constant Field Values

#### MBS_LANGUAGE_SETTINGS_PROVIDER_ID

    public static final String MBS_LANGUAGE_SETTINGS_PROVIDER_ID

ID of MBS language settings provider (from org.eclipse.cdt.managedbuilder.core)

See Also:
  Constant Field Values

#### SI_LANGUAGE_SETTINGS_PROVIDER_ID

    public static final String SI_LANGUAGE_SETTINGS_PROVIDER_ID

ID of ScannerInfo language settings provider wrapping ScannerInfoProvider defined by org.eclipse.cdt.core.ScannerInfoProvider extension point

Since:
  5.5
See Also:
  Constant Field Values

#### PATH_ENTRY_MANAGER_LANGUAGE_SETTINGS_PROVIDER_ID

    public static final String PATH_ENTRY_MANAGER_LANGUAGE_SETTINGS_PROVIDER_ID

ID of language settings provider wrapping `ScannerProvider` of `PathEntryManager` for 3.X projects

Since:
  5.5
See Also:
  Constant Field Values

### Constructor Detail

#### ScannerDiscoveryLegacySupport

    public ScannerDiscoveryLegacySupport()

### Method Detail

#### isLanguageSettingsProvidersFunctionalityDefined

    public static boolean isLanguageSettingsProvidersFunctionalityDefined​(org.eclipse.core.resources.IProject project)

Checks if Language Settings functionality is defined for given project in preferences.

Parameters:
  `project` - - project to check the preference or `null` for workspace preference
Returns:
  `true` if functionality is defined
Since:
  5.5
Restriction:
  This method is temporary and not intended to be referenced by clients.

#### isLanguageSettingsProvidersFunctionalityEnabled

    public static boolean isLanguageSettingsProvidersFunctionalityEnabled​(org.eclipse.core.resources.IProject project)

Checks if Language Settings functionality is enabled for given project. Note that disabling on workspace level will disable it for all projects.

Parameters:
  `project` - - project to check the preference or `null` for workspace preference
Returns:
  `true` if functionality is enabled
Restriction:
  This method is temporary and not intended to be referenced by clients.

#### setLanguageSettingsProvidersFunctionalityEnabled

    public static void setLanguageSettingsProvidersFunctionalityEnabled​(org.eclipse.core.resources.IProject project,
                                                                        boolean value)

Enable/disable Language Settings functionality for the given project.

Parameters:
  `project` - or `null` for workspace preference
  `value` - `true` to enable or `false` to disable the functionality.
Restriction:
  This method is temporary and not intended to be referenced by clients.

#### isMbsLanguageSettingsProviderOn

    public static boolean isMbsLanguageSettingsProviderOn​(ICConfigurationDescription cfgDescription)

Check if legacy Scanner Discovery in MBS should be active.

Restriction:
  This is internal helper method to support compatibility with previous versions which is not intended to be referenced by clients.

#### isLegacyScannerDiscoveryOn

    public static boolean isLegacyScannerDiscoveryOn​(ICConfigurationDescription cfgDescription)

Restriction:
  This is internal helper method to support compatibility with previous versions which is not intended to be referenced by clients.

#### isLegacyScannerDiscoveryOn

    public static boolean isLegacyScannerDiscoveryOn​(org.eclipse.core.resources.IProject project)

Restriction:
  This is internal helper method to support compatibility with previous versions which is not intended to be referenced by clients.

#### getDefaultProviderIdsLegacy

    public static String[] getDefaultProviderIdsLegacy​(ICConfigurationDescription cfgDescription)

Return list containing User provider and one of wrapper providers to support legacy projects (backward compatibility).

Since:
  5.5
Restriction:
  This is internal helper method to support compatibility with previous versions which is not intended to be referenced by clients.

#### isProviderCompatible

    public static boolean isProviderCompatible​(String providerId,
                                               ICConfigurationDescription cfgDescription)

Checks if the provider is applicable for configuration from backward compatibility point of view

Since:
  5.5
Restriction:
  This is internal helper method to support compatibility with previous versions which is not intended to be referenced by clients.

#### defineLanguageSettingsEnablement

    public static void defineLanguageSettingsEnablement​(org.eclipse.core.resources.IProject project)

If not defined yet, define property that controls if language settings providers functionality enabled for a given project. Workspace preference is checked and the project property is set to match it.

Parameters:
  `project` - - project to define enablement.
Since:
  5.5

#### getDeprecatedLegacyProfiles

    public static String getDeprecatedLegacyProfiles​(String id)

Returns the values of scanner discovery profiles (scannerConfigDiscoveryProfileId) which were deprecated and replaced with language settings providers in plugin.xml. This (temporary) function serves as fail-safe switch during the transition.

Parameters:
  `id` - - can be id of either org.eclipse.cdt.managedbuilder.internal.core.InputType or org.eclipse.cdt.managedbuilder.internal.core.ToolChain.
Returns:
  legacy scannerConfigDiscoveryProfileId.