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 Modifier and Type Field Description 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 wrappingScannerProvider
ofPathEntryManager
for 3.X projectsstatic String
SI_LANGUAGE_SETTINGS_PROVIDER_ID
ID of ScannerInfo language settings provider wrapping ScannerInfoProvider defined by org.eclipse.cdt.core.ScannerInfoProvider extension pointstatic String
USER_LANGUAGE_SETTINGS_PROVIDER_ID
ID of User language settings provider (from org.eclipse.cdt.ui)
-
Constructor Summary
Constructors Constructor Description ScannerDiscoveryLegacySupport()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description 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 viewstatic void
setLanguageSettingsProvidersFunctionalityEnabled(org.eclipse.core.resources.IProject project, boolean value)
Enable/disable Language Settings functionality for the given project.
-
-
-
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 wrappingScannerProvider
ofPathEntryManager
for 3.X projects- Since:
- 5.5
- See Also:
- Constant Field Values
-
-
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 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
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.
-
-