mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-21 21:52:10 +02:00
bug 376592: [sd90] Extend BuildDefinitions to allow defining language settings providers
This commit is contained in:
parent
a5fd3894d1
commit
d2c19fcd47
30 changed files with 1383 additions and 829 deletions
|
@ -25,6 +25,7 @@ public class AllLanguageSettingsProvidersMBSTests extends TestSuite {
|
|||
public AllLanguageSettingsProvidersMBSTests() {
|
||||
super(AllLanguageSettingsProvidersMBSTests.class.getName());
|
||||
|
||||
addTestSuite(LanguageSettingsProvidersMBSTest.class);
|
||||
addTestSuite(GCCBuildCommandParserTest.class);
|
||||
addTestSuite(BuiltinSpecsDetectorTest.class);
|
||||
addTestSuite(GCCBuiltinSpecsDetectorTest.class);
|
||||
|
|
|
@ -0,0 +1,189 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2010, 2012 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.managedbuilder.language.settings.providers.tests;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import org.eclipse.cdt.core.language.settings.providers.ILanguageSettingsProvider;
|
||||
import org.eclipse.cdt.core.language.settings.providers.ILanguageSettingsProvidersKeeper;
|
||||
import org.eclipse.cdt.core.language.settings.providers.LanguageSettingsManager;
|
||||
import org.eclipse.cdt.core.language.settings.providers.LanguageSettingsPersistenceProjectTests;
|
||||
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.core.testplugin.util.BaseTestCase;
|
||||
import org.eclipse.cdt.managedbuilder.core.IConfiguration;
|
||||
import org.eclipse.cdt.managedbuilder.core.ManagedBuildManager;
|
||||
import org.eclipse.cdt.managedbuilder.internal.dataprovider.ConfigurationDataProvider;
|
||||
import org.eclipse.cdt.managedbuilder.testplugin.ManagedBuildTestHelper;
|
||||
import org.eclipse.core.resources.IFile;
|
||||
import org.eclipse.core.resources.IProject;
|
||||
import org.eclipse.core.runtime.CoreException;
|
||||
|
||||
/**
|
||||
* Test creation of a new project in respect with language settings providers.
|
||||
*/
|
||||
public class LanguageSettingsProvidersMBSTest extends BaseTestCase {
|
||||
private static final String MBS_LANGUAGE_SETTINGS_PROVIDER_ID = ScannerDiscoveryLegacySupport.MBS_LANGUAGE_SETTINGS_PROVIDER_ID;
|
||||
private static final String USER_LANGUAGE_SETTINGS_PROVIDER_ID = ScannerDiscoveryLegacySupport.USER_LANGUAGE_SETTINGS_PROVIDER_ID;
|
||||
private static final String GCC_SPECS_DETECTOR_ID = "org.eclipse.cdt.managedbuilder.core.GCCBuiltinSpecsDetector";
|
||||
private static final String PROJECT_TYPE_EXECUTABLE_GNU = "cdt.managedbuild.target.gnu.exe";
|
||||
private static final String LANGUAGE_SETTINGS_PROJECT_XML = LanguageSettingsPersistenceProjectTests.LANGUAGE_SETTINGS_PROJECT_XML;
|
||||
private static final String LANGUAGE_SETTINGS_WORKSPACE_XML = LanguageSettingsPersistenceProjectTests.LANGUAGE_SETTINGS_WORKSPACE_XML;
|
||||
|
||||
@Override
|
||||
protected void setUp() throws Exception {
|
||||
super.setUp();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void tearDown() throws Exception {
|
||||
ManagedBuildTestHelper.removeProject(this.getName());
|
||||
super.tearDown();
|
||||
}
|
||||
|
||||
/**
|
||||
* Imitate a new Project Wizard. New Project Wizards really do these things in CDT.
|
||||
*/
|
||||
private static IProject imitateNewProjectWizard(String name, String projectTypeId) throws CoreException {
|
||||
IProject project = ManagedBuildTestHelper.createProject(name, projectTypeId);
|
||||
ManagedBuildTestHelper.addManagedBuildNature(project);
|
||||
|
||||
ICProjectDescription prjDescription = CoreModel.getDefault().getProjectDescription(project, true);
|
||||
assertNotNull(prjDescription);
|
||||
ICConfigurationDescription[] cfgDescriptions = prjDescription.getConfigurations();
|
||||
for (ICConfigurationDescription cfgDescription : cfgDescriptions) {
|
||||
assertNotNull(cfgDescription);
|
||||
assertTrue(cfgDescription instanceof ILanguageSettingsProvidersKeeper);
|
||||
|
||||
IConfiguration cfg = ManagedBuildManager.getConfigurationForDescription(cfgDescription);
|
||||
ConfigurationDataProvider.setDefaultLanguageSettingsProviders(project, cfg, cfgDescription);
|
||||
|
||||
assertTrue(((ILanguageSettingsProvidersKeeper) cfgDescription).getLanguageSettingProviders().size() > 0);
|
||||
}
|
||||
|
||||
CoreModel.getDefault().setProjectDescription(project, prjDescription);
|
||||
|
||||
return project;
|
||||
}
|
||||
|
||||
/**
|
||||
* Test new GNU Executable project.
|
||||
*/
|
||||
public void testGnuToolchainProviders() throws Exception {
|
||||
// create a new project imitating wizard
|
||||
IProject project = imitateNewProjectWizard(this.getName(), PROJECT_TYPE_EXECUTABLE_GNU);
|
||||
|
||||
// check that the language settings providers are in place.
|
||||
ICProjectDescription prjDescription = CoreModel.getDefault().getProjectDescription(project, false);
|
||||
assertNotNull(prjDescription);
|
||||
ICConfigurationDescription[] cfgDescriptions = prjDescription.getConfigurations();
|
||||
for (ICConfigurationDescription cfgDescription : cfgDescriptions) {
|
||||
assertNotNull(cfgDescription);
|
||||
assertTrue(cfgDescription instanceof ILanguageSettingsProvidersKeeper);
|
||||
|
||||
List<ILanguageSettingsProvider> providers = ((ILanguageSettingsProvidersKeeper) cfgDescription).getLanguageSettingProviders();
|
||||
{
|
||||
ILanguageSettingsProvider provider = providers.get(0);
|
||||
String id = provider.getId();
|
||||
assertEquals(USER_LANGUAGE_SETTINGS_PROVIDER_ID, id);
|
||||
assertEquals(false, LanguageSettingsManager.isPreferShared(id));
|
||||
assertEquals(false, LanguageSettingsManager.isWorkspaceProvider(provider));
|
||||
}
|
||||
{
|
||||
ILanguageSettingsProvider provider = providers.get(1);
|
||||
String id = provider.getId();
|
||||
assertEquals(MBS_LANGUAGE_SETTINGS_PROVIDER_ID, id);
|
||||
assertEquals(true, LanguageSettingsManager.isPreferShared(id));
|
||||
assertEquals(true, LanguageSettingsManager.isWorkspaceProvider(provider));
|
||||
}
|
||||
{
|
||||
ILanguageSettingsProvider provider = providers.get(2);
|
||||
String id = provider.getId();
|
||||
assertEquals(GCC_SPECS_DETECTOR_ID, id);
|
||||
assertEquals(true, LanguageSettingsManager.isPreferShared(id));
|
||||
assertEquals(true, LanguageSettingsManager.isWorkspaceProvider(provider));
|
||||
}
|
||||
assertEquals(3, providers.size());
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Test that no unnecessary storage file is created for language settings for default set
|
||||
* of language settings providers.
|
||||
*/
|
||||
public void testProjectPersistence_Defaults() throws Exception {
|
||||
// create a new project imitating wizard
|
||||
IProject project = imitateNewProjectWizard(this.getName(), PROJECT_TYPE_EXECUTABLE_GNU);
|
||||
|
||||
// double-check that the project contains language settings providers
|
||||
ICProjectDescription prjDescription = CoreModel.getDefault().getProjectDescription(project, false);
|
||||
assertNotNull(prjDescription);
|
||||
ICConfigurationDescription[] cfgDescriptions = prjDescription.getConfigurations();
|
||||
for (ICConfigurationDescription cfgDescription : cfgDescriptions) {
|
||||
assertNotNull(cfgDescription);
|
||||
assertTrue(cfgDescription instanceof ILanguageSettingsProvidersKeeper);
|
||||
|
||||
String[] defaultIds = ((ILanguageSettingsProvidersKeeper) cfgDescription).getDefaultLanguageSettingsProvidersIds();
|
||||
List<ILanguageSettingsProvider> providers = ((ILanguageSettingsProvidersKeeper) cfgDescription).getLanguageSettingProviders();
|
||||
assertEquals(defaultIds.length, providers.size());
|
||||
for (int i = 0; i < defaultIds.length; i++) {
|
||||
assertEquals(providers.get(i).getId(), defaultIds[i]);
|
||||
}
|
||||
assertTrue(defaultIds.length > 0);
|
||||
}
|
||||
|
||||
// no settings file in project area
|
||||
IFile xmlStorageFile = project.getFile(LANGUAGE_SETTINGS_PROJECT_XML);
|
||||
assertEquals(false, xmlStorageFile.exists());
|
||||
assertEquals(false, xmlStorageFile.getParent().exists()); // .settings folder
|
||||
|
||||
// no settings file in workspace area
|
||||
String xmlPrjWspStorageFileLocation = LanguageSettingsPersistenceProjectTests.getStoreLocationInWorkspaceArea(project.getName()+'.'+LANGUAGE_SETTINGS_WORKSPACE_XML);
|
||||
java.io.File xmlStorageFilePrjWsp = new java.io.File(xmlPrjWspStorageFileLocation);
|
||||
assertEquals(false, xmlStorageFilePrjWsp.exists());
|
||||
}
|
||||
|
||||
/**
|
||||
* Test that storage file is created for language settings for empty set of language settings providers.
|
||||
*/
|
||||
public void testProjectPersistence_NoProviders() throws Exception {
|
||||
// create a new project imitating wizard
|
||||
IProject project = imitateNewProjectWizard(this.getName(), PROJECT_TYPE_EXECUTABLE_GNU);
|
||||
|
||||
// remove language settings providers from the project
|
||||
ICProjectDescription prjDescription = CoreModel.getDefault().getProjectDescription(project, true);
|
||||
assertNotNull(prjDescription);
|
||||
ICConfigurationDescription[] cfgDescriptions = prjDescription.getConfigurations();
|
||||
for (ICConfigurationDescription cfgDescription : cfgDescriptions) {
|
||||
assertNotNull(cfgDescription);
|
||||
assertTrue(cfgDescription instanceof ILanguageSettingsProvidersKeeper);
|
||||
|
||||
((ILanguageSettingsProvidersKeeper) cfgDescription).setLanguageSettingProviders(new ArrayList<ILanguageSettingsProvider>());
|
||||
assertTrue(((ILanguageSettingsProvidersKeeper) cfgDescription).getLanguageSettingProviders().size() == 0);
|
||||
}
|
||||
|
||||
CoreModel.getDefault().setProjectDescription(project, prjDescription);
|
||||
|
||||
// settings file appears in project area
|
||||
IFile xmlStorageFile = project.getFile(LANGUAGE_SETTINGS_PROJECT_XML);
|
||||
assertEquals(true, xmlStorageFile.exists());
|
||||
|
||||
// no settings file in workspace area
|
||||
String xmlPrjWspStorageFileLocation = LanguageSettingsPersistenceProjectTests.getStoreLocationInWorkspaceArea(project.getName()+'.'+LANGUAGE_SETTINGS_WORKSPACE_XML);
|
||||
java.io.File xmlStorageFilePrjWsp = new java.io.File(xmlPrjWspStorageFileLocation);
|
||||
assertEquals(false, xmlStorageFilePrjWsp.exists());
|
||||
|
||||
}
|
||||
|
||||
}
|
|
@ -308,13 +308,14 @@
|
|||
</managedBuildRevision>
|
||||
<configuration
|
||||
id="org.eclipse.cdt.build.core.emptycfg"
|
||||
languageSettingsProviders="org.eclipse.cdt.ui.UserLanguageSettingsProvider;${Toolchain}"
|
||||
name="%cfg1_empty">
|
||||
</configuration>
|
||||
|
||||
<configuration
|
||||
id="org.eclipse.cdt.build.core.prefbase.cfg"
|
||||
name="%cfg1_base"
|
||||
>
|
||||
languageSettingsProviders="org.eclipse.cdt.ui.UserLanguageSettingsProvider;${Toolchain}"
|
||||
name="%cfg1_base">
|
||||
<toolChain
|
||||
id="org.eclipse.cdt.build.core.prefbase.toolchain"
|
||||
name="%toolChain.name"
|
||||
|
|
|
@ -263,7 +263,16 @@ Specifying this attribute is fully equivalent to specifying the "org.eclips
|
|||
<attribute name="errorParsers" type="string">
|
||||
<annotation>
|
||||
<documentation>
|
||||
The semi-colon separated list of the default error parsers to be used with this configuration. The list is ordered with the first error parser on the list invoked first, the second error parser second, and so on. The list may contain the error parsers defined by CDT and/or other installed error parser extensions. The list of error parsers to be used may be changed by the user on a per-configuration basis. When specified, this overrides the tool-chain errorParsers attribute.
|
||||
The semi-colon separated list of the default error parsers to be used with this configuration. The list is ordered with the first error parser on the list invoked first, the second error parser second, and so on. The list may contain the error parsers defined by CDT and/or other installed error parser extensions. The list of error parsers to be used may be changed by the user on a per-configuration basis. When specified, this overrides the tool-chain errorParsers attribute.
|
||||
</documentation>
|
||||
</annotation>
|
||||
</attribute>
|
||||
<attribute name="languageSettingsProviders" type="string">
|
||||
<annotation>
|
||||
<documentation>
|
||||
Semicolon-separated list of providers ID implementing ILanguageSettingProvider interface.
|
||||
This field could be amended with toolchain-level providers list by using ${Toolchain} keyword. Provider ID can be prefixed with "-" which will cause id to be removed from the preceeding list including providers defined with ${Toolchain} keyword.
|
||||
If this field is not specified, "org.eclipse.cdt.managedbuilder.core.MBSLanguageSettingsProvider" (MBS Language Settings Provider) is used by default.
|
||||
</documentation>
|
||||
</annotation>
|
||||
</attribute>
|
||||
|
@ -405,7 +414,14 @@ Specifying this attribute is fully equivalent to specifying the "org.eclips
|
|||
<attribute name="errorParsers" type="string">
|
||||
<annotation>
|
||||
<documentation>
|
||||
The semi-colon separated list of the default error parsers to be used with this tool-chain. The list is ordered with the first error parser on the list invoked first, the second error parser second, and so on. The list may contain the error parsers defined by CDT and/or other installed error parser extensions. When specified, this overrides the tool errorParsers attributes of the tool children of the tool-chain and the builder child of the tool-chain.
|
||||
The semi-colon separated list of the default error parsers to be used with this tool-chain. The list is ordered with the first error parser on the list invoked first, the second error parser second, and so on. The list may contain the error parsers defined by CDT and/or other installed error parser extensions. When specified, this overrides the tool errorParsers attributes of the tool children of the tool-chain and the builder child of the tool-chain.
|
||||
</documentation>
|
||||
</annotation>
|
||||
</attribute>
|
||||
<attribute name="languageSettingsProviders" type="string">
|
||||
<annotation>
|
||||
<documentation>
|
||||
Semicolon-separated list of providers ID implementing ILanguageSettingProvider interface. This list could be adjusted on configuration level in the corresponding attribute.
|
||||
</documentation>
|
||||
</annotation>
|
||||
</attribute>
|
||||
|
@ -732,14 +748,14 @@ The pathConverter of a toolchain applies for all tools of the toolchain except i
|
|||
<attribute name="customBuildStep" type="boolean">
|
||||
<annotation>
|
||||
<documentation>
|
||||
Specifies whether this Tool represents a user-define custom build step. The default is false. When True, the default value of the commandLinePattern attribute changes to “$(command)”.
|
||||
Specifies whether this Tool represents a user-define custom build step. The default is false. When True, the default value of the commandLinePattern attribute changes to "$(command)".
|
||||
</documentation>
|
||||
</annotation>
|
||||
</attribute>
|
||||
<attribute name="announcement" type="string">
|
||||
<annotation>
|
||||
<documentation>
|
||||
Specifies a string that is written to the build output prior to each invocation of the tool. The default value is “Invoking tool-name (tool-id)…”
|
||||
Specifies a string that is written to the build output prior to each invocation of the tool. The default value is "Invoking tool-name (tool-id)..."
|
||||
</documentation>
|
||||
<appInfo>
|
||||
<meta.attribute translatable="true"/>
|
||||
|
@ -1066,7 +1082,7 @@ Overrides language id specified with the languageId attribute.
|
|||
<attribute name="primaryInputType" type="string">
|
||||
<annotation>
|
||||
<documentation>
|
||||
The id of the input type that is used in determining the build “rules” for the output type and for the default name of the output file. The default is the input type with primaryInput == true.
|
||||
The id of the input type that is used in determining the build "rules" for the output type and for the default name of the output file. The default is the input type with primaryInput == true.
|
||||
</documentation>
|
||||
</annotation>
|
||||
</attribute>
|
||||
|
@ -1080,7 +1096,7 @@ Overrides language id specified with the languageId attribute.
|
|||
<attribute name="outputPrefix" type="string">
|
||||
<annotation>
|
||||
<documentation>
|
||||
Some tools produce files with a special prefix that must be specified. For example, a librarian on POSIX systems expects the output to be libtarget.a, so 'lib' would be the prefix. The default is to use the Tool “outputPrefix” attribute if primaryOutput is True, otherwise the default is an empty string. This attribute supports MBS configuration context macros.
|
||||
Some tools produce files with a special prefix that must be specified. For example, a librarian on POSIX systems expects the output to be libtarget.a, so 'lib' would be the prefix. The default is to use the Tool "outputPrefix" attribute if primaryOutput is True, otherwise the default is an empty string. This attribute supports MBS configuration context macros.
|
||||
</documentation>
|
||||
</annotation>
|
||||
</attribute>
|
||||
|
@ -2150,11 +2166,11 @@ If the "buildPathResolver" attribute is specified, the "pathDelim
|
|||
<documentation>
|
||||
Represents the applicability type for this enablement.
|
||||
Can contain the following values:
|
||||
UI_VISIBILITY – the given enablement expression specifies whether the option is to be visible in UI,
|
||||
UI_ENABLEMENT – the given enablement expression specifies the enable state of the controls that represent the option in UI,
|
||||
CMD_USAGE – the given enablement expression specifies whether the option is to be used in command line
|
||||
UI_VISIBILITY - the given enablement expression specifies whether the option is to be visible in UI,
|
||||
UI_ENABLEMENT - the given enablement expression specifies the enable state of the controls that represent the option in UI,
|
||||
CMD_USAGE - the given enablement expression specifies whether the option is to be used in command line
|
||||
CONTAINER_ATTRIBUTE - the given enablement expressions specifies thecontainer attribute value
|
||||
ALL – this value means the combination of all the above values.
|
||||
ALL - this value means the combination of all the above values.
|
||||
|
||||
Several types could be specified simultaneously using the "|" as a delimiter, e.g.:
|
||||
type="UI_VISIBILITY|CMD_USAGE"
|
||||
|
@ -2288,7 +2304,7 @@ Default value is true.
|
|||
<attribute name="value" type="string">
|
||||
<annotation>
|
||||
<documentation>
|
||||
Specifies the expected value. If the current option value matches the value specified in this attribute, the checkOption element is treated as true, otherwise – as false.
|
||||
Specifies the expected value. If the current option value matches the value specified in this attribute, the checkOption element is treated as true, otherwise - as false.
|
||||
The expected value could be specified either as a string that may contain build macros or as a regular expression. During the comparison, the build macros are resolved and the option value is checked to match the resulting string or regular expression. The way the expected value is specified and treated depends on the value of the isRegex attribute
|
||||
</documentation>
|
||||
</annotation>
|
||||
|
@ -2303,14 +2319,14 @@ The expected value could be specified either as a string that may contain build
|
|||
<attribute name="otherOptionId" type="string">
|
||||
<annotation>
|
||||
<documentation>
|
||||
The id of the option which is to be compared with the option specified with the “optionId” attribute. The default is the id of the option that holds this expression. If the “value” attribute is specified, both the “otherOptionId” and the “otherHolderId” attributes are ignored. When searching for the option to be checked, MBS will examine all the options the holder contains along with all superclasses of each option to find the option with the specified id.
|
||||
The id of the option which is to be compared with the option specified with the "optionId" attribute. The default is the id of the option that holds this expression. If the "value" attribute is specified, both the "otherOptionId" and the "otherHolderId" attributes are ignored. When searching for the option to be checked, MBS will examine all the options the holder contains along with all superclasses of each option to find the option with the specified id.
|
||||
</documentation>
|
||||
</annotation>
|
||||
</attribute>
|
||||
<attribute name="otherHolderId" type="string">
|
||||
<annotation>
|
||||
<documentation>
|
||||
The option holder id that holds the option specified with the “otherOptionId” attribute. The default is the id of the holder that holds the container of this expression. If the “value” attribute is specified, both the “otherOptionId” and the “otherHolderId” attributes are ingnored. When searching for the needed holder, MBS will examine all the holders the current configuration contains along with all superclasses of each holder in order to find the holder with the specified id.
|
||||
The option holder id that holds the option specified with the "otherOptionId" attribute. The default is the id of the holder that holds the container of this expression. If the "value" attribute is specified, both the "otherOptionId" and the "otherHolderId" attributes are ingnored. When searching for the needed holder, MBS will examine all the holders the current configuration contains along with all superclasses of each holder in order to find the holder with the specified id.
|
||||
</documentation>
|
||||
</annotation>
|
||||
</attribute>
|
||||
|
@ -2334,7 +2350,7 @@ The expected value could be specified either as a string that may contain build
|
|||
<attribute name="value" type="string" use="required">
|
||||
<annotation>
|
||||
<documentation>
|
||||
Specifies the expected value. If the current string specified in the “string” attribute matches the value specified in this attribute, the checkString element is treated as true, otherwise – as false.
|
||||
Specifies the expected value. If the current string specified in the "string" attribute matches the value specified in this attribute, the checkString element is treated as true, otherwise - as false.
|
||||
The expected value could be specified either as a string that might contain the build macros or as a regular expression.
|
||||
The way the value is specified and treated depends on the value of the isRegex attribute.
|
||||
</documentation>
|
||||
|
|
|
@ -159,7 +159,13 @@ public class CfgScannerConfigUtil {
|
|||
Set<String> profiles = new TreeSet<String>();
|
||||
|
||||
if (toolchain!=null) {
|
||||
String toolchainProfileId = toolchain.getScannerConfigDiscoveryProfileId();
|
||||
String toolchainProfileId = null;
|
||||
if (toolchain instanceof ToolChain) {
|
||||
// still allow a user a choice to select any legacy profiles
|
||||
toolchainProfileId = ((ToolChain) toolchain).getLegacyScannerConfigDiscoveryProfileId();
|
||||
} else {
|
||||
toolchainProfileId = toolchain.getScannerConfigDiscoveryProfileId();
|
||||
}
|
||||
if (toolchainProfileId!=null && toolchainProfileId.length()>0) {
|
||||
profiles.add(toolchainProfileId);
|
||||
}
|
||||
|
@ -227,7 +233,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$
|
||||
|
|
|
@ -46,6 +46,8 @@ public interface IConfiguration extends IBuildObject, IBuildObjectPropertiesCont
|
|||
// Schema element names
|
||||
public static final String CONFIGURATION_ELEMENT_NAME = "configuration"; //$NON-NLS-1$
|
||||
public static final String ERROR_PARSERS = "errorParsers"; //$NON-NLS-1$
|
||||
/** @since 8.1 */
|
||||
public static final String LANGUAGE_SETTINGS_PROVIDERS = "languageSettingsProviders"; //$NON-NLS-1$
|
||||
public static final String EXTENSION = "artifactExtension"; //$NON-NLS-1$
|
||||
public static final String PARENT = "parent"; //$NON-NLS-1$
|
||||
|
||||
|
@ -170,6 +172,14 @@ public interface IConfiguration extends IBuildObject, IBuildObjectPropertiesCont
|
|||
*/
|
||||
public String[] getErrorParserList();
|
||||
|
||||
/**
|
||||
* Returns default language settings providers IDs specified for the configuration.
|
||||
* @return default language settings providers IDs or {@code null}.
|
||||
*
|
||||
* @since 8.1
|
||||
*/
|
||||
public String[] getDefaultLanguageSettingsProviderIds();
|
||||
|
||||
/**
|
||||
* Projects have C or CC natures. Tools can specify a filter so they are not
|
||||
* misapplied to a project. This method allows the caller to retrieve a list
|
||||
|
|
|
@ -53,6 +53,9 @@ public interface IToolChain extends IBuildObject, IHoldsOptions {
|
|||
// The attribute name for the scanner info collector
|
||||
public static final String SCANNER_CONFIG_PROFILE_ID = "scannerConfigDiscoveryProfileId"; //$NON-NLS-1$
|
||||
|
||||
/** @since 8.1 */
|
||||
public static final String LANGUAGE_SETTINGS_PROVIDERS = "languageSettingsProviders"; //$NON-NLS-1$
|
||||
|
||||
/**
|
||||
* Returns the configuration that is the parent of this tool-chain.
|
||||
*
|
||||
|
@ -261,6 +264,15 @@ public interface IToolChain extends IBuildObject, IHoldsOptions {
|
|||
*/
|
||||
public void setErrorParserIds(String ids);
|
||||
|
||||
/**
|
||||
* Returns the default language settings providers IDs.
|
||||
*
|
||||
* @return the default language settings providers IDs separated by semicolon or {@code null} if none.
|
||||
*
|
||||
* @since 8.1
|
||||
*/
|
||||
public String getDefaultLanguageSettingsProviderIds();
|
||||
|
||||
/**
|
||||
* Returns the scanner config discovery profile id or <code>null</code> if none.
|
||||
*
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2003, 2011 IBM Corporation and others.
|
||||
* Copyright (c) 2003, 2012 IBM Corporation 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
|
||||
|
@ -92,6 +92,9 @@ public class Configuration extends BuildObject implements IConfiguration, IBuild
|
|||
|
||||
private static final String EMPTY_STRING = ""; //$NON-NLS-1$
|
||||
private static final String EMPTY_CFG_ID = "org.eclipse.cdt.build.core.emptycfg"; //$NON-NLS-1$
|
||||
private static final String LANGUAGE_SETTINGS_PROVIDER_DELIMITER = ";"; //$NON-NLS-1$
|
||||
private static final String LANGUAGE_SETTINGS_PROVIDER_NEGATION_SIGN = "-"; //$NON-NLS-1$
|
||||
private static final String $TOOLCHAIN = "${Toolchain}"; //$NON-NLS-1$
|
||||
|
||||
// Parent and children
|
||||
private String parentId;
|
||||
|
@ -102,6 +105,8 @@ public class Configuration extends BuildObject implements IConfiguration, IBuild
|
|||
private String cleanCommand;
|
||||
private String artifactExtension;
|
||||
private String errorParserIds;
|
||||
private String defaultLanguageSettingsProvidersAttribute;
|
||||
private String[] defaultLanguageSettingsProviderIds;
|
||||
private String prebuildStep;
|
||||
private String postbuildStep;
|
||||
private String preannouncebuildStep;
|
||||
|
@ -781,6 +786,9 @@ public class Configuration extends BuildObject implements IConfiguration, IBuild
|
|||
// Get the semicolon separated list of IDs of the error parsers
|
||||
errorParserIds = SafeStringInterner.safeIntern(element.getAttribute(ERROR_PARSERS));
|
||||
|
||||
// Get the initial/default language settings providers IDs
|
||||
defaultLanguageSettingsProvidersAttribute = SafeStringInterner.safeIntern(element.getAttribute(LANGUAGE_SETTINGS_PROVIDERS));
|
||||
|
||||
// Get the artifact extension
|
||||
artifactExtension = SafeStringInterner.safeIntern(element.getAttribute(EXTENSION));
|
||||
|
||||
|
@ -1453,6 +1461,62 @@ public class Configuration extends BuildObject implements IConfiguration, IBuild
|
|||
return set;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get value of attribute {@link IConfiguration#LANGUAGE_SETTINGS_PROVIDERS}
|
||||
* It not defined, it will try to pull the attribute from the parent configuration.
|
||||
*/
|
||||
private String getDefaultLanguageSettingsProvidersAttribute() {
|
||||
if (defaultLanguageSettingsProvidersAttribute == null && parent instanceof Configuration) {
|
||||
defaultLanguageSettingsProvidersAttribute = ((Configuration) parent).getDefaultLanguageSettingsProvidersAttribute();
|
||||
}
|
||||
|
||||
return defaultLanguageSettingsProvidersAttribute;
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*
|
||||
* This function will try to find default provider Ids specified in this instance.
|
||||
* It none defined, it will try to pull Ids from the parent configuration.
|
||||
*/
|
||||
@Override
|
||||
public String[] getDefaultLanguageSettingsProviderIds() {
|
||||
defaultLanguageSettingsProviderIds = null;
|
||||
if (defaultLanguageSettingsProviderIds == null) {
|
||||
defaultLanguageSettingsProvidersAttribute = getDefaultLanguageSettingsProvidersAttribute();
|
||||
if (defaultLanguageSettingsProvidersAttribute != null) {
|
||||
List<String> ids = new ArrayList<String>();
|
||||
String[] defaultIds = defaultLanguageSettingsProvidersAttribute.split(LANGUAGE_SETTINGS_PROVIDER_DELIMITER);
|
||||
for (String id : defaultIds) {
|
||||
if (id != null && !id.isEmpty()) {
|
||||
if (id.startsWith(LANGUAGE_SETTINGS_PROVIDER_NEGATION_SIGN)) {
|
||||
id = id.substring(1);
|
||||
ids.remove(id);
|
||||
} else if (!ids.contains(id)) {
|
||||
if (id.contains($TOOLCHAIN)) {
|
||||
IToolChain toolchain = getToolChain();
|
||||
if (toolchain != null) {
|
||||
String toolchainProvidersIds = toolchain.getDefaultLanguageSettingsProviderIds();
|
||||
if (toolchainProvidersIds != null) {
|
||||
ids.addAll(Arrays.asList(toolchainProvidersIds.split(LANGUAGE_SETTINGS_PROVIDER_DELIMITER)));
|
||||
}
|
||||
}
|
||||
} else {
|
||||
ids.add(id);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
defaultLanguageSettingsProviderIds = ids.toArray(new String[ids.size()]);
|
||||
} else if (parent != null) {
|
||||
defaultLanguageSettingsProviderIds = parent.getDefaultLanguageSettingsProviderIds();
|
||||
}
|
||||
}
|
||||
|
||||
return defaultLanguageSettingsProviderIds;
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.managedbuilder.core.IConfiguration#setArtifactExtension(java.lang.String)
|
||||
*/
|
||||
|
|
|
@ -17,6 +17,7 @@ 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.model.ILanguage;
|
||||
import org.eclipse.cdt.core.model.LanguageManager;
|
||||
import org.eclipse.cdt.core.settings.model.ICStorageElement;
|
||||
|
@ -24,6 +25,7 @@ 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;
|
||||
|
@ -37,6 +39,7 @@ 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;
|
||||
|
@ -1838,9 +1841,58 @@ public class InputType extends BuildObject implements IInputType {
|
|||
return id;
|
||||
}
|
||||
|
||||
public String getDiscoveryProfileIdAttribute(){
|
||||
if(buildInfoDicsoveryProfileId == null && superClass != null)
|
||||
return ((InputType)superClass).getDiscoveryProfileIdAttribute();
|
||||
/**
|
||||
* Check if legacy scanner discovery method should be used.
|
||||
*/
|
||||
private boolean isLegacyScannerDiscovery() {
|
||||
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 (isLegacyScannerDiscovery()) {
|
||||
return getLegacyDiscoveryProfileIdAttribute();
|
||||
}
|
||||
|
||||
return getDiscoveryProfileIdAttributeInternal();
|
||||
}
|
||||
|
||||
/**
|
||||
* Do not inline! This method needs to call itself recursively.
|
||||
*/
|
||||
private String getDiscoveryProfileIdAttributeInternal() {
|
||||
if (buildInfoDicsoveryProfileId == null && superClass instanceof InputType) {
|
||||
return ((InputType)superClass).getDiscoveryProfileIdAttributeInternal();
|
||||
}
|
||||
return buildInfoDicsoveryProfileId;
|
||||
}
|
||||
|
||||
|
|
|
@ -440,6 +440,12 @@ public class MultiConfiguration extends MultiItemsHolder implements
|
|||
return s;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String[] getDefaultLanguageSettingsProviderIds() {
|
||||
ManagedBuilderCorePlugin.error("Default Language Settings Providers are not supported in multiconfiguration mode"); //$NON-NLS-1$
|
||||
return null;
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.managedbuilder.core.IConfiguration#getFilteredTools()
|
||||
*/
|
||||
|
|
|
@ -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;
|
||||
|
@ -85,6 +88,7 @@ public class ToolChain extends HoldsOptions implements IToolChain, IMatchKeyProv
|
|||
private String targetToolIds;
|
||||
private String secondaryOutputIds;
|
||||
private Boolean isAbstract;
|
||||
private String defaultLanguageSettingsProviderIds;
|
||||
private String scannerConfigDiscoveryProfileId;
|
||||
private String versionsSupported;
|
||||
private String convertToId;
|
||||
|
@ -554,6 +558,9 @@ public class ToolChain extends HoldsOptions implements IToolChain, IMatchKeyProv
|
|||
// Get the target tool id
|
||||
targetToolIds = SafeStringInterner.safeIntern(element.getAttribute(TARGET_TOOL));
|
||||
|
||||
// Get the initial/default language settings providers IDs
|
||||
defaultLanguageSettingsProviderIds = element.getAttribute(LANGUAGE_SETTINGS_PROVIDERS);
|
||||
|
||||
// Get the scanner config discovery profile id
|
||||
scannerConfigDiscoveryProfileId = SafeStringInterner.safeIntern(element.getAttribute(SCANNER_CONFIG_PROFILE_ID));
|
||||
String tmp = element.getAttribute(RESOURCE_TYPE_BASED_DISCOVERY);
|
||||
|
@ -1529,15 +1536,65 @@ public class ToolChain extends HoldsOptions implements IToolChain, IMatchKeyProv
|
|||
setDirty(true);
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.managedbuilder.core.IToolChain#getScannerConfigDiscoveryProfileId()
|
||||
@Override
|
||||
public String getDefaultLanguageSettingsProviderIds() {
|
||||
if (defaultLanguageSettingsProviderIds == null && superClass instanceof IToolChain) {
|
||||
defaultLanguageSettingsProviderIds = ((IToolChain) superClass).getDefaultLanguageSettingsProviderIds();
|
||||
}
|
||||
return defaultLanguageSettingsProviderIds;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if legacy scanner discovery method should be used.
|
||||
*/
|
||||
private boolean isLegacyScannerDiscovery() {
|
||||
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;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get list of scanner discovery profiles supported by previous version.
|
||||
* @see ScannerDiscoveryLegacySupport#getDeprecatedLegacyProfiles(String)
|
||||
*
|
||||
* @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;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getScannerConfigDiscoveryProfileId() {
|
||||
if (scannerConfigDiscoveryProfileId == null) {
|
||||
if (getSuperClass() != null) {
|
||||
return getSuperClass().getScannerConfigDiscoveryProfileId();
|
||||
if (isLegacyScannerDiscovery()) {
|
||||
return getLegacyScannerConfigDiscoveryProfileId();
|
||||
}
|
||||
|
||||
return getScannerConfigDiscoveryProfileIdInternal();
|
||||
}
|
||||
|
||||
/**
|
||||
* Do not inline! This method needs to call itself recursively.
|
||||
*/
|
||||
private String getScannerConfigDiscoveryProfileIdInternal() {
|
||||
if (scannerConfigDiscoveryProfileId == null && superClass instanceof ToolChain) {
|
||||
return ((ToolChain) getSuperClass()).getScannerConfigDiscoveryProfileIdInternal();
|
||||
}
|
||||
return scannerConfigDiscoveryProfileId;
|
||||
}
|
||||
|
|
|
@ -20,6 +20,10 @@ import java.util.Map;
|
|||
import java.util.Set;
|
||||
|
||||
import org.eclipse.cdt.build.internal.core.scannerconfig2.CfgScannerConfigInfoFactory2;
|
||||
import org.eclipse.cdt.core.language.settings.providers.ILanguageSettingsProvider;
|
||||
import org.eclipse.cdt.core.language.settings.providers.ILanguageSettingsProvidersKeeper;
|
||||
import org.eclipse.cdt.core.language.settings.providers.LanguageSettingsManager;
|
||||
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;
|
||||
|
@ -509,11 +513,60 @@ public class ConfigurationDataProvider extends CConfigurationDataProvider implem
|
|||
// Update the ManagedBuildInfo in the ManagedBuildManager map. Doing this creates a barrier for subsequent
|
||||
// ManagedBuildManager#getBuildInfo(...) see Bug 305146 for more
|
||||
ManagedBuildManager.setLoaddedBuildInfo(cfgDescription.getProjectDescription().getProject(), info);
|
||||
setDefaultLanguageSettingsProvidersIds(cfg, cfgDescription);
|
||||
return cfg.getConfigurationData();
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
private static List<ILanguageSettingsProvider> getDefaultLanguageSettingsProviders(IConfiguration cfg) {
|
||||
List<ILanguageSettingsProvider> providers = new ArrayList<ILanguageSettingsProvider>();
|
||||
String[] ids = cfg.getDefaultLanguageSettingsProviderIds();
|
||||
if (ids != null) {
|
||||
for (String id : ids) {
|
||||
ILanguageSettingsProvider provider = null;
|
||||
if (!LanguageSettingsManager.isPreferShared(id)) {
|
||||
provider = LanguageSettingsManager.getExtensionProviderCopy(id, false);
|
||||
}
|
||||
if (provider == null) {
|
||||
provider = LanguageSettingsManager.getWorkspaceProvider(id);
|
||||
}
|
||||
providers.add(provider);
|
||||
}
|
||||
}
|
||||
|
||||
if (providers.isEmpty()) {
|
||||
providers = ScannerDiscoveryLegacySupport.getDefaultProvidersLegacy();
|
||||
}
|
||||
|
||||
return providers;
|
||||
}
|
||||
|
||||
private static void setDefaultLanguageSettingsProvidersIds(IConfiguration cfg, ICConfigurationDescription cfgDescription) {
|
||||
if (cfgDescription instanceof ILanguageSettingsProvidersKeeper) {
|
||||
List<ILanguageSettingsProvider> providers = getDefaultLanguageSettingsProviders(cfg);
|
||||
String[] ids = new String[providers.size()];
|
||||
for (int i = 0; i < ids.length; i++) {
|
||||
ILanguageSettingsProvider provider = providers.get(i);
|
||||
ids[i] = provider.getId();
|
||||
}
|
||||
((ILanguageSettingsProvidersKeeper) cfgDescription).setDefaultLanguageSettingsProvidersIds(ids);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public static void setDefaultLanguageSettingsProviders(IProject project, IConfiguration cfg, ICConfigurationDescription cfgDescription) {
|
||||
// propagate the preference to project properties
|
||||
boolean isPreferenceEnabled = ScannerDiscoveryLegacySupport.isLanguageSettingsProvidersFunctionalityEnabled(null);
|
||||
ScannerDiscoveryLegacySupport.setLanguageSettingsProvidersFunctionalityEnabled(project, isPreferenceEnabled);
|
||||
|
||||
if (cfgDescription instanceof ILanguageSettingsProvidersKeeper) {
|
||||
ConfigurationDataProvider.setDefaultLanguageSettingsProvidersIds(cfg, cfgDescription);
|
||||
List<ILanguageSettingsProvider> providers = ConfigurationDataProvider.getDefaultLanguageSettingsProviders(cfg);
|
||||
((ILanguageSettingsProvidersKeeper) cfgDescription).setLanguageSettingProviders(providers);
|
||||
}
|
||||
}
|
||||
|
||||
private boolean isPersistedCfg(ICConfigurationDescription cfgDescription){
|
||||
return cfgDescription.getSessionProperty(CFG_PERSISTED_PROPERTY) != null;
|
||||
}
|
||||
|
|
|
@ -1269,7 +1269,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
|
||||
|
@ -1591,7 +1590,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
|
||||
|
@ -1658,7 +1656,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"
|
||||
|
@ -1672,7 +1670,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
|
||||
|
@ -1705,10 +1703,11 @@
|
|||
|
||||
<toolChain
|
||||
archList="all"
|
||||
osList="linux,hpux,aix,qnx"
|
||||
id="cdt.managedbuild.toolchain.gnu.base"
|
||||
languageSettingsProviders="org.eclipse.cdt.managedbuilder.core.GCCBuildCommandParser;org.eclipse.cdt.managedbuilder.core.GCCBuiltinSpecsDetector"
|
||||
name="%ToolChainName.Linux"
|
||||
targetTool="cdt.managedbuild.tool.gnu.c.linker;cdt.managedbuild.tool.gnu.cpp.linker;cdt.managedbuild.tool.gnu.archiver"
|
||||
id="cdt.managedbuild.toolchain.gnu.base">
|
||||
osList="linux,hpux,aix,qnx"
|
||||
targetTool="cdt.managedbuild.tool.gnu.c.linker;cdt.managedbuild.tool.gnu.cpp.linker;cdt.managedbuild.tool.gnu.archiver">
|
||||
<targetPlatform
|
||||
id="cdt.managedbuild.target.gnu.platform.base"
|
||||
name="%PlatformName.Dbg"
|
||||
|
@ -1773,6 +1772,7 @@
|
|||
configurationEnvironmentSupplier="org.eclipse.cdt.managedbuilder.gnu.cygwin.GnuCygwinConfigurationEnvironmentSupplier"
|
||||
id="cdt.managedbuild.toolchain.gnu.cygwin.base"
|
||||
isToolChainSupported="org.eclipse.cdt.managedbuilder.gnu.cygwin.IsGnuCygwinToolChainSupported"
|
||||
languageSettingsProviders="org.eclipse.cdt.managedbuilder.core.GCCBuildCommandParser;org.eclipse.cdt.managedbuilder.core.GCCBuiltinSpecsDetector"
|
||||
name="%ToolChainName.Cygwin"
|
||||
osList="win32"
|
||||
targetTool="cdt.managedbuild.tool.gnu.cpp.linker.cygwin.base;cdt.managedbuild.tool.gnu.c.linker.cygwin.base;cdt.managedbuild.tool.gnu.archiver">
|
||||
|
@ -1842,6 +1842,7 @@
|
|||
configurationEnvironmentSupplier="org.eclipse.cdt.managedbuilder.gnu.mingw.MingwEnvironmentVariableSupplier"
|
||||
id="cdt.managedbuild.toolchain.gnu.mingw.base"
|
||||
isToolChainSupported="org.eclipse.cdt.managedbuilder.gnu.mingw.MingwIsToolChainSupported"
|
||||
languageSettingsProviders="org.eclipse.cdt.managedbuilder.core.GCCBuildCommandParser;org.eclipse.cdt.managedbuilder.core.GCCBuiltinSpecsDetector"
|
||||
name="%ToolChainName.MinGW"
|
||||
osList="win32"
|
||||
targetTool="cdt.managedbuild.tool.gnu.cpp.linker.mingw.base;cdt.managedbuild.tool.gnu.c.linker.mingw.base;cdt.managedbuild.tool.gnu.archiver">
|
||||
|
@ -2083,9 +2084,9 @@
|
|||
</toolChain>
|
||||
|
||||
<configuration
|
||||
id="cdt.managedbuild.config.gnu.base"
|
||||
cleanCommand="rm -rf"
|
||||
>
|
||||
id="cdt.managedbuild.config.gnu.base"
|
||||
languageSettingsProviders="org.eclipse.cdt.ui.UserLanguageSettingsProvider;org.eclipse.cdt.managedbuilder.core.MBSLanguageSettingsProvider;${Toolchain};-org.eclipse.cdt.managedbuilder.core.GCCBuildCommandParser">
|
||||
<enablement type="CONTAINER_ATTRIBUTE"
|
||||
attribute="artifactExtension"
|
||||
value="so"
|
||||
|
@ -2480,10 +2481,10 @@
|
|||
</projectType>
|
||||
|
||||
<configuration
|
||||
id="cdt.managedbuild.config.gnu.cygwin.base"
|
||||
cleanCommand="rm -rf"
|
||||
artifactExtension="exe"
|
||||
>
|
||||
cleanCommand="rm -rf"
|
||||
id="cdt.managedbuild.config.gnu.cygwin.base"
|
||||
languageSettingsProviders="org.eclipse.cdt.ui.UserLanguageSettingsProvider;org.eclipse.cdt.managedbuilder.core.MBSLanguageSettingsProvider;${Toolchain};-org.eclipse.cdt.managedbuilder.core.GCCBuildCommandParser">
|
||||
<enablement type="CONTAINER_ATTRIBUTE"
|
||||
attribute="artifactExtension"
|
||||
value="dll"
|
||||
|
@ -2878,10 +2879,10 @@
|
|||
</projectType>
|
||||
|
||||
<configuration
|
||||
id="cdt.managedbuild.config.gnu.mingw.base"
|
||||
cleanCommand="rm -rf"
|
||||
artifactExtension="exe"
|
||||
>
|
||||
cleanCommand="rm -rf"
|
||||
id="cdt.managedbuild.config.gnu.mingw.base"
|
||||
languageSettingsProviders="org.eclipse.cdt.ui.UserLanguageSettingsProvider;org.eclipse.cdt.managedbuilder.core.MBSLanguageSettingsProvider;${Toolchain};-org.eclipse.cdt.managedbuilder.core.GCCBuildCommandParser">
|
||||
<enablement type="CONTAINER_ATTRIBUTE"
|
||||
attribute="artifactExtension"
|
||||
value="dll"
|
||||
|
|
|
@ -207,6 +207,12 @@ public class TestConfiguration implements IConfiguration {
|
|||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String[] getDefaultLanguageSettingsProviderIds() {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ITool[] getFilteredTools() {
|
||||
// TODO Auto-generated method stub
|
||||
|
|
|
@ -364,6 +364,10 @@ public class TestToolchain extends HoldsOptions implements IToolChain {
|
|||
return false;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public String getDefaultLanguageSettingsProviderIds() {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -577,8 +577,13 @@
|
|||
>
|
||||
<enabledWhen>
|
||||
<adapt type="org.eclipse.core.resources.IProject">
|
||||
<test property="org.eclipse.core.resources.projectNature"
|
||||
value="org.eclipse.cdt.managedbuilder.core.managedBuildNature"/>
|
||||
<and>
|
||||
<test property="org.eclipse.core.resources.projectNature" value="org.eclipse.cdt.managedbuilder.core.managedBuildNature"/>
|
||||
<or>
|
||||
<test property="org.eclipse.cdt.ui.checkPreference" value="org.eclipse.cdt.ui:properties.sd.page.enable="/>
|
||||
<test property="org.eclipse.cdt.ui.checkPreference" value="org.eclipse.cdt.ui:properties.sd.page.enable=true"/>
|
||||
</or>
|
||||
</and>
|
||||
</adapt>
|
||||
</enabledWhen>
|
||||
</page>
|
||||
|
|
|
@ -223,6 +223,7 @@ public class Messages extends NLS {
|
|||
public static String PropertyPageDefsTab_9;
|
||||
public static String PropertyPageDefsTab_showIncludeFileTab;
|
||||
public static String PropertyPageDefsTab_showProvidersTab;
|
||||
public static String PropertyPageDefsTab_showScannerDiscoveryTab;
|
||||
public static String RefreshPolicyExceptionDialog_addDialogLabel;
|
||||
public static String RefreshPolicyExceptionDialog_AddExceptionInfoDialog_message;
|
||||
public static String RefreshPolicyExceptionDialog_AddExceptionInfoDialog_title;
|
||||
|
|
|
@ -274,7 +274,8 @@ PropertyPageDefsTab_7=Show disc. page names if they are unique. Else show profil
|
|||
PropertyPageDefsTab_8=Always show names + profile IDs
|
||||
PropertyPageDefsTab_9=Always show profile IDs only
|
||||
PropertyPageDefsTab_showIncludeFileTab=Display "Include Files" tab
|
||||
PropertyPageDefsTab_showProvidersTab=Display "Preprocessor Include Paths" tabs
|
||||
PropertyPageDefsTab_showProvidersTab=Display "Preprocessor Include Paths" tab and enable language settings providers
|
||||
PropertyPageDefsTab_showScannerDiscoveryTab=Display "Scanner Discovery" tab
|
||||
ProjectConvert_convertersList=Converters List
|
||||
|
||||
AbstractPrefPage_0=\ Preference settings will be applied to new projects \n only when there were no toolchains selected.
|
||||
|
|
|
@ -11,8 +11,8 @@
|
|||
*******************************************************************************/
|
||||
package org.eclipse.cdt.managedbuilder.ui.preferences;
|
||||
|
||||
import org.eclipse.cdt.core.language.settings.providers.ScannerDiscoveryLegacySupport;
|
||||
import org.eclipse.cdt.core.settings.model.ICResourceDescription;
|
||||
import org.eclipse.cdt.internal.ui.language.settings.providers.LanguageSettingsProvidersPage;
|
||||
import org.eclipse.cdt.managedbuilder.internal.ui.Messages;
|
||||
import org.eclipse.cdt.ui.newui.AbstractCPropertyTab;
|
||||
import org.eclipse.cdt.ui.newui.CDTPrefUtil;
|
||||
|
@ -39,6 +39,7 @@ public class PropertyPageDefsTab extends AbstractCPropertyTab {
|
|||
private Button show_mng;
|
||||
private Button show_tool;
|
||||
private Button show_exp;
|
||||
private Button show_sd;
|
||||
private Button show_providers_tab; // temporary checkbox for scanner discovery Providers tab
|
||||
private Button show_tipbox;
|
||||
|
||||
|
@ -76,6 +77,10 @@ public class PropertyPageDefsTab extends AbstractCPropertyTab {
|
|||
show_exp.setText(Messages.PropertyPageDefsTab_10);
|
||||
show_exp.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
|
||||
|
||||
show_sd = new Button(usercomp, SWT.CHECK);
|
||||
show_sd.setText(Messages.PropertyPageDefsTab_showScannerDiscoveryTab);
|
||||
show_sd.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
|
||||
|
||||
show_providers_tab = new Button(usercomp, SWT.CHECK);
|
||||
show_providers_tab.setText(Messages.PropertyPageDefsTab_showProvidersTab);
|
||||
show_providers_tab.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
|
||||
|
@ -123,7 +128,9 @@ public class PropertyPageDefsTab extends AbstractCPropertyTab {
|
|||
show_mng.setSelection(!CDTPrefUtil.getBool(CDTPrefUtil.KEY_NOMNG));
|
||||
show_tool.setSelection(!CDTPrefUtil.getBool(CDTPrefUtil.KEY_NOTOOLM));
|
||||
show_exp.setSelection(CDTPrefUtil.getBool(CDTPrefUtil.KEY_EXPORT));
|
||||
show_providers_tab.setSelection(!CDTPrefUtil.getBool(LanguageSettingsProvidersPage.KEY_NO_SHOW_PROVIDERS));
|
||||
// ensure default is "true" for scanner discovery tab
|
||||
show_sd.setSelection(!CDTPrefUtil.getStr(CDTPrefUtil.KEY_SHOW_SD).equals(Boolean.FALSE.toString()));
|
||||
show_providers_tab.setSelection(ScannerDiscoveryLegacySupport.isLanguageSettingsProvidersFunctionalityEnabled(null));
|
||||
show_tipbox.setSelection(CDTPrefUtil.getBool(CDTPrefUtil.KEY_TIPBOX));
|
||||
|
||||
switch (CDTPrefUtil.getInt(CDTPrefUtil.KEY_DISC_NAMES)) {
|
||||
|
@ -147,7 +154,9 @@ public class PropertyPageDefsTab extends AbstractCPropertyTab {
|
|||
CDTPrefUtil.setBool(CDTPrefUtil.KEY_NOMNG, !show_mng.getSelection());
|
||||
CDTPrefUtil.setBool(CDTPrefUtil.KEY_NOTOOLM, !show_tool.getSelection());
|
||||
CDTPrefUtil.setBool(CDTPrefUtil.KEY_EXPORT, show_exp.getSelection());
|
||||
CDTPrefUtil.setBool(LanguageSettingsProvidersPage.KEY_NO_SHOW_PROVIDERS, !show_providers_tab.getSelection());
|
||||
// ensure default is "true" for scanner discovery tab
|
||||
CDTPrefUtil.setStr(CDTPrefUtil.KEY_SHOW_SD, Boolean.toString(show_sd.getSelection()));
|
||||
ScannerDiscoveryLegacySupport.setLanguageSettingsProvidersFunctionalityEnabled(null, show_providers_tab.getSelection());
|
||||
CDTPrefUtil.setBool(CDTPrefUtil.KEY_TIPBOX, show_tipbox.getSelection());
|
||||
int x = 0;
|
||||
if (b_1.getSelection()) x = 1;
|
||||
|
@ -168,7 +177,8 @@ public class PropertyPageDefsTab extends AbstractCPropertyTab {
|
|||
show_mng.setSelection(true);
|
||||
show_tool.setSelection(true);
|
||||
show_exp.setSelection(false);
|
||||
show_providers_tab.setSelection(false);
|
||||
show_sd.setSelection(true);
|
||||
show_providers_tab.setSelection(true);
|
||||
show_tipbox.setSelection(false);
|
||||
b_0.setSelection(true);
|
||||
b_1.setSelection(false);
|
||||
|
|
|
@ -41,8 +41,9 @@ import org.eclipse.cdt.managedbuilder.core.ManagedBuildManager;
|
|||
import org.eclipse.cdt.managedbuilder.internal.core.Configuration;
|
||||
import org.eclipse.cdt.managedbuilder.internal.core.ManagedBuildInfo;
|
||||
import org.eclipse.cdt.managedbuilder.internal.core.ManagedProject;
|
||||
import org.eclipse.cdt.managedbuilder.ui.properties.ManagedBuilderUIPlugin;
|
||||
import org.eclipse.cdt.managedbuilder.internal.dataprovider.ConfigurationDataProvider;
|
||||
import org.eclipse.cdt.managedbuilder.internal.ui.Messages;
|
||||
import org.eclipse.cdt.managedbuilder.ui.properties.ManagedBuilderUIPlugin;
|
||||
import org.eclipse.cdt.ui.newui.CDTPrefUtil;
|
||||
import org.eclipse.cdt.ui.templateengine.IWizardDataPage;
|
||||
import org.eclipse.cdt.ui.templateengine.Template;
|
||||
|
@ -87,6 +88,7 @@ public class MBSWizardHandler extends CWizardHandler {
|
|||
|
||||
private static final String PROPERTY = "org.eclipse.cdt.build.core.buildType"; //$NON-NLS-1$
|
||||
private static final String PROP_VAL = PROPERTY + ".debug"; //$NON-NLS-1$
|
||||
|
||||
private static final String tooltip =
|
||||
Messages.CWizardHandler_1 +
|
||||
Messages.CWizardHandler_2 +
|
||||
|
@ -102,7 +104,7 @@ public class MBSWizardHandler extends CWizardHandler {
|
|||
private IToolChain[] savedToolChains = null;
|
||||
private IWizard wizard;
|
||||
private IWizardPage startingPage;
|
||||
// private EntryDescriptor entryDescriptor = null;
|
||||
// private EntryDescriptor entryDescriptor = null;
|
||||
private EntryInfo entryInfo;
|
||||
protected CfgHolder[] cfgs = null;
|
||||
protected IWizardPage[] customPages;
|
||||
|
@ -210,7 +212,7 @@ public class MBSWizardHandler extends CWizardHandler {
|
|||
|
||||
if(template != null){
|
||||
Map<String, String> valueStore = template.getValueStore();
|
||||
// valueStore.clear();
|
||||
// valueStore.clear();
|
||||
for (IWizardPage page : templatePages) {
|
||||
if (page instanceof UIWizardPage)
|
||||
valueStore.putAll(((UIWizardPage)page).getPageData());
|
||||
|
@ -591,11 +593,15 @@ public class MBSWizardHandler extends CWizardHandler {
|
|||
cfgDebug = cfgDes;
|
||||
if (cfgFirst == null) // select at least first configuration
|
||||
cfgFirst = cfgDes;
|
||||
|
||||
ConfigurationDataProvider.setDefaultLanguageSettingsProviders(project, config, cfgDes);
|
||||
|
||||
monitor.worked(work);
|
||||
}
|
||||
mngr.setProjectDescription(project, des);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
protected void doTemplatesPostProcess(IProject prj) {
|
||||
if(entryInfo == null)
|
||||
|
@ -607,7 +613,7 @@ public class MBSWizardHandler extends CWizardHandler {
|
|||
|
||||
List<IConfiguration> configs = new ArrayList<IConfiguration>();
|
||||
for (CfgHolder cfg : cfgs) {
|
||||
configs.add((IConfiguration)cfg.getConfiguration());
|
||||
configs.add(cfg.getConfiguration());
|
||||
}
|
||||
template.getTemplateInfo().setConfigurations(configs);
|
||||
|
||||
|
@ -834,5 +840,4 @@ public class MBSWizardHandler extends CWizardHandler {
|
|||
return super.canFinish();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -15,6 +15,7 @@ import java.lang.reflect.InvocationTargetException;
|
|||
import org.eclipse.cdt.core.CCProjectNature;
|
||||
import org.eclipse.cdt.core.CCorePlugin;
|
||||
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.core.settings.model.ICProjectDescriptionManager;
|
||||
import org.eclipse.cdt.core.settings.model.extension.CConfigurationData;
|
||||
|
@ -25,6 +26,7 @@ import org.eclipse.cdt.managedbuilder.internal.core.Configuration;
|
|||
import org.eclipse.cdt.managedbuilder.internal.core.ManagedBuildInfo;
|
||||
import org.eclipse.cdt.managedbuilder.internal.core.ManagedProject;
|
||||
import org.eclipse.cdt.managedbuilder.internal.core.ToolChain;
|
||||
import org.eclipse.cdt.managedbuilder.internal.dataprovider.ConfigurationDataProvider;
|
||||
import org.eclipse.cdt.managedbuilder.internal.ui.Messages;
|
||||
import org.eclipse.cdt.managedbuilder.ui.properties.ManagedBuilderUIPlugin;
|
||||
import org.eclipse.core.resources.IProject;
|
||||
|
@ -110,7 +112,10 @@ public class NewMakeProjFromExisting extends Wizard implements IImportWizard, IN
|
|||
IBuilder builder = config.getEditableBuilder();
|
||||
builder.setManagedBuildOn(false);
|
||||
CConfigurationData data = config.getConfigurationData();
|
||||
projDesc.createConfiguration(ManagedBuildManager.CFG_DATA_PROVIDER_ID, data);
|
||||
ICConfigurationDescription cfgDes = projDesc.createConfiguration(ManagedBuildManager.CFG_DATA_PROVIDER_ID, data);
|
||||
|
||||
ConfigurationDataProvider.setDefaultLanguageSettingsProviders(project, config, cfgDes);
|
||||
|
||||
monitor.worked(1);
|
||||
|
||||
pdMgr.setProjectDescription(project, projDesc);
|
||||
|
|
|
@ -12,6 +12,7 @@
|
|||
package org.eclipse.cdt.managedbuilder.ui.wizards;
|
||||
|
||||
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.core.settings.model.ICProjectDescriptionManager;
|
||||
import org.eclipse.cdt.core.settings.model.extension.CConfigurationData;
|
||||
|
@ -23,6 +24,7 @@ import org.eclipse.cdt.managedbuilder.internal.core.Configuration;
|
|||
import org.eclipse.cdt.managedbuilder.internal.core.ManagedBuildInfo;
|
||||
import org.eclipse.cdt.managedbuilder.internal.core.ManagedProject;
|
||||
import org.eclipse.cdt.managedbuilder.internal.core.ToolChain;
|
||||
import org.eclipse.cdt.managedbuilder.internal.dataprovider.ConfigurationDataProvider;
|
||||
import org.eclipse.cdt.managedbuilder.internal.ui.Messages;
|
||||
import org.eclipse.core.resources.IProject;
|
||||
import org.eclipse.core.runtime.CoreException;
|
||||
|
@ -71,6 +73,7 @@ public class STDWizardHandler extends MBSWizardHandler {
|
|||
|
||||
private void setProjectDescription(IProject project, boolean defaults, boolean onFinish, IProgressMonitor monitor)
|
||||
throws CoreException {
|
||||
|
||||
ICProjectDescriptionManager mngr = CoreModel.getDefault().getProjectDescriptionManager();
|
||||
ICProjectDescription des = mngr.createProjectDescription(project, false, !onFinish);
|
||||
ManagedBuildInfo info = ManagedBuildManager.createBuildInfo(project);
|
||||
|
@ -99,12 +102,18 @@ public class STDWizardHandler extends MBSWizardHandler {
|
|||
}
|
||||
cfg.setArtifactName(mProj.getDefaultArtifactName());
|
||||
CConfigurationData data = cfg.getConfigurationData();
|
||||
des.createConfiguration(ManagedBuildManager.CFG_DATA_PROVIDER_ID, data);
|
||||
ICConfigurationDescription cfgDes = des.createConfiguration(ManagedBuildManager.CFG_DATA_PROVIDER_ID, data);
|
||||
|
||||
ConfigurationDataProvider.setDefaultLanguageSettingsProviders(project, cfg, cfgDes);
|
||||
|
||||
monitor.worked(work);
|
||||
}
|
||||
mngr.setProjectDescription(project, des);
|
||||
}
|
||||
public boolean canCreateWithoutToolchain() { return true; }
|
||||
|
||||
public boolean canCreateWithoutToolchain() {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void convertProject(IProject proj, IProgressMonitor monitor) throws CoreException {
|
||||
|
|
|
@ -12,7 +12,9 @@
|
|||
package org.eclipse.cdt.core.language.settings.providers;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import org.eclipse.cdt.core.CCorePlugin;
|
||||
import org.eclipse.cdt.core.model.CoreModel;
|
||||
|
@ -41,20 +43,22 @@ public class ScannerDiscoveryLegacySupport {
|
|||
/** ID of MBS language settings provider (from org.eclipse.cdt.managedbuilder.core) */
|
||||
public static final String MBS_LANGUAGE_SETTINGS_PROVIDER_ID = "org.eclipse.cdt.managedbuilder.core.MBSLanguageSettingsProvider"; //$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 String DISABLE_LSP_PREFERENCE = "language.settings.providers.disabled"; //$NON-NLS-1$
|
||||
// the default for project needs to be "disabled" - for legacy projects to be open with old SD enabled for MBS provider
|
||||
private static boolean DISABLE_LSP_DEFAULT_PROJECT = true;
|
||||
private static boolean DISABLE_LSP_DEFAULT_WORKSPACE = false;
|
||||
private static final String PREFERENCES_QUALIFIER_CCORE = CCorePlugin.PLUGIN_ID;
|
||||
|
||||
private static Map<String, String> legacyProfiles = null;
|
||||
|
||||
/**
|
||||
* Get preferences node for org.eclipse.cdt.core.
|
||||
*/
|
||||
private static Preferences getPreferences(IProject project) {
|
||||
if (project == null) {
|
||||
return InstanceScope.INSTANCE.getNode(PREFERENCES_QUALIFIER).node(LANGUAGE_SETTINGS_PROVIDERS_NODE);
|
||||
return InstanceScope.INSTANCE.getNode(PREFERENCES_QUALIFIER_CCORE);
|
||||
} else {
|
||||
return new LocalProjectScope(project).getNode(PREFERENCES_QUALIFIER).node(LANGUAGE_SETTINGS_PROVIDERS_NODE);
|
||||
return new LocalProjectScope(project).getNode(PREFERENCES_QUALIFIER_CCORE);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -68,7 +72,8 @@ public class ScannerDiscoveryLegacySupport {
|
|||
*/
|
||||
public static boolean isLanguageSettingsProvidersFunctionalityEnabled(IProject project) {
|
||||
Preferences pref = getPreferences(project);
|
||||
return pref.getBoolean(USE_LANGUAGE_SETTINGS_PROVIDERS_PREFERENCE, USE_LANGUAGE_SETTINGS_PROVIDERS_DEFAULT);
|
||||
boolean defaultValue = project != null ? DISABLE_LSP_DEFAULT_PROJECT : DISABLE_LSP_DEFAULT_WORKSPACE;
|
||||
return !pref.getBoolean(DISABLE_LSP_PREFERENCE, defaultValue);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -81,7 +86,7 @@ public class ScannerDiscoveryLegacySupport {
|
|||
*/
|
||||
public static void setLanguageSettingsProvidersFunctionalityEnabled(IProject project, boolean value) {
|
||||
Preferences pref = getPreferences(project);
|
||||
pref.putBoolean(USE_LANGUAGE_SETTINGS_PROVIDERS_PREFERENCE, value);
|
||||
pref.putBoolean(DISABLE_LSP_PREFERENCE, !value);
|
||||
try {
|
||||
pref.flush();
|
||||
} catch (BackingStoreException e) {
|
||||
|
@ -147,4 +152,33 @@ public class ScannerDiscoveryLegacySupport {
|
|||
return providers;
|
||||
}
|
||||
|
||||
/**
|
||||
* 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");
|
||||
legacyProfiles.put("cdt.managedbuild.tool.xlc.c.compiler.input", "org.eclipse.cdt.managedbuilder.xlc.core.XLCManagedMakePerProjectProfile");
|
||||
legacyProfiles.put("cdt.managedbuild.tool.xlc.cpp.c.compiler.input", "org.eclipse.cdt.managedbuilder.xlc.core.XLCManagedMakePerProjectProfile");
|
||||
legacyProfiles.put("cdt.managedbuild.tool.xlc.cpp.compiler.input", "org.eclipse.cdt.managedbuilder.xlc.core.XLCManagedMakePerProjectProfileCPP");
|
||||
|
||||
// Toolchains
|
||||
}
|
||||
|
||||
return legacyProfiles.get(id);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -231,6 +231,7 @@ ExcludeAction.label=Exclude from Build...
|
|||
BuildConfigurationActionSet.descr=Build active configuration for the current project
|
||||
|
||||
BuildLoggingPreferencePage.name=Logging
|
||||
LanguageSettingsProvidersPropertyPage.name=Preprocessor Include Paths, Macros etc.
|
||||
|
||||
# Common Editor ruler actions
|
||||
AddTask.label=Add &Task...
|
||||
|
|
|
@ -3370,7 +3370,7 @@
|
|||
</enabledWhen>
|
||||
</page>
|
||||
<page
|
||||
name="Preprocessor Include Paths, Macros etc."
|
||||
name="%LanguageSettingsProvidersPropertyPage.name"
|
||||
id="org.eclipse.cdt.ui.language.settings"
|
||||
class="org.eclipse.cdt.internal.ui.language.settings.providers.LanguageSettingsProvidersPage"
|
||||
category="org.eclipse.cdt.ui.newui.Page_head_general">
|
||||
|
@ -3378,7 +3378,7 @@
|
|||
<adapt type="org.eclipse.core.resources.IResource">
|
||||
<and>
|
||||
<test property="org.eclipse.core.resources.projectNature" value="org.eclipse.cdt.core.cnature"/>
|
||||
<test property="org.eclipse.cdt.ui.checkPreference" value="org.eclipse.cdt.ui:properties.providers.tab.disable=false"/>
|
||||
<test property="org.eclipse.cdt.ui.checkPreference" value="org.eclipse.cdt.core:language.settings.providers.disabled=false"/>
|
||||
</and>
|
||||
</adapt>
|
||||
</enabledWhen>
|
||||
|
|
|
@ -47,6 +47,7 @@ import org.eclipse.cdt.core.language.settings.providers.ILanguageSettingsProvide
|
|||
import org.eclipse.cdt.core.language.settings.providers.ILanguageSettingsProvidersKeeper;
|
||||
import org.eclipse.cdt.core.language.settings.providers.LanguageSettingsBaseProvider;
|
||||
import org.eclipse.cdt.core.language.settings.providers.LanguageSettingsManager;
|
||||
import org.eclipse.cdt.core.language.settings.providers.ScannerDiscoveryLegacySupport;
|
||||
import org.eclipse.cdt.core.model.ILanguage;
|
||||
import org.eclipse.cdt.core.model.LanguageManager;
|
||||
import org.eclipse.cdt.core.settings.model.ICConfigurationDescription;
|
||||
|
@ -56,7 +57,6 @@ import org.eclipse.cdt.core.settings.model.ICSettingEntry;
|
|||
import org.eclipse.cdt.ui.CDTSharedImages;
|
||||
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;
|
||||
|
@ -1054,7 +1054,7 @@ public class LanguageSettingsEntriesTab extends AbstractCPropertyTab {
|
|||
List<ILanguageSettingsProvider> newProviders = new ArrayList<ILanguageSettingsProvider>(oldProviders.size());
|
||||
|
||||
// clear entries for a given resource for all languages where applicable
|
||||
providers: for (ILanguageSettingsProvider provider : oldProviders) {
|
||||
providers: for (ILanguageSettingsProvider provider : oldProviders) {
|
||||
ILanguageSettingsEditableProvider providerCopy = null;
|
||||
if (provider instanceof ILanguageSettingsEditableProvider) {
|
||||
for (TreeItem langItems : treeLanguages.getItems()) {
|
||||
|
@ -1113,7 +1113,7 @@ providers: for (ILanguageSettingsProvider provider : oldProviders) {
|
|||
|
||||
@Override
|
||||
public boolean canBeVisible() {
|
||||
if (CDTPrefUtil.getBool(LanguageSettingsProvidersPage.KEY_NO_SHOW_PROVIDERS)) {
|
||||
if (!ScannerDiscoveryLegacySupport.isLanguageSettingsProvidersFunctionalityEnabled(null)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
|
@ -49,6 +49,7 @@ import org.eclipse.cdt.core.language.settings.providers.ILanguageSettingsProvide
|
|||
import org.eclipse.cdt.core.language.settings.providers.ILanguageSettingsProvidersKeeper;
|
||||
import org.eclipse.cdt.core.language.settings.providers.LanguageSettingsManager;
|
||||
import org.eclipse.cdt.core.language.settings.providers.LanguageSettingsSerializableProvider;
|
||||
import org.eclipse.cdt.core.language.settings.providers.ScannerDiscoveryLegacySupport;
|
||||
import org.eclipse.cdt.core.settings.model.ICConfigurationDescription;
|
||||
import org.eclipse.cdt.core.settings.model.ICResourceDescription;
|
||||
import org.eclipse.cdt.ui.CDTSharedImages;
|
||||
|
@ -56,7 +57,6 @@ import org.eclipse.cdt.ui.CUIPlugin;
|
|||
import org.eclipse.cdt.ui.dialogs.ICOptionPage;
|
||||
import org.eclipse.cdt.ui.language.settings.providers.AbstractLanguageSettingProviderOptionPage;
|
||||
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;
|
||||
|
@ -1161,7 +1161,7 @@ public class LanguageSettingsProviderTab extends AbstractCPropertyTab {
|
|||
|
||||
@Override
|
||||
public boolean canBeVisible() {
|
||||
if (CDTPrefUtil.getBool(LanguageSettingsProvidersPage.KEY_NO_SHOW_PROVIDERS)) {
|
||||
if (!ScannerDiscoveryLegacySupport.isLanguageSettingsProvidersFunctionalityEnabled(null)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
|
@ -24,11 +24,6 @@ import org.eclipse.cdt.ui.newui.ICPropertyTab;
|
|||
* @noinstantiate This class is not intended to be instantiated by clients.
|
||||
*/
|
||||
public class LanguageSettingsProvidersPage extends AbstractPage {
|
||||
/** @since 5.4 */ // temporary key, subject to removal
|
||||
public static final String KEY_NO_SHOW_PROVIDERS = "properties.providers.tab.disable"; //$NON-NLS-1$
|
||||
/** @since 5.4 */ // temporary key, subject to removal
|
||||
public static final String KEY_NEWSD = "wizard.try.new.sd.enable"; //$NON-NLS-1$
|
||||
|
||||
private static boolean isLanguageSettingsProvidersEnabled = false;
|
||||
private static IProject project = null;
|
||||
|
||||
|
|
|
@ -40,6 +40,8 @@ public class CDTPrefUtil {
|
|||
public static final String KEY_EXPORT = "properties.export.page.enable"; //$NON-NLS-1$
|
||||
/** @since 5.2 Show the "Include Files" settings entry tab */
|
||||
public static final String KEY_SHOW_INC_FILES = "properties.includefiles.page.enable"; //$NON-NLS-1$
|
||||
/** @since 5.4 Show the "Scanner Discovery" tab*/
|
||||
public static final String KEY_SHOW_SD = "properties.sd.page.enable"; //$NON-NLS-1$
|
||||
/** @since 5.2 */
|
||||
public static final String KEY_TIPBOX = "properties.option.tipbox.enable"; //$NON-NLS-1$
|
||||
// string keys
|
||||
|
@ -261,18 +263,16 @@ public class CDTPrefUtil {
|
|||
private static final Object[] getListForDisplay(Object[][] input, int mode, Comparator<Object> cmp) {
|
||||
if (input == null || input.length == 0)
|
||||
return EMPTY_ARRAY;
|
||||
|
||||
if (input.length == 1) {
|
||||
return (input[0] == null) ?
|
||||
EMPTY_ARRAY :
|
||||
input[0];
|
||||
return (input[0] == null) ? EMPTY_ARRAY : input[0];
|
||||
}
|
||||
|
||||
Object[] s1 = input[0];
|
||||
if (s1 == null ||
|
||||
s1.length == 0)
|
||||
if (s1 == null || s1.length == 0)
|
||||
return EMPTY_ARRAY;
|
||||
if (getMultiCfgStringListDisplayMode() == DMODE_CONJUNCTION)
|
||||
{
|
||||
|
||||
if (getMultiCfgStringListDisplayMode() == DMODE_CONJUNCTION) {
|
||||
ArrayList<Object> lst = new ArrayList<Object>();
|
||||
for (int i=0; i<s1.length; i++) {
|
||||
if (s1[i] == null)
|
||||
|
@ -280,10 +280,12 @@ public class CDTPrefUtil {
|
|||
boolean found = true;
|
||||
for (int k = 1; k<input.length; k++) {
|
||||
Object[] s2 = input[k];
|
||||
if (s2 == null || s2.length == 0)
|
||||
if (s2 == null || s2.length == 0) {
|
||||
return EMPTY_ARRAY;
|
||||
if (i == 0)
|
||||
}
|
||||
if (i == 0) {
|
||||
Arrays.sort(s2, cmp);
|
||||
}
|
||||
if (Arrays.binarySearch(s2, s1[i], cmp) < 0) {
|
||||
found = false;
|
||||
break;
|
||||
|
@ -297,12 +299,13 @@ public class CDTPrefUtil {
|
|||
}
|
||||
TreeSet<Object> lst = new TreeSet<Object>(cmp); // set, to avoid doubles
|
||||
for (Object[] element : input) {
|
||||
if (element == null ||
|
||||
element.length == 0)
|
||||
if (element == null || element.length == 0) {
|
||||
continue;
|
||||
for (Object element2 : element)
|
||||
}
|
||||
for (Object element2 : element) {
|
||||
lst.add(element2);
|
||||
}
|
||||
}
|
||||
s1 = lst.toArray();
|
||||
Arrays.sort(s1, cmp);
|
||||
return s1;
|
||||
|
|
|
@ -522,18 +522,19 @@
|
|||
name="%TargetName.xlc.exe"
|
||||
projectMacroSupplier="org.eclipse.cdt.managedbuilder.xlc.ui.XLCProjectMacroSupplier">
|
||||
<configuration
|
||||
name="%ConfigName.Dbg"
|
||||
artifactExtension="exe"
|
||||
cleanCommand="rm -rf"
|
||||
errorParsers="org.eclipse.cdt.errorparsers.xlc.XlcErrorParser"
|
||||
id="cdt.managedbuild.config.xlc.exe.debug">
|
||||
id="cdt.managedbuild.config.xlc.exe.debug"
|
||||
languageSettingsProviders="org.eclipse.cdt.ui.UserLanguageSettingsProvider;org.eclipse.cdt.managedbuilder.core.MBSLanguageSettingsProvider;${Toolchain};-org.eclipse.cdt.managedbuilder.xlc.core.XlcBuildCommandParser"
|
||||
name="%ConfigName.Dbg">
|
||||
<toolChain
|
||||
archList="all"
|
||||
configurationEnvironmentSupplier="org.eclipse.cdt.managedbuilder.xlc.aix.AixConfigurationEnvironmentSupplier"
|
||||
id="cdt.managedbuild.toolchain.xlc.exe.debug"
|
||||
name="%ToolChainName.Dbg"
|
||||
osList="all"
|
||||
scannerConfigDiscoveryProfileId="org.eclipse.cdt.managedbuilder.xlc.core.XLCManagedMakePerProjectProfileCPP"
|
||||
languageSettingsProviders="org.eclipse.cdt.managedbuilder.xlc.core.XlcBuildCommandParser;org.eclipse.cdt.managedbuilder.xlc.core.XlcBuiltinSpecsDetector"
|
||||
targetTool="cdt.managedbuild.tool.xlc.c.linker.exe.debug;cdt.managedbuild.tool.xlc.cpp.linker.exe.debug">
|
||||
<targetPlatform
|
||||
id="cdt.managedbuild.target.xlc.platform.exe.debug"
|
||||
|
@ -592,13 +593,14 @@
|
|||
artifactExtension="exe"
|
||||
cleanCommand="rm -rf"
|
||||
errorParsers="org.eclipse.cdt.errorparsers.xlc.XlcErrorParser"
|
||||
languageSettingsProviders="org.eclipse.cdt.ui.UserLanguageSettingsProvider;org.eclipse.cdt.managedbuilder.core.MBSLanguageSettingsProvider;${Toolchain};-org.eclipse.cdt.managedbuilder.xlc.core.XlcBuildCommandParser"
|
||||
id="cdt.managedbuild.config.xlc.exe.release">
|
||||
<toolChain
|
||||
archList="all"
|
||||
id="cdt.managedbuild.toolchain.xlc.exe.release"
|
||||
name="%ToolChainName.Rel"
|
||||
osList="all"
|
||||
scannerConfigDiscoveryProfileId="org.eclipse.cdt.managedbuilder.xlc.core.XLCManagedMakePerProjectProfileCPP"
|
||||
languageSettingsProviders="org.eclipse.cdt.managedbuilder.xlc.core.XlcBuildCommandParser;org.eclipse.cdt.managedbuilder.xlc.core.XlcBuiltinSpecsDetector"
|
||||
targetTool="cdt.managedbuild.tool.xlc.c.linker.exe.release;cdt.managedbuild.tool.xlc.cpp.linker.exe.release">
|
||||
<targetPlatform
|
||||
id="cdt.managedbuild.target.xlc.platform.exe.release"
|
||||
|
@ -665,11 +667,13 @@
|
|||
cleanCommand="rm -rf"
|
||||
artifactExtension="so"
|
||||
errorParsers="org.eclipse.cdt.errorparsers.xlc.XlcErrorParser"
|
||||
languageSettingsProviders="org.eclipse.cdt.ui.UserLanguageSettingsProvider;org.eclipse.cdt.managedbuilder.core.MBSLanguageSettingsProvider;${Toolchain};-org.eclipse.cdt.managedbuilder.xlc.core.XlcBuildCommandParser"
|
||||
id="cdt.managedbuild.config.xlc.so.debug">
|
||||
<toolChain
|
||||
id="cdt.managedbuild.toolchain.xlc.so.debug"
|
||||
languageSettingsProviders="org.eclipse.cdt.managedbuilder.xlc.core.XlcBuildCommandParser;org.eclipse.cdt.managedbuilder.xlc.core.XlcBuiltinSpecsDetector"
|
||||
name="%ToolChainName.Dbg"
|
||||
targetTool="cdt.managedbuild.tool.xlc.c.linker.so.debug;cdt.managedbuild.tool.xlc.cpp.linker.so.debug"
|
||||
id="cdt.managedbuild.toolchain.xlc.so.debug">
|
||||
targetTool="cdt.managedbuild.tool.xlc.c.linker.so.debug;cdt.managedbuild.tool.xlc.cpp.linker.so.debug">
|
||||
<targetPlatform
|
||||
id="cdt.managedbuild.target.xlc.platform.so.debug"
|
||||
name="%PlatformName.Dbg"
|
||||
|
@ -727,11 +731,13 @@
|
|||
cleanCommand="rm -rf"
|
||||
artifactExtension="so"
|
||||
errorParsers="org.eclipse.cdt.errorparsers.xlc.XlcErrorParser"
|
||||
languageSettingsProviders="org.eclipse.cdt.ui.UserLanguageSettingsProvider;org.eclipse.cdt.managedbuilder.core.MBSLanguageSettingsProvider;${Toolchain};-org.eclipse.cdt.managedbuilder.xlc.core.XlcBuildCommandParser"
|
||||
id="cdt.managedbuild.config.xlc.so.release">
|
||||
<toolChain
|
||||
id="cdt.managedbuild.toolchain.xlc.so.release"
|
||||
languageSettingsProviders="org.eclipse.cdt.managedbuilder.xlc.core.XlcBuildCommandParser;org.eclipse.cdt.managedbuilder.xlc.core.XlcBuiltinSpecsDetector"
|
||||
name="%ToolChainName.Rel"
|
||||
targetTool="cdt.managedbuild.tool.xlc.c.linker.so.release;cdt.managedbuild.tool.xlc.cpp.linker.so.release"
|
||||
id="cdt.managedbuild.toolchain.xlc.so.release">
|
||||
targetTool="cdt.managedbuild.tool.xlc.c.linker.so.release;cdt.managedbuild.tool.xlc.cpp.linker.so.release">
|
||||
<targetPlatform
|
||||
id="cdt.managedbuild.target.xlc.platform.so.release"
|
||||
name="%PlatformName.Rel"
|
||||
|
@ -797,11 +803,13 @@
|
|||
cleanCommand="rm -rf"
|
||||
artifactExtension="lib"
|
||||
errorParsers="org.eclipse.cdt.errorparsers.xlc.XlcErrorParser"
|
||||
languageSettingsProviders="org.eclipse.cdt.ui.UserLanguageSettingsProvider;org.eclipse.cdt.managedbuilder.core.MBSLanguageSettingsProvider;${Toolchain};-org.eclipse.cdt.managedbuilder.xlc.core.XlcBuildCommandParser"
|
||||
id="cdt.managedbuild.config.xlc.lib.debug">
|
||||
<toolChain
|
||||
id="cdt.managedbuild.toolchain.xlc.lib.debug"
|
||||
languageSettingsProviders="org.eclipse.cdt.managedbuilder.xlc.core.XlcBuildCommandParser;org.eclipse.cdt.managedbuilder.xlc.core.XlcBuiltinSpecsDetector"
|
||||
name="%ToolChainName.Dbg"
|
||||
targetTool="cdt.managedbuild.tool.xlc.archiver.lib.debug"
|
||||
id="cdt.managedbuild.toolchain.xlc.lib.debug">
|
||||
targetTool="cdt.managedbuild.tool.xlc.archiver.lib.debug">
|
||||
<targetPlatform
|
||||
id="cdt.managedbuild.target.xlc.platform.lib.debug"
|
||||
name="%PlatformName.Dbg"
|
||||
|
@ -855,11 +863,13 @@
|
|||
cleanCommand="rm -rf"
|
||||
artifactExtension="lib"
|
||||
errorParsers="org.eclipse.cdt.errorparsers.xlc.XlcErrorParser"
|
||||
languageSettingsProviders="org.eclipse.cdt.ui.UserLanguageSettingsProvider;org.eclipse.cdt.managedbuilder.core.MBSLanguageSettingsProvider;${Toolchain};-org.eclipse.cdt.managedbuilder.xlc.core.XlcBuildCommandParser"
|
||||
id="cdt.managedbuild.config.xlc.lib.release">
|
||||
<toolChain
|
||||
id="cdt.managedbuild.toolchain.xlc.lib.release"
|
||||
languageSettingsProviders="org.eclipse.cdt.managedbuilder.xlc.core.XlcBuildCommandParser;org.eclipse.cdt.managedbuilder.xlc.core.XlcBuiltinSpecsDetector"
|
||||
name="%ToolChainName.Rel"
|
||||
targetTool="cdt.managedbuild.tool.xlc.archiver.lib.release"
|
||||
id="cdt.managedbuild.toolchain.xlc.lib.release">
|
||||
targetTool="cdt.managedbuild.tool.xlc.archiver.lib.release">
|
||||
<targetPlatform
|
||||
id="cdt.managedbuild.target.xlc.platform.lib.release"
|
||||
name="%PlatformName.Rel"
|
||||
|
@ -3732,7 +3742,6 @@
|
|||
id="cdt.managedbuild.tool.xlc.c.compiler.input"
|
||||
name="%inputType.c.name"
|
||||
primaryInput="true"
|
||||
scannerConfigDiscoveryProfileId="org.eclipse.cdt.managedbuilder.xlc.core.XLCManagedMakePerProjectProfile"
|
||||
sourceContentType="org.eclipse.cdt.core.cSource"
|
||||
sources="c">
|
||||
</inputType>
|
||||
|
@ -3753,7 +3762,6 @@
|
|||
id="cdt.managedbuild.tool.xlc.cpp.c.compiler.input"
|
||||
name="%inputType.c.name.2"
|
||||
primaryInput="true"
|
||||
scannerConfigDiscoveryProfileId="org.eclipse.cdt.managedbuilder.xlc.core.XLCManagedMakePerProjectProfile"
|
||||
sourceContentType="org.eclipse.cdt.core.cSource"
|
||||
sources="c">
|
||||
</inputType>
|
||||
|
@ -3763,7 +3771,6 @@
|
|||
id="cdt.managedbuild.tool.xlc.cpp.compiler.input"
|
||||
name="%inputType.cpp.name"
|
||||
primaryInput="true"
|
||||
scannerConfigDiscoveryProfileId="org.eclipse.cdt.managedbuilder.xlc.core.XLCManagedMakePerProjectProfileCPP"
|
||||
sourceContentType="org.eclipse.cdt.core.cxxSource"
|
||||
sources="c,C,cc,cxx,cpp">
|
||||
</inputType>
|
||||
|
|
Loading…
Add table
Reference in a new issue