Class ScannerDiscoveryLegacySupport
java.lang.Object
org.eclipse.cdt.core.language.settings.providers.ScannerDiscoveryLegacySupport
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
Modifier and TypeFieldDescriptionstatic final String
ID of MBS language settings provider (from org.eclipse.cdt.managedbuilder.core)static final String
ID of language settings provider wrappingScannerProvider
ofPathEntryManager
for 3.X projectsstatic final String
ID of ScannerInfo language settings provider wrapping ScannerInfoProvider defined by org.eclipse.cdt.core.ScannerInfoProvider extension pointstatic final String
ID of User language settings provider (from org.eclipse.cdt.ui) -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic 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
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 viewstatic void
setLanguageSettingsProvidersFunctionalityEnabled
(org.eclipse.core.resources.IProject project, boolean value) Enable/disable Language Settings functionality for the given project.
-
Field Details
-
USER_LANGUAGE_SETTINGS_PROVIDER_ID
ID of User language settings provider (from org.eclipse.cdt.ui)- See Also:
-
MBS_LANGUAGE_SETTINGS_PROVIDER_ID
ID of MBS language settings provider (from org.eclipse.cdt.managedbuilder.core)- See Also:
-
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:
-
PATH_ENTRY_MANAGER_LANGUAGE_SETTINGS_PROVIDER_ID
ID of language settings provider wrappingScannerProvider
ofPathEntryManager
for 3.X projects- Since:
- 5.5
- See Also:
-
-
Constructor Details
-
ScannerDiscoveryLegacySupport
public ScannerDiscoveryLegacySupport()
-
-
Method Details
-
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 ornull
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 ornull
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
- ornull
for workspace preferencevalue
-true
to enable orfalse
to disable the functionality.- Restriction:
- This method is temporary and not intended to be referenced by clients.
-
isMbsLanguageSettingsProviderOn
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
- 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
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
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.
-