mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-29 19:45:01 +02:00
Better legacy and compatibility support
This commit is contained in:
parent
862d87074c
commit
00302deed6
24 changed files with 400 additions and 207 deletions
|
@ -13,6 +13,8 @@ package org.eclipse.cdt.make.core.scannerconfig;
|
|||
import java.util.Map;
|
||||
|
||||
import org.eclipse.cdt.core.CCorePlugin;
|
||||
import org.eclipse.cdt.core.language.settings.providers.ScannerDiscoveryLegacySupport;
|
||||
import org.eclipse.cdt.core.model.CoreModel;
|
||||
import org.eclipse.cdt.core.resources.ACBuilder;
|
||||
import org.eclipse.cdt.core.settings.model.ICConfigurationDescription;
|
||||
import org.eclipse.cdt.core.settings.model.ICProjectDescription;
|
||||
|
@ -75,6 +77,11 @@ public class ScannerConfigBuilder extends ACBuilder {
|
|||
|
||||
buildInfo2 = ScannerConfigProfileManager.createScannerConfigBuildInfo2(getProject());
|
||||
autodiscoveryEnabled2 = buildInfo2.isAutoDiscoveryEnabled();
|
||||
if (autodiscoveryEnabled2) {
|
||||
ICProjectDescription projDesc = CoreModel.getDefault().getProjectDescription(getProject());
|
||||
ICConfigurationDescription cfgDescription = projDesc.getActiveConfiguration();
|
||||
autodiscoveryEnabled2 = ScannerDiscoveryLegacySupport.isMbsLanguageSettingsProviderOn(cfgDescription);
|
||||
}
|
||||
|
||||
if (autodiscoveryEnabled2) {
|
||||
monitor.beginTask(MakeMessages.getString("ScannerConfigBuilder.Invoking_Builder"), 100); //$NON-NLS-1$
|
||||
|
@ -129,6 +136,11 @@ public class ScannerConfigBuilder extends ACBuilder {
|
|||
|
||||
protected boolean build(IProject project, InfoContext context, IScannerConfigBuilderInfo2 buildInfo2, IProgressMonitor monitor){
|
||||
boolean autodiscoveryEnabled2 = buildInfo2.isAutoDiscoveryEnabled();
|
||||
if (autodiscoveryEnabled2) {
|
||||
ICProjectDescription projDesc = CoreModel.getDefault().getProjectDescription(getProject());
|
||||
ICConfigurationDescription cfgDescription = projDesc.getActiveConfiguration();
|
||||
autodiscoveryEnabled2 = ScannerDiscoveryLegacySupport.isMbsLanguageSettingsProviderOn(cfgDescription);
|
||||
}
|
||||
|
||||
if (autodiscoveryEnabled2) {
|
||||
monitor.beginTask(MakeMessages.getString("ScannerConfigBuilder.Invoking_Builder"), 100); //$NON-NLS-1$
|
||||
|
|
|
@ -14,6 +14,10 @@ package org.eclipse.cdt.make.internal.core.scannerconfig;
|
|||
import java.io.OutputStream;
|
||||
|
||||
import org.eclipse.cdt.core.IMarkerGenerator;
|
||||
import org.eclipse.cdt.core.language.settings.providers.ScannerDiscoveryLegacySupport;
|
||||
import org.eclipse.cdt.core.model.CoreModel;
|
||||
import org.eclipse.cdt.core.settings.model.ICConfigurationDescription;
|
||||
import org.eclipse.cdt.core.settings.model.ICProjectDescription;
|
||||
import org.eclipse.cdt.internal.core.ConsoleOutputSniffer;
|
||||
import org.eclipse.cdt.make.core.MakeBuilder;
|
||||
import org.eclipse.cdt.make.core.MakeBuilderUtil;
|
||||
|
@ -118,23 +122,29 @@ public class ScannerInfoConsoleParserFactory {
|
|||
// builder not installed or disabled
|
||||
}
|
||||
}
|
||||
if (scBuildInfo != null &&
|
||||
scBuildInfo.isAutoDiscoveryEnabled() &&
|
||||
scBuildInfo.isBuildOutputParserEnabled()) {
|
||||
// get the make builder console parser
|
||||
SCProfileInstance profileInstance = ScannerConfigProfileManager.getInstance().
|
||||
getSCProfileInstance(currentProject, context, scBuildInfo.getSelectedProfileId());
|
||||
IScannerInfoConsoleParser clParser = profileInstance.createBuildOutputParser();
|
||||
if (collector == null) {
|
||||
collector = profileInstance.getScannerInfoCollector();
|
||||
}
|
||||
if(clParser != null){
|
||||
clParser.startup(currentProject, workingDirectory, collector,
|
||||
scBuildInfo.isProblemReportingEnabled() ? markerGenerator : null);
|
||||
// create an output stream sniffer
|
||||
return new ConsoleOutputSniffer(outputStream, errorStream, new
|
||||
IScannerInfoConsoleParser[] {clParser});
|
||||
}
|
||||
if (scBuildInfo != null) {
|
||||
boolean autodiscoveryEnabled2 = scBuildInfo.isAutoDiscoveryEnabled();
|
||||
if (autodiscoveryEnabled2) {
|
||||
ICProjectDescription projDesc = CoreModel.getDefault().getProjectDescription(currentProject);
|
||||
ICConfigurationDescription cfgDescription = projDesc.getActiveConfiguration();
|
||||
autodiscoveryEnabled2 = ScannerDiscoveryLegacySupport.isMbsLanguageSettingsProviderOn(cfgDescription);
|
||||
}
|
||||
if (autodiscoveryEnabled2 && scBuildInfo.isBuildOutputParserEnabled()) {
|
||||
// get the make builder console parser
|
||||
SCProfileInstance profileInstance = ScannerConfigProfileManager.getInstance().
|
||||
getSCProfileInstance(currentProject, context, scBuildInfo.getSelectedProfileId());
|
||||
IScannerInfoConsoleParser clParser = profileInstance.createBuildOutputParser();
|
||||
if (collector == null) {
|
||||
collector = profileInstance.getScannerInfoCollector();
|
||||
}
|
||||
if(clParser != null){
|
||||
clParser.startup(currentProject, workingDirectory, collector,
|
||||
scBuildInfo.isProblemReportingEnabled() ? markerGenerator : null);
|
||||
// create an output stream sniffer
|
||||
return new ConsoleOutputSniffer(outputStream, errorStream, new
|
||||
IScannerInfoConsoleParser[] {clParser});
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
// }
|
||||
|
|
|
@ -15,10 +15,13 @@ import java.util.Arrays;
|
|||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
|
||||
import org.eclipse.cdt.core.language.settings.providers.ScannerDiscoveryLegacySupport;
|
||||
import org.eclipse.cdt.core.model.CModelException;
|
||||
import org.eclipse.cdt.core.model.CoreModel;
|
||||
import org.eclipse.cdt.core.model.ICProject;
|
||||
import org.eclipse.cdt.core.model.IPathEntry;
|
||||
import org.eclipse.cdt.core.settings.model.ICConfigurationDescription;
|
||||
import org.eclipse.cdt.core.settings.model.ICProjectDescription;
|
||||
import org.eclipse.cdt.make.core.MakeCorePlugin;
|
||||
import org.eclipse.cdt.make.core.MakeProjectNature;
|
||||
import org.eclipse.cdt.make.core.scannerconfig.IScannerConfigBuilderInfo2;
|
||||
|
@ -180,8 +183,14 @@ public class DiscoveryOptionsBlock extends AbstractDiscoveryOptionsBlock {
|
|||
((GridData)scEnabledButton.getLayoutData()).horizontalSpan = numColumns;
|
||||
((GridData)scEnabledButton.getLayoutData()).grabExcessHorizontalSpace = true;
|
||||
// VMIR* old projects will have discovery disabled by default
|
||||
scEnabledButton.setSelection(needsSCNature ? false
|
||||
: (getBuildInfo().isAutoDiscoveryEnabled()
|
||||
boolean autodiscoveryEnabled2 = getBuildInfo().isAutoDiscoveryEnabled();
|
||||
if (autodiscoveryEnabled2) {
|
||||
ICProjectDescription projDesc = CoreModel.getDefault().getProjectDescription(getProject());
|
||||
ICConfigurationDescription cfgDescription = projDesc.getActiveConfiguration();
|
||||
autodiscoveryEnabled2 = ScannerDiscoveryLegacySupport.isMbsLanguageSettingsProviderOn(cfgDescription);
|
||||
}
|
||||
scEnabledButton.setSelection(needsSCNature ? false
|
||||
: (autodiscoveryEnabled2
|
||||
&& !getBuildInfo().getSelectedProfileId().equals(ScannerConfigProfileManager.NULL_PROFILE_ID)));
|
||||
scEnabledButton.addSelectionListener(new SelectionAdapter() {
|
||||
@Override
|
||||
|
|
|
@ -20,6 +20,7 @@ import org.eclipse.cdt.build.internal.core.scannerconfig2.CfgScannerConfigProfil
|
|||
import org.eclipse.cdt.core.CCorePlugin;
|
||||
import org.eclipse.cdt.core.envvar.IEnvironmentVariable;
|
||||
import org.eclipse.cdt.core.envvar.IEnvironmentVariableManager;
|
||||
import org.eclipse.cdt.core.language.settings.providers.ScannerDiscoveryLegacySupport;
|
||||
import org.eclipse.cdt.core.model.CoreModel;
|
||||
import org.eclipse.cdt.core.resources.ACBuilder;
|
||||
import org.eclipse.cdt.core.settings.model.ICConfigurationDescription;
|
||||
|
@ -180,7 +181,11 @@ public class ScannerConfigBuilder extends ACBuilder {
|
|||
public static SCProfileInstance build(CfgInfoContext context, IScannerConfigBuilderInfo2 buildInfo2, int flags, Properties env, IProgressMonitor monitor) throws CoreException{
|
||||
IConfiguration cfg = context.getConfiguration();
|
||||
IProject project = cfg.getOwner().getProject();
|
||||
boolean autodiscoveryEnabled2 = buildInfo2.isAutoDiscoveryEnabled();
|
||||
boolean autodiscoveryEnabled2 = buildInfo2.isAutoDiscoveryEnabled();
|
||||
if (autodiscoveryEnabled2) {
|
||||
ICConfigurationDescription cfgDescription = ManagedBuildManager.getDescriptionForConfiguration(cfg);
|
||||
autodiscoveryEnabled2 = ScannerDiscoveryLegacySupport.isMbsLanguageSettingsProviderOn(cfgDescription);
|
||||
}
|
||||
|
||||
if (autodiscoveryEnabled2 || ((flags & FORCE_DISCOVERY) != 0)) {
|
||||
monitor.beginTask(MakeMessages.getString("ScannerConfigBuilder.Invoking_Builder"), 100); //$NON-NLS-1$
|
||||
|
|
|
@ -159,7 +159,12 @@ public class CfgScannerConfigUtil {
|
|||
Set<String> profiles = new TreeSet<String>();
|
||||
|
||||
if (toolchain!=null) {
|
||||
String toolchainProfileId = toolchain.getScannerConfigDiscoveryProfileId();
|
||||
String toolchainProfileId = null;
|
||||
if (toolchain instanceof ToolChain) {
|
||||
toolchainProfileId = ((ToolChain) toolchain).getLegacyScannerConfigDiscoveryProfileId();
|
||||
} else {
|
||||
toolchainProfileId = toolchain.getScannerConfigDiscoveryProfileId();
|
||||
}
|
||||
if (toolchainProfileId!=null && toolchainProfileId.length()>0) {
|
||||
profiles.add(toolchainProfileId);
|
||||
}
|
||||
|
@ -227,7 +232,7 @@ public class CfgScannerConfigUtil {
|
|||
|
||||
Set<String> profiles = new TreeSet<String>();
|
||||
|
||||
String attribute = ((InputType) inputType).getDiscoveryProfileIdAttribute();
|
||||
String attribute = ((InputType) inputType).getLegacyDiscoveryProfileIdAttribute();
|
||||
if (attribute!=null) {
|
||||
// FIXME: temporary; we should add new method to IInputType instead of that
|
||||
for (String profileId : attribute.split("\\|")) { //$NON-NLS-1$
|
||||
|
|
|
@ -10,14 +10,8 @@
|
|||
*******************************************************************************/
|
||||
package org.eclipse.cdt.build.internal.core.scannerconfig2;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.Map;
|
||||
|
||||
import org.eclipse.cdt.build.core.scannerconfig.CfgInfoContext;
|
||||
import org.eclipse.cdt.build.core.scannerconfig.ICfgScannerConfigBuilderInfo2Set;
|
||||
import org.eclipse.cdt.core.settings.model.ICConfigurationDescription;
|
||||
import org.eclipse.cdt.core.settings.model.ICProjectDescription;
|
||||
import org.eclipse.cdt.make.core.scannerconfig.IScannerConfigBuilderInfo2;
|
||||
import org.eclipse.cdt.make.core.scannerconfig.InfoContext;
|
||||
import org.eclipse.cdt.make.core.scannerconfig.ScannerConfigScope;
|
||||
import org.eclipse.cdt.make.internal.core.scannerconfig2.ScannerConfigProfile;
|
||||
|
@ -50,34 +44,4 @@ public class CfgScannerConfigProfileManager {
|
|||
return new CfgInfoContext(cfg).toInfoContext();
|
||||
return new InfoContext(project);
|
||||
}
|
||||
|
||||
public static boolean disableScannerDiscovery(IConfiguration cfg) {
|
||||
boolean isChanged = false;
|
||||
|
||||
ICfgScannerConfigBuilderInfo2Set info2set = getCfgScannerConfigBuildInfo(cfg);
|
||||
Map<CfgInfoContext, IScannerConfigBuilderInfo2> infoMap = info2set.getInfoMap();
|
||||
Collection<IScannerConfigBuilderInfo2> infos = infoMap.values();
|
||||
for (IScannerConfigBuilderInfo2 info2 : infos) {
|
||||
isChanged = isChanged || info2.isAutoDiscoveryEnabled();
|
||||
info2.setAutoDiscoveryEnabled(false);
|
||||
}
|
||||
return isChanged;
|
||||
}
|
||||
|
||||
public static boolean disableScannerDiscovery(ICProjectDescription prjDescription) {
|
||||
boolean isChanged = false;
|
||||
|
||||
ICConfigurationDescription[] cfgDescs = prjDescription.getConfigurations();
|
||||
if (cfgDescs!=null) {
|
||||
for (ICConfigurationDescription cfgDesc : cfgDescs) {
|
||||
IConfiguration cfg = ManagedBuildManager.getConfigurationForDescription(cfgDesc);
|
||||
boolean changed=CfgScannerConfigProfileManager.disableScannerDiscovery(cfg);
|
||||
if (changed) {
|
||||
isChanged = true;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
return isChanged;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -34,6 +34,7 @@ import org.eclipse.cdt.core.envvar.IEnvironmentVariableManager;
|
|||
import org.eclipse.cdt.core.language.settings.providers.ILanguageSettingsProvider;
|
||||
import org.eclipse.cdt.core.language.settings.providers.LanguageSettingsManager;
|
||||
import org.eclipse.cdt.core.language.settings.providers.LanguageSettingsManager_TBD;
|
||||
import org.eclipse.cdt.core.language.settings.providers.ScannerDiscoveryLegacySupport;
|
||||
import org.eclipse.cdt.core.model.ICModelMarker;
|
||||
import org.eclipse.cdt.core.resources.IConsole;
|
||||
import org.eclipse.cdt.core.resources.RefreshScopeManager;
|
||||
|
@ -439,28 +440,34 @@ public class ExternalBuildRunner extends AbstractBuildRunner {
|
|||
IScannerConfigBuilderInfo2 info = map.get(context);
|
||||
InfoContext ic = context.toInfoContext();
|
||||
boolean added = false;
|
||||
if (info != null &&
|
||||
info.isAutoDiscoveryEnabled() &&
|
||||
info.isBuildOutputParserEnabled()) {
|
||||
if (info != null) {
|
||||
boolean autodiscoveryEnabled2 = info.isAutoDiscoveryEnabled();
|
||||
if (autodiscoveryEnabled2) {
|
||||
IConfiguration cfg = context.getConfiguration();
|
||||
ICConfigurationDescription cfgDescription = ManagedBuildManager.getDescriptionForConfiguration(cfg);
|
||||
autodiscoveryEnabled2 = ScannerDiscoveryLegacySupport.isMbsLanguageSettingsProviderOn(cfgDescription);
|
||||
}
|
||||
if (autodiscoveryEnabled2 && info.isBuildOutputParserEnabled()) {
|
||||
|
||||
String id = info.getSelectedProfileId();
|
||||
ScannerConfigProfile profile = ScannerConfigProfileManager.getInstance().getSCProfileConfiguration(id);
|
||||
if(profile.getBuildOutputProviderElement() != null){
|
||||
// get the make builder console parser
|
||||
SCProfileInstance profileInstance = ScannerConfigProfileManager.getInstance().
|
||||
getSCProfileInstance(project, ic, id);
|
||||
String id = info.getSelectedProfileId();
|
||||
ScannerConfigProfile profile = ScannerConfigProfileManager.getInstance().getSCProfileConfiguration(id);
|
||||
if(profile.getBuildOutputProviderElement() != null){
|
||||
// get the make builder console parser
|
||||
SCProfileInstance profileInstance = ScannerConfigProfileManager.getInstance().
|
||||
getSCProfileInstance(project, ic, id);
|
||||
|
||||
IScannerInfoConsoleParser clParser = profileInstance.createBuildOutputParser();
|
||||
if (collector == null) {
|
||||
collector = profileInstance.getScannerInfoCollector();
|
||||
}
|
||||
if(clParser != null){
|
||||
clParser.startup(project, workingDirectory, collector,
|
||||
info.isProblemReportingEnabled() ? markerGenerator : null);
|
||||
parserList.add(clParser);
|
||||
added = true;
|
||||
}
|
||||
IScannerInfoConsoleParser clParser = profileInstance.createBuildOutputParser();
|
||||
if (collector == null) {
|
||||
collector = profileInstance.getScannerInfoCollector();
|
||||
}
|
||||
if(clParser != null){
|
||||
clParser.startup(project, workingDirectory, collector,
|
||||
info.isProblemReportingEnabled() ? markerGenerator : null);
|
||||
parserList.add(clParser);
|
||||
added = true;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -17,11 +17,13 @@ import java.util.List;
|
|||
import java.util.StringTokenizer;
|
||||
import java.util.Vector;
|
||||
|
||||
import org.eclipse.cdt.core.language.settings.providers.ScannerDiscoveryLegacySupport;
|
||||
import org.eclipse.cdt.core.settings.model.ICStorageElement;
|
||||
import org.eclipse.cdt.core.settings.model.util.CDataUtil;
|
||||
import org.eclipse.cdt.internal.core.SafeStringInterner;
|
||||
import org.eclipse.cdt.managedbuilder.core.IAdditionalInput;
|
||||
import org.eclipse.cdt.managedbuilder.core.IBuildObject;
|
||||
import org.eclipse.cdt.managedbuilder.core.IConfiguration;
|
||||
import org.eclipse.cdt.managedbuilder.core.IFileInfo;
|
||||
import org.eclipse.cdt.managedbuilder.core.IInputOrder;
|
||||
import org.eclipse.cdt.managedbuilder.core.IInputType;
|
||||
|
@ -35,14 +37,15 @@ import org.eclipse.cdt.managedbuilder.core.ManagedBuildManager;
|
|||
import org.eclipse.cdt.managedbuilder.internal.enablement.OptionEnablementExpression;
|
||||
import org.eclipse.cdt.managedbuilder.makegen.IManagedDependencyGeneratorType;
|
||||
import org.eclipse.core.resources.IProject;
|
||||
import org.eclipse.core.resources.IResource;
|
||||
import org.eclipse.core.runtime.CoreException;
|
||||
import org.eclipse.core.runtime.IConfigurationElement;
|
||||
import org.eclipse.core.runtime.IPath;
|
||||
import org.eclipse.core.runtime.Path;
|
||||
import org.eclipse.core.runtime.Platform;
|
||||
import org.osgi.framework.Version;
|
||||
import org.eclipse.core.runtime.content.IContentType;
|
||||
import org.eclipse.core.runtime.content.IContentTypeManager;
|
||||
import org.osgi.framework.Version;
|
||||
|
||||
public class InputType extends BuildObject implements IInputType {
|
||||
|
||||
|
@ -1774,9 +1777,56 @@ public class InputType extends BuildObject implements IInputType {
|
|||
return id;
|
||||
}
|
||||
|
||||
/**
|
||||
* Temporary method to support compatibility during SD transition.
|
||||
*/
|
||||
private boolean isLanguageSettingsProvidersFunctionalityEnabled() {
|
||||
boolean isLanguageSettingsProvidersEnabled = false;
|
||||
ITool tool = getParent();
|
||||
if (tool!=null) {
|
||||
IBuildObject bo = tool.getParent();
|
||||
if (bo instanceof IToolChain) {
|
||||
IConfiguration cfg = ((IToolChain) bo).getParent();
|
||||
if (cfg!=null) {
|
||||
IResource rc = cfg.getOwner();
|
||||
if (rc!=null) {
|
||||
IProject project = rc.getProject();
|
||||
isLanguageSettingsProvidersEnabled = ScannerDiscoveryLegacySupport.isLanguageSettingsProvidersFunctionalityEnabled(project);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return isLanguageSettingsProvidersEnabled;
|
||||
}
|
||||
|
||||
/**
|
||||
* Temporary method to support compatibility during SD transition.
|
||||
* @noreference This method is not intended to be referenced by clients.
|
||||
*/
|
||||
public String getLegacyDiscoveryProfileIdAttribute(){
|
||||
String profileId = buildInfoDicsoveryProfileId;
|
||||
if (profileId == null) {
|
||||
profileId = ScannerDiscoveryLegacySupport.getDeprecatedLegacyProfiles(id);
|
||||
if (profileId == null && superClass instanceof InputType) {
|
||||
profileId = ((InputType)superClass).getLegacyDiscoveryProfileIdAttribute();
|
||||
}
|
||||
}
|
||||
return profileId;
|
||||
}
|
||||
|
||||
public String getDiscoveryProfileIdAttribute(){
|
||||
if(buildInfoDicsoveryProfileId == null && superClass != null)
|
||||
return ((InputType)superClass).getDiscoveryProfileIdAttribute();
|
||||
if (!isLanguageSettingsProvidersFunctionalityEnabled())
|
||||
return getLegacyDiscoveryProfileIdAttribute();
|
||||
|
||||
return getDiscoveryProfileIdAttributeInternal();
|
||||
}
|
||||
|
||||
/**
|
||||
* Method extracted temporarily to support compatibility during SD transition.
|
||||
*/
|
||||
private String getDiscoveryProfileIdAttributeInternal(){
|
||||
if(buildInfoDicsoveryProfileId == null && superClass instanceof InputType)
|
||||
return ((InputType)superClass).getDiscoveryProfileIdAttributeInternal();
|
||||
return buildInfoDicsoveryProfileId;
|
||||
}
|
||||
|
||||
|
|
|
@ -24,6 +24,7 @@ import java.util.SortedMap;
|
|||
import java.util.StringTokenizer;
|
||||
|
||||
import org.eclipse.cdt.build.internal.core.scannerconfig.CfgDiscoveredPathManager.PathInfoCache;
|
||||
import org.eclipse.cdt.core.language.settings.providers.ScannerDiscoveryLegacySupport;
|
||||
import org.eclipse.cdt.core.settings.model.ICStorageElement;
|
||||
import org.eclipse.cdt.core.settings.model.extension.CTargetPlatformData;
|
||||
import org.eclipse.cdt.core.settings.model.util.CDataUtil;
|
||||
|
@ -50,6 +51,8 @@ import org.eclipse.cdt.managedbuilder.envvar.IConfigurationEnvironmentVariableSu
|
|||
import org.eclipse.cdt.managedbuilder.internal.dataprovider.ConfigurationDataProvider;
|
||||
import org.eclipse.cdt.managedbuilder.internal.enablement.OptionEnablementExpression;
|
||||
import org.eclipse.cdt.managedbuilder.macros.IConfigurationBuildMacroSupplier;
|
||||
import org.eclipse.core.resources.IProject;
|
||||
import org.eclipse.core.resources.IResource;
|
||||
import org.eclipse.core.runtime.CoreException;
|
||||
import org.eclipse.core.runtime.IConfigurationElement;
|
||||
import org.eclipse.core.runtime.IExtension;
|
||||
|
@ -1509,18 +1512,62 @@ public class ToolChain extends HoldsOptions implements IToolChain, IMatchKeyProv
|
|||
return defaultLanguageSettingsProvidersIds;
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.managedbuilder.core.IToolChain#getScannerConfigDiscoveryProfileId()
|
||||
*/
|
||||
public String getScannerConfigDiscoveryProfileId() {
|
||||
if (scannerConfigDiscoveryProfileId == null) {
|
||||
if (getSuperClass() != null) {
|
||||
return getSuperClass().getScannerConfigDiscoveryProfileId();
|
||||
}
|
||||
}
|
||||
return scannerConfigDiscoveryProfileId;
|
||||
}
|
||||
/**
|
||||
* Temporary method to support compatibility during SD transition.
|
||||
*/
|
||||
private boolean isLanguageSettingsProvidersFunctionalityEnabled() {
|
||||
boolean isLanguageSettingsProvidersEnabled = false;
|
||||
IConfiguration cfg = getParent();
|
||||
if (cfg!=null) {
|
||||
IResource rc = cfg.getOwner();
|
||||
if (rc!=null) {
|
||||
IProject project = rc.getProject();
|
||||
isLanguageSettingsProvidersEnabled = ScannerDiscoveryLegacySupport.isLanguageSettingsProvidersFunctionalityEnabled(project);
|
||||
}
|
||||
}
|
||||
return isLanguageSettingsProvidersEnabled;
|
||||
}
|
||||
|
||||
/**
|
||||
* Temporary method to support compatibility during SD transition.
|
||||
* @noreference This method is not intended to be referenced by clients.
|
||||
*/
|
||||
public String getLegacyScannerConfigDiscoveryProfileId() {
|
||||
String profileId = scannerConfigDiscoveryProfileId;
|
||||
if (profileId==null) {
|
||||
profileId = ScannerDiscoveryLegacySupport.getDeprecatedLegacyProfiles(id);
|
||||
if (profileId == null) {
|
||||
IToolChain superClass = getSuperClass();
|
||||
if (superClass instanceof ToolChain) {
|
||||
profileId = ((ToolChain) superClass).getLegacyScannerConfigDiscoveryProfileId();
|
||||
}
|
||||
}
|
||||
}
|
||||
return profileId;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see org.eclipse.cdt.managedbuilder.core.IToolChain#getScannerConfigDiscoveryProfileId()
|
||||
*/
|
||||
public String getScannerConfigDiscoveryProfileId() {
|
||||
if (!isLanguageSettingsProvidersFunctionalityEnabled())
|
||||
return getLegacyScannerConfigDiscoveryProfileId();
|
||||
|
||||
return getScannerConfigDiscoveryProfileIdInternal();
|
||||
}
|
||||
|
||||
/**
|
||||
* Method extracted temporarily to support compatibility during SD transition.
|
||||
*/
|
||||
private String getScannerConfigDiscoveryProfileIdInternal() {
|
||||
if (scannerConfigDiscoveryProfileId == null && superClass instanceof ToolChain) {
|
||||
return ((ToolChain) getSuperClass()).getScannerConfigDiscoveryProfileIdInternal();
|
||||
}
|
||||
return scannerConfigDiscoveryProfileId;
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.managedbuilder.core.IToolChain#setScannerConfigDiscoveryProfileId(java.lang.String)
|
||||
*/
|
||||
|
|
|
@ -1253,7 +1253,6 @@
|
|||
dependencyExtensions="h"
|
||||
dependencyCalculator="org.eclipse.cdt.managedbuilder.makegen.gnu.DefaultGCCDependencyCalculator2"
|
||||
id="cdt.managedbuild.tool.gnu.c.compiler.input"
|
||||
scannerConfigDiscoveryProfileId="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileC|org.eclipse.cdt.make.core.GCCStandardMakePerFileProfile"
|
||||
languageId="org.eclipse.cdt.core.gcc">
|
||||
</inputType>
|
||||
<outputType
|
||||
|
@ -1559,7 +1558,6 @@
|
|||
dependencyExtensions="h,H,hpp"
|
||||
dependencyCalculator="org.eclipse.cdt.managedbuilder.makegen.gnu.DefaultGCCDependencyCalculator2"
|
||||
id="cdt.managedbuild.tool.gnu.cpp.compiler.input"
|
||||
scannerConfigDiscoveryProfileId="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileCPP|org.eclipse.cdt.make.core.GCCStandardMakePerFileProfile"
|
||||
languageId="org.eclipse.cdt.core.g++">
|
||||
</inputType>
|
||||
<outputType
|
||||
|
@ -1626,7 +1624,7 @@
|
|||
<inputType
|
||||
id="cdt.managedbuild.tool.gnu.c.compiler.input.cygwin"
|
||||
superClass="cdt.managedbuild.tool.gnu.c.compiler.input"
|
||||
scannerConfigDiscoveryProfileId="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileC"/>
|
||||
/>
|
||||
</tool>
|
||||
<tool
|
||||
id="cdt.managedbuild.tool.gnu.cpp.compiler.cygwin"
|
||||
|
@ -1640,7 +1638,7 @@
|
|||
<inputType
|
||||
id="cdt.managedbuild.tool.gnu.cpp.compiler.input.cygwin"
|
||||
superClass="cdt.managedbuild.tool.gnu.cpp.compiler.input"
|
||||
scannerConfigDiscoveryProfileId="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileCPP"/>
|
||||
/>
|
||||
</tool>
|
||||
|
||||
<builder
|
||||
|
|
|
@ -24,10 +24,12 @@ import org.eclipse.cdt.build.core.scannerconfig.ICfgScannerConfigBuilderInfo2Set
|
|||
import org.eclipse.cdt.build.internal.core.scannerconfig.CfgDiscoveredPathManager;
|
||||
import org.eclipse.cdt.build.internal.core.scannerconfig.CfgScannerConfigUtil;
|
||||
import org.eclipse.cdt.build.internal.core.scannerconfig2.CfgScannerConfigProfileManager;
|
||||
import org.eclipse.cdt.core.language.settings.providers.ScannerDiscoveryLegacySupport;
|
||||
import org.eclipse.cdt.core.model.util.CDTListComparator;
|
||||
import org.eclipse.cdt.core.settings.model.ICConfigurationDescription;
|
||||
import org.eclipse.cdt.core.settings.model.ICResourceDescription;
|
||||
import org.eclipse.cdt.core.settings.model.util.CDataUtil;
|
||||
import org.eclipse.cdt.internal.ui.newui.StatusMessageLine;
|
||||
import org.eclipse.cdt.make.core.MakeCorePlugin;
|
||||
import org.eclipse.cdt.make.core.scannerconfig.IScannerConfigBuilderInfo2;
|
||||
import org.eclipse.cdt.make.core.scannerconfig.IScannerConfigBuilderInfo2Set;
|
||||
|
@ -46,7 +48,9 @@ import org.eclipse.cdt.managedbuilder.core.IInputType;
|
|||
import org.eclipse.cdt.managedbuilder.core.IResourceInfo;
|
||||
import org.eclipse.cdt.managedbuilder.core.ITool;
|
||||
import org.eclipse.cdt.managedbuilder.core.IToolChain;
|
||||
import org.eclipse.cdt.managedbuilder.core.ManagedBuildManager;
|
||||
import org.eclipse.cdt.managedbuilder.internal.ui.Messages;
|
||||
import org.eclipse.cdt.ui.CUIPlugin;
|
||||
import org.eclipse.cdt.ui.newui.CDTPrefUtil;
|
||||
import org.eclipse.cdt.utils.ui.controls.ControlFactory;
|
||||
import org.eclipse.cdt.utils.ui.controls.TabFolderLayout;
|
||||
|
@ -103,6 +107,7 @@ public class DiscoveryTab extends AbstractCBuildPropertyTab implements IBuildInf
|
|||
private Button reportProblemsCheckBox;
|
||||
private Combo profileComboBox;
|
||||
private Composite profileOptionsComposite;
|
||||
private Button clearButton;
|
||||
|
||||
private ICfgScannerConfigBuilderInfo2Set cbi;
|
||||
private Map<InfoContext, IScannerConfigBuilderInfo2> baseInfoMap;
|
||||
|
@ -116,6 +121,8 @@ public class DiscoveryTab extends AbstractCBuildPropertyTab implements IBuildInf
|
|||
|
||||
private DiscoveryPageWrapper wrapper = null;
|
||||
|
||||
private StatusMessageLine fStatusLine;
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
|
@ -184,6 +191,9 @@ public class DiscoveryTab extends AbstractCBuildPropertyTab implements IBuildInf
|
|||
profileOptionsComposite.setLayoutData(gd);
|
||||
profileOptionsComposite.setLayout(new TabFolderLayout());
|
||||
|
||||
fStatusLine = new StatusMessageLine(usercomp, SWT.LEFT, 2);
|
||||
setEnablement();
|
||||
|
||||
sashForm.setWeights(DEFAULT_SASH_WEIGHTS);
|
||||
}
|
||||
|
||||
|
@ -236,7 +246,7 @@ public class DiscoveryTab extends AbstractCBuildPropertyTab implements IBuildInf
|
|||
Label clearLabel = ControlFactory.createLabel(autoDiscoveryGroup, Messages.DiscoveryTab_ClearDisoveredEntries);
|
||||
|
||||
// "Clear" button
|
||||
Button clearButton = ControlFactory.createPushButton(autoDiscoveryGroup, Messages.DiscoveryTab_Clear);
|
||||
clearButton = ControlFactory.createPushButton(autoDiscoveryGroup, Messages.DiscoveryTab_Clear);
|
||||
GridData gd = (GridData) clearButton.getLayoutData();
|
||||
gd.grabExcessHorizontalSpace = true;
|
||||
//Bug 331783 - NLS: "Clear" button label in Makefile Project preferences truncated
|
||||
|
@ -334,6 +344,27 @@ public class DiscoveryTab extends AbstractCBuildPropertyTab implements IBuildInf
|
|||
} else {
|
||||
setVisibility(Messages.DiscoveryTab_6);
|
||||
}
|
||||
|
||||
setEnablement();
|
||||
}
|
||||
|
||||
private void setEnablement() {
|
||||
IStatus status = null;
|
||||
ICConfigurationDescription cfgDescription = page.getResDesc().getConfiguration();
|
||||
boolean isEnabled = ScannerDiscoveryLegacySupport.isMbsLanguageSettingsProviderOn(cfgDescription);
|
||||
if (!isEnabled) {
|
||||
status = new Status(IStatus.INFO, CUIPlugin.PLUGIN_ID, "Managed Build language settings provider is not enabled.");
|
||||
}
|
||||
|
||||
scopeComboBox.setEnabled(isEnabled);
|
||||
resTable.setEnabled(isEnabled);
|
||||
boolean isSCDEnabled = autoDiscoveryCheckBox.getSelection();
|
||||
reportProblemsCheckBox.setEnabled(isEnabled && isSCDEnabled);
|
||||
autoDiscoveryCheckBox.setEnabled(isEnabled);
|
||||
autoDiscoveryGroup.setEnabled(isEnabled);
|
||||
clearButton.setEnabled(isEnabled);
|
||||
|
||||
fStatusLine.setErrorStatus(status);
|
||||
}
|
||||
|
||||
private void setVisibility(String errMsg) {
|
||||
|
@ -372,7 +403,13 @@ public class DiscoveryTab extends AbstractCBuildPropertyTab implements IBuildInf
|
|||
buildInfo = (IScannerConfigBuilderInfo2) ti.getData("info"); //$NON-NLS-1$
|
||||
String selectedProfileId = buildInfo.getSelectedProfileId();
|
||||
iContext = (CfgInfoContext) ti.getData("cont"); //$NON-NLS-1$
|
||||
autoDiscoveryCheckBox.setSelection(buildInfo.isAutoDiscoveryEnabled()
|
||||
boolean autodiscoveryEnabled2 = buildInfo.isAutoDiscoveryEnabled();
|
||||
if (autodiscoveryEnabled2) {
|
||||
IConfiguration cfg = iContext.getConfiguration();
|
||||
ICConfigurationDescription cfgDescription = ManagedBuildManager.getDescriptionForConfiguration(cfg);
|
||||
autodiscoveryEnabled2 = ScannerDiscoveryLegacySupport.isMbsLanguageSettingsProviderOn(cfgDescription);
|
||||
}
|
||||
autoDiscoveryCheckBox.setSelection(autodiscoveryEnabled2
|
||||
&& !selectedProfileId.equals(ScannerConfigProfileManager.NULL_PROFILE_ID));
|
||||
reportProblemsCheckBox.setSelection(buildInfo.isProblemReportingEnabled());
|
||||
|
||||
|
|
|
@ -26,6 +26,7 @@ import java.util.TreeSet;
|
|||
import org.eclipse.cdt.build.internal.core.scannerconfig2.CfgScannerConfigProfileManager;
|
||||
import org.eclipse.cdt.core.language.settings.providers.ILanguageSettingsProvider;
|
||||
import org.eclipse.cdt.core.language.settings.providers.LanguageSettingsManager;
|
||||
import org.eclipse.cdt.core.language.settings.providers.ScannerDiscoveryLegacySupport;
|
||||
import org.eclipse.cdt.core.model.CoreModel;
|
||||
import org.eclipse.cdt.core.settings.model.ICConfigurationDescription;
|
||||
import org.eclipse.cdt.core.settings.model.ICProjectDescription;
|
||||
|
@ -605,9 +606,8 @@ public class MBSWizardHandler extends CWizardHandler {
|
|||
if (cfgFirst == null) // select at least first configuration
|
||||
cfgFirst = cfgDes;
|
||||
|
||||
ScannerDiscoveryLegacySupport.setLanguageSettingsProvidersFunctionalityEnabled(project, isTryingNewSD);
|
||||
if (isTryingNewSD) {
|
||||
CfgScannerConfigProfileManager.disableScannerDiscovery(config);
|
||||
|
||||
List<ILanguageSettingsProvider> providers = ManagedBuildManager.getLanguageSettingsProviders(config);
|
||||
cfgDes.setLanguageSettingProviders(providers);
|
||||
} else {
|
||||
|
@ -620,16 +620,6 @@ public class MBSWizardHandler extends CWizardHandler {
|
|||
monitor.worked(work);
|
||||
}
|
||||
mngr.setProjectDescription(project, des);
|
||||
|
||||
// FIXME if scanner discovery is empty it is "fixed" deeply inside setProjectDescription(), taking the easy road here for the moment
|
||||
if (isTryingNewSD) {
|
||||
des = mngr.getProjectDescription(project);
|
||||
boolean isChanged = CfgScannerConfigProfileManager.disableScannerDiscovery(des);
|
||||
|
||||
if (isChanged) {
|
||||
mngr.setProjectDescription(project, des);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -14,11 +14,11 @@ import java.lang.reflect.InvocationTargetException;
|
|||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import org.eclipse.cdt.build.internal.core.scannerconfig2.CfgScannerConfigProfileManager;
|
||||
import org.eclipse.cdt.core.CCProjectNature;
|
||||
import org.eclipse.cdt.core.CCorePlugin;
|
||||
import org.eclipse.cdt.core.language.settings.providers.ILanguageSettingsProvider;
|
||||
import org.eclipse.cdt.core.language.settings.providers.LanguageSettingsManager;
|
||||
import org.eclipse.cdt.core.language.settings.providers.ScannerDiscoveryLegacySupport;
|
||||
import org.eclipse.cdt.core.model.CoreModel;
|
||||
import org.eclipse.cdt.core.settings.model.ICConfigurationDescription;
|
||||
import org.eclipse.cdt.core.settings.model.ICProjectDescription;
|
||||
|
@ -118,9 +118,8 @@ public class NewMakeProjFromExisting extends Wizard implements IImportWizard, IN
|
|||
CConfigurationData data = config.getConfigurationData();
|
||||
ICConfigurationDescription cfgDes = projDesc.createConfiguration(ManagedBuildManager.CFG_DATA_PROVIDER_ID, data);
|
||||
|
||||
ScannerDiscoveryLegacySupport.setLanguageSettingsProvidersFunctionalityEnabled(project, isTryingNewSD);
|
||||
if (isTryingNewSD) {
|
||||
CfgScannerConfigProfileManager.disableScannerDiscovery(config);
|
||||
|
||||
List<ILanguageSettingsProvider> providers = ManagedBuildManager.getLanguageSettingsProviders(config);
|
||||
cfgDes.setLanguageSettingProviders(providers);
|
||||
} else {
|
||||
|
@ -130,25 +129,12 @@ public class NewMakeProjFromExisting extends Wizard implements IImportWizard, IN
|
|||
cfgDes.setLanguageSettingProviders(providers);
|
||||
}
|
||||
|
||||
|
||||
monitor.worked(1);
|
||||
|
||||
pdMgr.setProjectDescription(project, projDesc);
|
||||
|
||||
// FIXME if scanner discovery is empty it is "fixed" deeply inside setProjectDescription(), taking the easy road here for the moment
|
||||
if (isTryingNewSD) {
|
||||
ICProjectDescriptionManager mngr = CoreModel.getDefault().getProjectDescriptionManager();
|
||||
ICProjectDescription des = mngr.getProjectDescription(project);
|
||||
boolean isChanged = CfgScannerConfigProfileManager.disableScannerDiscovery(des);
|
||||
|
||||
if (isChanged) {
|
||||
mngr.setProjectDescription(project, des);
|
||||
}
|
||||
}
|
||||
} catch (Throwable e) {
|
||||
ManagedBuilderUIPlugin.log(e);
|
||||
}
|
||||
|
||||
monitor.done();
|
||||
}
|
||||
};
|
||||
|
|
|
@ -14,9 +14,9 @@ package org.eclipse.cdt.managedbuilder.ui.wizards;
|
|||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import org.eclipse.cdt.build.internal.core.scannerconfig2.CfgScannerConfigProfileManager;
|
||||
import org.eclipse.cdt.core.language.settings.providers.ILanguageSettingsProvider;
|
||||
import org.eclipse.cdt.core.language.settings.providers.LanguageSettingsManager;
|
||||
import org.eclipse.cdt.core.language.settings.providers.ScannerDiscoveryLegacySupport;
|
||||
import org.eclipse.cdt.core.model.CoreModel;
|
||||
import org.eclipse.cdt.core.settings.model.ICConfigurationDescription;
|
||||
import org.eclipse.cdt.core.settings.model.ICProjectDescription;
|
||||
|
@ -118,9 +118,8 @@ public class STDWizardHandler extends MBSWizardHandler {
|
|||
CConfigurationData data = cfg.getConfigurationData();
|
||||
ICConfigurationDescription cfgDes = des.createConfiguration(ManagedBuildManager.CFG_DATA_PROVIDER_ID, data);
|
||||
|
||||
ScannerDiscoveryLegacySupport.setLanguageSettingsProvidersFunctionalityEnabled(project, isTryingNewSD);
|
||||
if (isTryingNewSD) {
|
||||
CfgScannerConfigProfileManager.disableScannerDiscovery(cfg);
|
||||
|
||||
List<ILanguageSettingsProvider> providers = ManagedBuildManager.getLanguageSettingsProviders(cfg);
|
||||
cfgDes.setLanguageSettingProviders(providers);
|
||||
} else {
|
||||
|
@ -133,16 +132,6 @@ public class STDWizardHandler extends MBSWizardHandler {
|
|||
monitor.worked(work);
|
||||
}
|
||||
mngr.setProjectDescription(project, des);
|
||||
|
||||
// FIXME if scanner discovery is empty it is "fixed" deeply inside setProjectDescription(), taking the easy road here for the moment
|
||||
if (isTryingNewSD) {
|
||||
des = mngr.getProjectDescription(project);
|
||||
boolean isChanged = CfgScannerConfigProfileManager.disableScannerDiscovery(des);
|
||||
|
||||
if (isChanged) {
|
||||
mngr.setProjectDescription(project, des);
|
||||
}
|
||||
}
|
||||
}
|
||||
public boolean canCreateWithoutToolchain() { return true; }
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2009, 2010 Andrew Gvozdev (Quoin Inc.) and others.
|
||||
* Copyright (c) 2009, 2011 Andrew Gvozdev (Quoin Inc.) and others.
|
||||
* All rights reserved. This program and the accompanying materials
|
||||
* are made available under the terms of the Eclipse Public License v1.0
|
||||
* which accompanies this distribution, and is available at
|
||||
|
@ -13,7 +13,6 @@ package org.eclipse.cdt.core.language.settings.providers;
|
|||
|
||||
import java.util.List;
|
||||
|
||||
import org.eclipse.cdt.core.CCorePlugin;
|
||||
import org.eclipse.cdt.core.settings.model.ICConfigurationDescription;
|
||||
import org.eclipse.cdt.core.settings.model.ICLanguageSettingEntry;
|
||||
import org.eclipse.cdt.core.settings.model.ICSettingEntry;
|
||||
|
@ -25,7 +24,6 @@ import org.eclipse.core.resources.IProject;
|
|||
import org.eclipse.core.resources.IResource;
|
||||
import org.eclipse.core.runtime.CoreException;
|
||||
import org.eclipse.core.runtime.preferences.InstanceScope;
|
||||
import org.osgi.service.prefs.BackingStoreException;
|
||||
import org.osgi.service.prefs.Preferences;
|
||||
|
||||
/**
|
||||
|
@ -35,13 +33,6 @@ import org.osgi.service.prefs.Preferences;
|
|||
* @since 6.0
|
||||
*/
|
||||
public class LanguageSettingsManager {
|
||||
/** @noreference This field is temporary and not intended to be referenced by clients. */
|
||||
public static String USE_LANGUAGE_SETTINGS_PROVIDERS_PREFERENCE = "enabled"; //$NON-NLS-1$
|
||||
public static boolean USE_LANGUAGE_SETTINGS_PROVIDERS_DEFAULT = true;
|
||||
|
||||
private static final String PREFERENCES_QUALIFIER = CCorePlugin.PLUGIN_ID;
|
||||
private static final String LANGUAGE_SETTINGS_PROVIDERS_NODE = "languageSettingsProviders"; //$NON-NLS-1$
|
||||
|
||||
/**
|
||||
* Returns the list of setting entries of the given provider
|
||||
* for the given configuration description, resource and language.
|
||||
|
@ -176,42 +167,4 @@ public class LanguageSettingsManager {
|
|||
return provider;
|
||||
}
|
||||
|
||||
private static Preferences getPreferences(IProject project) {
|
||||
if (project == null)
|
||||
return InstanceScope.INSTANCE.getNode(PREFERENCES_QUALIFIER).node(LANGUAGE_SETTINGS_PROVIDERS_NODE);
|
||||
else
|
||||
return new LocalProjectScope(project).getNode(PREFERENCES_QUALIFIER).node(LANGUAGE_SETTINGS_PROVIDERS_NODE);
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if Language Settings functionality is enabled for given project.
|
||||
*
|
||||
* @param project - project to check the preference
|
||||
* @return {@code true} if functionality is enabled
|
||||
*
|
||||
* @noreference This method is temporary and not intended to be referenced by clients.
|
||||
*/
|
||||
public static boolean isLanguageSettingsProvidersEnabled(IProject project) {
|
||||
Preferences pref = LanguageSettingsManager.getPreferences(project);
|
||||
return pref.getBoolean(LanguageSettingsManager.USE_LANGUAGE_SETTINGS_PROVIDERS_PREFERENCE, LanguageSettingsManager.USE_LANGUAGE_SETTINGS_PROVIDERS_DEFAULT);
|
||||
}
|
||||
|
||||
/**
|
||||
* Enable/disable Language Settings functionality for the given project.
|
||||
*
|
||||
* @param project
|
||||
* @param value {@code true} to enable or {@code false} to disable the functionality.
|
||||
*
|
||||
* @noreference This method is temporary and not intended to be referenced by clients.
|
||||
*/
|
||||
public static void setLanguageSettingsProvidersEnabled(IProject project, boolean value) {
|
||||
Preferences pref = LanguageSettingsManager.getPreferences(project);
|
||||
pref.putBoolean(LanguageSettingsManager.USE_LANGUAGE_SETTINGS_PROVIDERS_PREFERENCE, value);
|
||||
try {
|
||||
pref.flush();
|
||||
} catch (BackingStoreException e) {
|
||||
CCorePlugin.log(e);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -0,0 +1,125 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2009, 2011 Andrew Gvozdev and others.
|
||||
* All rights reserved. This program and the accompanying materials
|
||||
* are made available under the terms of the Eclipse Public License v1.0
|
||||
* which accompanies this distribution, and is available at
|
||||
* http://www.eclipse.org/legal/epl-v10.html
|
||||
*
|
||||
* Contributors:
|
||||
* Andrew Gvozdev - initial API and implementation
|
||||
*******************************************************************************/
|
||||
|
||||
package org.eclipse.cdt.core.language.settings.providers;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import org.eclipse.cdt.core.CCorePlugin;
|
||||
import org.eclipse.cdt.core.settings.model.ICConfigurationDescription;
|
||||
import org.eclipse.cdt.internal.core.LocalProjectScope;
|
||||
import org.eclipse.core.resources.IProject;
|
||||
import org.eclipse.core.runtime.preferences.InstanceScope;
|
||||
import org.osgi.service.prefs.BackingStoreException;
|
||||
import org.osgi.service.prefs.Preferences;
|
||||
|
||||
/**
|
||||
* Collection of utilities for legacy support of older Scanner Discovery functionality.
|
||||
* This class is temporary and not intended to be used by clients.
|
||||
*
|
||||
* @noextend This class is not intended to be subclassed by clients.
|
||||
* @noinstantiate This class is not intended to be instantiated by clients.
|
||||
*/
|
||||
public class ScannerDiscoveryLegacySupport {
|
||||
/** Name of MBS language settings provider (from org.eclipse.cdt.managedbuilder.core) */
|
||||
public static final String MBS_LANGUAGE_SETTINGS_PROVIDER = "org.eclipse.cdt.managedbuilder.core.LanguageSettingsProvider"; //$NON-NLS-1$
|
||||
|
||||
private static String USE_LANGUAGE_SETTINGS_PROVIDERS_PREFERENCE = "enabled"; //$NON-NLS-1$
|
||||
// the default needs to be "false" for legacy projects to be open with old SD enabled for MBS provider
|
||||
private static boolean USE_LANGUAGE_SETTINGS_PROVIDERS_DEFAULT = false;
|
||||
private static final String PREFERENCES_QUALIFIER = CCorePlugin.PLUGIN_ID;
|
||||
private static final String LANGUAGE_SETTINGS_PROVIDERS_NODE = "languageSettingsProviders"; //$NON-NLS-1$
|
||||
|
||||
private static Map<String, String> legacyProfiles = null;
|
||||
|
||||
|
||||
private static Preferences getPreferences(IProject project) {
|
||||
if (project == null)
|
||||
return InstanceScope.INSTANCE.getNode(PREFERENCES_QUALIFIER).node(LANGUAGE_SETTINGS_PROVIDERS_NODE);
|
||||
else
|
||||
return new LocalProjectScope(project).getNode(PREFERENCES_QUALIFIER).node(LANGUAGE_SETTINGS_PROVIDERS_NODE);
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if Language Settings functionality is enabled for given project.
|
||||
*
|
||||
* @param project - project to check the preference
|
||||
* @return {@code true} if functionality is enabled
|
||||
*
|
||||
* @noreference This method is temporary and not intended to be referenced by clients.
|
||||
*/
|
||||
public static boolean isLanguageSettingsProvidersFunctionalityEnabled(IProject project) {
|
||||
Preferences pref = getPreferences(project);
|
||||
return pref.getBoolean(USE_LANGUAGE_SETTINGS_PROVIDERS_PREFERENCE, USE_LANGUAGE_SETTINGS_PROVIDERS_DEFAULT);
|
||||
}
|
||||
|
||||
/**
|
||||
* Enable/disable Language Settings functionality for the given project.
|
||||
*
|
||||
* @param project
|
||||
* @param value {@code true} to enable or {@code false} to disable the functionality.
|
||||
*
|
||||
* @noreference This method is temporary and not intended to be referenced by clients.
|
||||
*/
|
||||
public static void setLanguageSettingsProvidersFunctionalityEnabled(IProject project, boolean value) {
|
||||
Preferences pref = getPreferences(project);
|
||||
pref.putBoolean(USE_LANGUAGE_SETTINGS_PROVIDERS_PREFERENCE, value);
|
||||
try {
|
||||
pref.flush();
|
||||
} catch (BackingStoreException e) {
|
||||
CCorePlugin.log(e);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @noreference This is internal helper method to support compatibility with previous versions
|
||||
* which is not intended to be referenced by clients.
|
||||
*/
|
||||
public static boolean isMbsLanguageSettingsProviderOn(ICConfigurationDescription cfgDescription) {
|
||||
List<ILanguageSettingsProvider> lsProviders = cfgDescription.getLanguageSettingProviders();
|
||||
for (ILanguageSettingsProvider lsp : lsProviders) {
|
||||
if (MBS_LANGUAGE_SETTINGS_PROVIDER.equals(lsp.getId())) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* 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.
|
||||
*
|
||||
* @param id - can be id of either org.eclipse.cdt.managedbuilder.internal.core.InputType
|
||||
* or org.eclipse.cdt.managedbuilder.internal.core.ToolChain.
|
||||
* @return legacy scannerConfigDiscoveryProfileId.
|
||||
*/
|
||||
@SuppressWarnings("nls")
|
||||
public static String getDeprecatedLegacyProfiles(String id) {
|
||||
if (legacyProfiles == null) {
|
||||
legacyProfiles = new HashMap<String, String>();
|
||||
|
||||
// InputTypes
|
||||
legacyProfiles.put("cdt.managedbuild.tool.gnu.c.compiler.input", "org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileC|org.eclipse.cdt.make.core.GCCStandardMakePerFileProfile");
|
||||
legacyProfiles.put("cdt.managedbuild.tool.gnu.cpp.compiler.input", "org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileCPP|org.eclipse.cdt.make.core.GCCStandardMakePerFileProfile");
|
||||
legacyProfiles.put("cdt.managedbuild.tool.gnu.c.compiler.input.cygwin", "org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileC");
|
||||
legacyProfiles.put("cdt.managedbuild.tool.gnu.cpp.compiler.input.cygwin", "org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileCPP");
|
||||
|
||||
// Toolchains
|
||||
// legacyProfiles.put(, );
|
||||
}
|
||||
|
||||
return legacyProfiles.get(id);
|
||||
}
|
||||
|
||||
}
|
|
@ -27,6 +27,7 @@ import org.eclipse.cdt.core.cdtvariables.CdtVariableException;
|
|||
import org.eclipse.cdt.core.cdtvariables.ICdtVariable;
|
||||
import org.eclipse.cdt.core.cdtvariables.ICdtVariableManager;
|
||||
import org.eclipse.cdt.core.language.settings.providers.LanguageSettingsManager;
|
||||
import org.eclipse.cdt.core.language.settings.providers.ScannerDiscoveryLegacySupport;
|
||||
import org.eclipse.cdt.core.model.CModelException;
|
||||
import org.eclipse.cdt.core.model.CoreModel;
|
||||
import org.eclipse.cdt.core.model.CoreModelUtil;
|
||||
|
@ -2091,7 +2092,7 @@ public class PathEntryTranslator {
|
|||
|
||||
|
||||
IProject project = des.getProjectDescription().getProject();
|
||||
if (LanguageSettingsManager.isLanguageSettingsProvidersEnabled(project)) {
|
||||
if (ScannerDiscoveryLegacySupport.isLanguageSettingsProvidersFunctionalityEnabled(project)) {
|
||||
IResource rc = getResource(project, data.getPath());
|
||||
for (CLanguageData lData : lDatas) {
|
||||
list.addAll(LanguageSettingsManager.getSettingEntriesByKind(des, rc, lData.getLanguageId(), kind));
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2009, 2010 Andrew Gvozdev (Quoin Inc.) and others.
|
||||
* Copyright (c) 2009, 2011 Andrew Gvozdev and others.
|
||||
* All rights reserved. This program and the accompanying materials
|
||||
* are made available under the terms of the Eclipse Public License v1.0
|
||||
* which accompanies this distribution, and is available at
|
||||
* http://www.eclipse.org/legal/epl-v10.html
|
||||
*
|
||||
* Contributors:
|
||||
* Andrew Gvozdev (Quoin Inc.) - initial API and implementation
|
||||
* Andrew Gvozdev - initial API and implementation
|
||||
*******************************************************************************/
|
||||
|
||||
package org.eclipse.cdt.internal.core.language.settings.providers;
|
||||
|
@ -53,9 +53,9 @@ import org.eclipse.core.runtime.Status;
|
|||
*/
|
||||
public class LanguageSettingsExtensionManager {
|
||||
/** Name of the extension point for contributing language settings */
|
||||
final static String PROVIDER_EXTENSION_FULL_ID = "org.eclipse.cdt.core.LanguageSettingsProvider"; //$NON-NLS-1$
|
||||
final static String PROVIDER_EXTENSION_SIMPLE_ID = "LanguageSettingsProvider"; //$NON-NLS-1$
|
||||
|
||||
static final String PROVIDER_EXTENSION_FULL_ID = "org.eclipse.cdt.core.LanguageSettingsProvider"; //$NON-NLS-1$
|
||||
static final String PROVIDER_EXTENSION_SIMPLE_ID = "LanguageSettingsProvider"; //$NON-NLS-1$
|
||||
|
||||
static final String ELEM_PROVIDER = "provider"; //$NON-NLS-1$
|
||||
static final String ATTR_CLASS = "class"; //$NON-NLS-1$
|
||||
static final String ATTR_ID = "id"; //$NON-NLS-1$
|
||||
|
@ -613,4 +613,5 @@ public class LanguageSettingsExtensionManager {
|
|||
return provider.equals(extensionProvider);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -20,6 +20,7 @@ import java.util.Map;
|
|||
import org.eclipse.cdt.core.CCorePlugin;
|
||||
import org.eclipse.cdt.core.language.settings.providers.ILanguageSettingsProvider;
|
||||
import org.eclipse.cdt.core.language.settings.providers.LanguageSettingsSerializable;
|
||||
import org.eclipse.cdt.core.language.settings.providers.ScannerDiscoveryLegacySupport;
|
||||
import org.eclipse.cdt.core.settings.model.ICConfigurationDescription;
|
||||
import org.eclipse.cdt.core.settings.model.ICLanguageSettingEntry;
|
||||
import org.eclipse.cdt.core.settings.model.ICProjectDescription;
|
||||
|
@ -46,7 +47,6 @@ public class LanguageSettingsProvidersSerializer {
|
|||
private static final String SETTINGS_FOLDER_NAME = ".settings/"; //$NON-NLS-1$
|
||||
private static final String STORAGE_PROJECT_LANGUAGE_SETTINGS = "language.settings.xml"; //$NON-NLS-1$
|
||||
public static final char PROVIDER_DELIMITER = ';';
|
||||
private static final String MBS_LANGUAGE_SETTINGS_PROVIDER = "org.eclipse.cdt.managedbuilder.core.LanguageSettingsProvider";
|
||||
private static final String ELEM_PLUGIN = "plugin"; //$NON-NLS-1$
|
||||
private static final String ELEM_EXTENSION = "extension"; //$NON-NLS-1$
|
||||
private static final String ATTR_POINT = "point"; //$NON-NLS-1$
|
||||
|
@ -535,7 +535,7 @@ public class LanguageSettingsProvidersSerializer {
|
|||
for (ICConfigurationDescription cfgDescription : cfgDescriptions) {
|
||||
if (cfgDescription!=null) {
|
||||
List<ILanguageSettingsProvider> providers = new ArrayList<ILanguageSettingsProvider>(2);
|
||||
ILanguageSettingsProvider userProvider = getWorkspaceProvider(MBS_LANGUAGE_SETTINGS_PROVIDER);
|
||||
ILanguageSettingsProvider userProvider = getWorkspaceProvider(ScannerDiscoveryLegacySupport.MBS_LANGUAGE_SETTINGS_PROVIDER);
|
||||
providers.add(userProvider);
|
||||
cfgDescription.setLanguageSettingProviders(providers);
|
||||
}
|
||||
|
|
|
@ -16,7 +16,7 @@ import java.util.List;
|
|||
import java.util.Map;
|
||||
|
||||
import org.eclipse.cdt.core.CCorePlugin;
|
||||
import org.eclipse.cdt.core.language.settings.providers.LanguageSettingsManager;
|
||||
import org.eclipse.cdt.core.language.settings.providers.ScannerDiscoveryLegacySupport;
|
||||
import org.eclipse.cdt.core.parser.IScannerInfo;
|
||||
import org.eclipse.cdt.core.parser.IScannerInfoChangeListener;
|
||||
import org.eclipse.cdt.core.parser.IScannerInfoProvider;
|
||||
|
@ -39,7 +39,7 @@ public class ScannerInfoProviderProxy extends AbstractCExtensionProxy implements
|
|||
}
|
||||
|
||||
public IScannerInfo getScannerInformation(IResource resource) {
|
||||
if (LanguageSettingsManager.isLanguageSettingsProvidersEnabled(getProject())) {
|
||||
if (ScannerDiscoveryLegacySupport.isLanguageSettingsProvidersFunctionalityEnabled(getProject())) {
|
||||
LanguageSettingsScannerInfoProvider lsProvider = new LanguageSettingsScannerInfoProvider();
|
||||
return lsProvider.getScannerInformation(resource);
|
||||
}
|
||||
|
|
|
@ -49,6 +49,7 @@ import org.eclipse.cdt.core.language.settings.providers.LanguageSettingsBaseProv
|
|||
import org.eclipse.cdt.core.language.settings.providers.LanguageSettingsManager;
|
||||
import org.eclipse.cdt.core.language.settings.providers.LanguageSettingsManager_TBD;
|
||||
import org.eclipse.cdt.core.language.settings.providers.LanguageSettingsSerializable;
|
||||
import org.eclipse.cdt.core.language.settings.providers.ScannerDiscoveryLegacySupport;
|
||||
import org.eclipse.cdt.core.model.ILanguageDescriptor;
|
||||
import org.eclipse.cdt.core.model.LanguageManager;
|
||||
import org.eclipse.cdt.core.model.util.CDTListComparator;
|
||||
|
@ -66,6 +67,7 @@ import org.eclipse.cdt.ui.CUIPlugin;
|
|||
import org.eclipse.cdt.ui.newui.AbstractCPropertyTab;
|
||||
import org.eclipse.cdt.ui.newui.CDTPrefUtil;
|
||||
|
||||
|
||||
import org.eclipse.cdt.internal.ui.newui.LanguageSettingsImages;
|
||||
import org.eclipse.cdt.internal.ui.newui.Messages;
|
||||
import org.eclipse.cdt.internal.ui.newui.StatusMessageLine;
|
||||
|
@ -401,7 +403,7 @@ public class LanguageSettingsEntriesTab extends AbstractCPropertyTab {
|
|||
initialProvidersMap.put(cfgId, initialProviders);
|
||||
}
|
||||
}
|
||||
initialEnablement = LanguageSettingsManager.isLanguageSettingsProvidersEnabled(page.getProject());
|
||||
initialEnablement = ScannerDiscoveryLegacySupport.isLanguageSettingsProvidersFunctionalityEnabled(page.getProject());
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -452,7 +454,7 @@ public class LanguageSettingsEntriesTab extends AbstractCPropertyTab {
|
|||
if (masterPropertyPage!=null)
|
||||
enableProvidersCheckBox.setSelection(masterPropertyPage.isLanguageSettingsProvidersEnabled());
|
||||
else
|
||||
enableProvidersCheckBox.setSelection(LanguageSettingsManager.isLanguageSettingsProvidersEnabled(page.getProject()));
|
||||
enableProvidersCheckBox.setSelection(ScannerDiscoveryLegacySupport.isLanguageSettingsProvidersFunctionalityEnabled(page.getProject()));
|
||||
// display but disable the checkbox for file/folder resource
|
||||
enableProvidersCheckBox.setEnabled(page.isForProject()/* && !isConfigureMode*/);
|
||||
enableControls(enableProvidersCheckBox.getSelection());
|
||||
|
@ -1058,7 +1060,7 @@ providers: for (ILanguageSettingsProvider provider : providers) {
|
|||
boolean enabled = enableProvidersCheckBox.getSelection();
|
||||
if (masterPropertyPage!=null)
|
||||
enabled = masterPropertyPage.isLanguageSettingsProvidersEnabled();
|
||||
LanguageSettingsManager.setLanguageSettingsProvidersEnabled(page.getProject(), enabled);
|
||||
ScannerDiscoveryLegacySupport.setLanguageSettingsProvidersFunctionalityEnabled(page.getProject(), enabled);
|
||||
enableProvidersCheckBox.setSelection(enabled);
|
||||
}
|
||||
|
||||
|
|
|
@ -49,6 +49,7 @@ import org.eclipse.cdt.core.language.settings.providers.ILanguageSettingsProvide
|
|||
import org.eclipse.cdt.core.language.settings.providers.LanguageSettingsManager;
|
||||
import org.eclipse.cdt.core.language.settings.providers.LanguageSettingsManager_TBD;
|
||||
import org.eclipse.cdt.core.language.settings.providers.LanguageSettingsSerializable;
|
||||
import org.eclipse.cdt.core.language.settings.providers.ScannerDiscoveryLegacySupport;
|
||||
import org.eclipse.cdt.core.model.ILanguageDescriptor;
|
||||
import org.eclipse.cdt.core.model.LanguageManager;
|
||||
import org.eclipse.cdt.core.settings.model.ICConfigurationDescription;
|
||||
|
@ -65,6 +66,7 @@ import org.eclipse.cdt.ui.newui.AbstractCPropertyTab;
|
|||
import org.eclipse.cdt.ui.newui.CDTPrefUtil;
|
||||
import org.eclipse.cdt.utils.ui.controls.TabFolderLayout;
|
||||
|
||||
|
||||
import org.eclipse.cdt.internal.ui.newui.Messages;
|
||||
import org.eclipse.cdt.internal.ui.newui.StatusMessageLine;
|
||||
|
||||
|
@ -228,7 +230,7 @@ public class LanguageSettingsProviderTab extends AbstractCPropertyTab {
|
|||
initialProvidersByCfg.put(cfgId, initialProviders);
|
||||
}
|
||||
}
|
||||
initialEnablement = LanguageSettingsManager.isLanguageSettingsProvidersEnabled(page.getProject());
|
||||
initialEnablement = ScannerDiscoveryLegacySupport.isLanguageSettingsProvidersFunctionalityEnabled(page.getProject());
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -268,7 +270,7 @@ public class LanguageSettingsProviderTab extends AbstractCPropertyTab {
|
|||
if (masterPropertyPage!=null)
|
||||
enableProvidersCheckBox.setSelection(masterPropertyPage.isLanguageSettingsProvidersEnabled());
|
||||
else
|
||||
enableProvidersCheckBox.setSelection(LanguageSettingsManager.isLanguageSettingsProvidersEnabled(page.getProject()));
|
||||
enableProvidersCheckBox.setSelection(ScannerDiscoveryLegacySupport.isLanguageSettingsProvidersFunctionalityEnabled(page.getProject()));
|
||||
// display but disable the checkbox for file/folder resource
|
||||
enableProvidersCheckBox.setEnabled(page.isForProject() /*|| page.isForPrefs()*/);
|
||||
enableControls(enableProvidersCheckBox.getSelection());
|
||||
|
@ -982,7 +984,7 @@ public class LanguageSettingsProviderTab extends AbstractCPropertyTab {
|
|||
boolean enabled = enableProvidersCheckBox.getSelection();
|
||||
if (masterPropertyPage!=null)
|
||||
enabled = masterPropertyPage.isLanguageSettingsProvidersEnabled();
|
||||
LanguageSettingsManager.setLanguageSettingsProvidersEnabled(page.getProject(), enabled);
|
||||
ScannerDiscoveryLegacySupport.setLanguageSettingsProvidersFunctionalityEnabled(page.getProject(), enabled);
|
||||
enableProvidersCheckBox.setSelection(enabled);
|
||||
}
|
||||
|
||||
|
@ -1040,7 +1042,7 @@ public class LanguageSettingsProviderTab extends AbstractCPropertyTab {
|
|||
if (cfgDescription!=null) {
|
||||
newProvidersList = cfgDescription.getLanguageSettingProviders();
|
||||
}
|
||||
boolean newEnablement = LanguageSettingsManager.isLanguageSettingsProvidersEnabled(page.getProject());
|
||||
boolean newEnablement = ScannerDiscoveryLegacySupport.isLanguageSettingsProvidersFunctionalityEnabled(page.getProject());
|
||||
|
||||
// TODO
|
||||
boolean isEqualList = false;
|
||||
|
|
|
@ -66,8 +66,7 @@ class LanguageSettingsProvidersLabelProvider extends LabelProvider {
|
|||
protected String[] getOverlayKeys(ILanguageSettingsProvider provider) {
|
||||
String[] overlayKeys = new String[5];
|
||||
{ // TODO temporary for debugging
|
||||
// final String MBS_LANGUAGE_SETTINGS_PROVIDER = "org.eclipse.cdt.managedbuilder.core.LanguageSettingsProvider";
|
||||
// boolean isSpecial = provider.getId().equals(MBS_LANGUAGE_SETTINGS_PROVIDER);
|
||||
// boolean isSpecial = provider.getId().equals(LegacySupport.MBS_LANGUAGE_SETTINGS_PROVIDER);
|
||||
|
||||
ILanguageSettingsProvider rawProvider = LanguageSettingsManager.getRawProvider(provider);
|
||||
if (rawProvider instanceof LanguageSettingsSerializable) {
|
||||
|
|
|
@ -10,11 +10,12 @@
|
|||
*******************************************************************************/
|
||||
package org.eclipse.cdt.internal.ui.language.settings.providers;
|
||||
|
||||
import org.eclipse.cdt.core.language.settings.providers.LanguageSettingsManager;
|
||||
import org.eclipse.cdt.core.language.settings.providers.ScannerDiscoveryLegacySupport;
|
||||
import org.eclipse.cdt.ui.newui.AbstractPage;
|
||||
import org.eclipse.cdt.ui.newui.ICPropertyTab;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @noextend This class is not intended to be subclassed by clients.
|
||||
* @noinstantiate This class is not intended to be instantiated by clients.
|
||||
|
@ -29,7 +30,7 @@ public class Page_LanguageSettingsProviders extends AbstractPage {
|
|||
|
||||
public boolean isLanguageSettingsProvidersEnabled() {
|
||||
if (isLanguageSettingsProvidersEnabled==null) {
|
||||
isLanguageSettingsProvidersEnabled = LanguageSettingsManager.isLanguageSettingsProvidersEnabled(getProject());
|
||||
isLanguageSettingsProvidersEnabled = ScannerDiscoveryLegacySupport.isLanguageSettingsProvidersFunctionalityEnabled(getProject());
|
||||
}
|
||||
return isLanguageSettingsProvidersEnabled;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue