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() {
|
public AllLanguageSettingsProvidersMBSTests() {
|
||||||
super(AllLanguageSettingsProvidersMBSTests.class.getName());
|
super(AllLanguageSettingsProvidersMBSTests.class.getName());
|
||||||
|
|
||||||
|
addTestSuite(LanguageSettingsProvidersMBSTest.class);
|
||||||
addTestSuite(GCCBuildCommandParserTest.class);
|
addTestSuite(GCCBuildCommandParserTest.class);
|
||||||
addTestSuite(BuiltinSpecsDetectorTest.class);
|
addTestSuite(BuiltinSpecsDetectorTest.class);
|
||||||
addTestSuite(GCCBuiltinSpecsDetectorTest.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());
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -307,14 +307,15 @@
|
||||||
fileVersion="4.0.0">
|
fileVersion="4.0.0">
|
||||||
</managedBuildRevision>
|
</managedBuildRevision>
|
||||||
<configuration
|
<configuration
|
||||||
id="org.eclipse.cdt.build.core.emptycfg"
|
id="org.eclipse.cdt.build.core.emptycfg"
|
||||||
name="%cfg1_empty">
|
languageSettingsProviders="org.eclipse.cdt.ui.UserLanguageSettingsProvider;${Toolchain}"
|
||||||
|
name="%cfg1_empty">
|
||||||
</configuration>
|
</configuration>
|
||||||
|
|
||||||
<configuration
|
<configuration
|
||||||
id="org.eclipse.cdt.build.core.prefbase.cfg"
|
id="org.eclipse.cdt.build.core.prefbase.cfg"
|
||||||
name="%cfg1_base"
|
languageSettingsProviders="org.eclipse.cdt.ui.UserLanguageSettingsProvider;${Toolchain}"
|
||||||
>
|
name="%cfg1_base">
|
||||||
<toolChain
|
<toolChain
|
||||||
id="org.eclipse.cdt.build.core.prefbase.toolchain"
|
id="org.eclipse.cdt.build.core.prefbase.toolchain"
|
||||||
name="%toolChain.name"
|
name="%toolChain.name"
|
||||||
|
|
|
@ -263,7 +263,16 @@ Specifying this attribute is fully equivalent to specifying the "org.eclips
|
||||||
<attribute name="errorParsers" type="string">
|
<attribute name="errorParsers" type="string">
|
||||||
<annotation>
|
<annotation>
|
||||||
<documentation>
|
<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>
|
</documentation>
|
||||||
</annotation>
|
</annotation>
|
||||||
</attribute>
|
</attribute>
|
||||||
|
@ -405,7 +414,14 @@ Specifying this attribute is fully equivalent to specifying the "org.eclips
|
||||||
<attribute name="errorParsers" type="string">
|
<attribute name="errorParsers" type="string">
|
||||||
<annotation>
|
<annotation>
|
||||||
<documentation>
|
<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>
|
</documentation>
|
||||||
</annotation>
|
</annotation>
|
||||||
</attribute>
|
</attribute>
|
||||||
|
@ -732,14 +748,14 @@ The pathConverter of a toolchain applies for all tools of the toolchain except i
|
||||||
<attribute name="customBuildStep" type="boolean">
|
<attribute name="customBuildStep" type="boolean">
|
||||||
<annotation>
|
<annotation>
|
||||||
<documentation>
|
<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>
|
</documentation>
|
||||||
</annotation>
|
</annotation>
|
||||||
</attribute>
|
</attribute>
|
||||||
<attribute name="announcement" type="string">
|
<attribute name="announcement" type="string">
|
||||||
<annotation>
|
<annotation>
|
||||||
<documentation>
|
<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>
|
</documentation>
|
||||||
<appInfo>
|
<appInfo>
|
||||||
<meta.attribute translatable="true"/>
|
<meta.attribute translatable="true"/>
|
||||||
|
@ -1066,7 +1082,7 @@ Overrides language id specified with the languageId attribute.
|
||||||
<attribute name="primaryInputType" type="string">
|
<attribute name="primaryInputType" type="string">
|
||||||
<annotation>
|
<annotation>
|
||||||
<documentation>
|
<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>
|
</documentation>
|
||||||
</annotation>
|
</annotation>
|
||||||
</attribute>
|
</attribute>
|
||||||
|
@ -1080,7 +1096,7 @@ Overrides language id specified with the languageId attribute.
|
||||||
<attribute name="outputPrefix" type="string">
|
<attribute name="outputPrefix" type="string">
|
||||||
<annotation>
|
<annotation>
|
||||||
<documentation>
|
<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>
|
</documentation>
|
||||||
</annotation>
|
</annotation>
|
||||||
</attribute>
|
</attribute>
|
||||||
|
@ -2150,11 +2166,11 @@ If the "buildPathResolver" attribute is specified, the "pathDelim
|
||||||
<documentation>
|
<documentation>
|
||||||
Represents the applicability type for this enablement.
|
Represents the applicability type for this enablement.
|
||||||
Can contain the following values:
|
Can contain the following values:
|
||||||
UI_VISIBILITY – the given enablement expression specifies whether the option is to be visible in UI,
|
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,
|
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
|
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
|
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.:
|
Several types could be specified simultaneously using the "|" as a delimiter, e.g.:
|
||||||
type="UI_VISIBILITY|CMD_USAGE"
|
type="UI_VISIBILITY|CMD_USAGE"
|
||||||
|
@ -2288,7 +2304,7 @@ Default value is true.
|
||||||
<attribute name="value" type="string">
|
<attribute name="value" type="string">
|
||||||
<annotation>
|
<annotation>
|
||||||
<documentation>
|
<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
|
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>
|
</documentation>
|
||||||
</annotation>
|
</annotation>
|
||||||
|
@ -2303,14 +2319,14 @@ The expected value could be specified either as a string that may contain build
|
||||||
<attribute name="otherOptionId" type="string">
|
<attribute name="otherOptionId" type="string">
|
||||||
<annotation>
|
<annotation>
|
||||||
<documentation>
|
<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>
|
</documentation>
|
||||||
</annotation>
|
</annotation>
|
||||||
</attribute>
|
</attribute>
|
||||||
<attribute name="otherHolderId" type="string">
|
<attribute name="otherHolderId" type="string">
|
||||||
<annotation>
|
<annotation>
|
||||||
<documentation>
|
<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>
|
</documentation>
|
||||||
</annotation>
|
</annotation>
|
||||||
</attribute>
|
</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">
|
<attribute name="value" type="string" use="required">
|
||||||
<annotation>
|
<annotation>
|
||||||
<documentation>
|
<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 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.
|
The way the value is specified and treated depends on the value of the isRegex attribute.
|
||||||
</documentation>
|
</documentation>
|
||||||
|
|
|
@ -38,7 +38,7 @@ public class CfgScannerConfigUtil {
|
||||||
IInputType inType = context.getInputType();
|
IInputType inType = context.getInputType();
|
||||||
boolean adjust = false;
|
boolean adjust = false;
|
||||||
CfgInfoContext newContext = context;
|
CfgInfoContext newContext = context;
|
||||||
|
|
||||||
if(tool != null){
|
if(tool != null){
|
||||||
if(inType != null){
|
if(inType != null){
|
||||||
if(!tool.hasScannerConfigSettings(inType)){
|
if(!tool.hasScannerConfigSettings(inType)){
|
||||||
|
@ -59,10 +59,10 @@ public class CfgScannerConfigUtil {
|
||||||
inType = null;
|
inType = null;
|
||||||
adjust = true;
|
adjust = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(rcInfo != null){
|
if(rcInfo != null){
|
||||||
ToolChain tc = getToolChain(rcInfo);
|
ToolChain tc = getToolChain(rcInfo);
|
||||||
|
|
||||||
if(tc != null){
|
if(tc != null){
|
||||||
if(!tc.hasScannerConfigSettings()){
|
if(!tc.hasScannerConfigSettings()){
|
||||||
adjust = true;
|
adjust = true;
|
||||||
|
@ -85,23 +85,23 @@ public class CfgScannerConfigUtil {
|
||||||
// adjust = true;
|
// adjust = true;
|
||||||
// }
|
// }
|
||||||
// }
|
// }
|
||||||
|
|
||||||
if(adjust){
|
if(adjust){
|
||||||
if(rcInfo == null)
|
if(rcInfo == null)
|
||||||
newContext = new CfgInfoContext(context.getConfiguration());
|
newContext = new CfgInfoContext(context.getConfiguration());
|
||||||
else
|
else
|
||||||
newContext = new CfgInfoContext(rcInfo, tool, inType);
|
newContext = new CfgInfoContext(rcInfo, tool, inType);
|
||||||
}
|
}
|
||||||
|
|
||||||
return newContext;
|
return newContext;
|
||||||
}
|
}
|
||||||
|
|
||||||
private static ToolChain getToolChain(IResourceInfo rcInfo){
|
private static ToolChain getToolChain(IResourceInfo rcInfo){
|
||||||
return rcInfo instanceof FolderInfo ?
|
return rcInfo instanceof FolderInfo ?
|
||||||
(ToolChain)((FolderInfo)rcInfo).getToolChain()
|
(ToolChain)((FolderInfo)rcInfo).getToolChain()
|
||||||
: (ToolChain)((ResourceConfiguration)rcInfo).getBaseToolChain();
|
: (ToolChain)((ResourceConfiguration)rcInfo).getBaseToolChain();
|
||||||
}
|
}
|
||||||
|
|
||||||
public static String getDefaultProfileId(CfgInfoContext context, boolean searchFirstIfNone){
|
public static String getDefaultProfileId(CfgInfoContext context, boolean searchFirstIfNone){
|
||||||
String id = null;
|
String id = null;
|
||||||
if(context.getInputType() != null)
|
if(context.getInputType() != null)
|
||||||
|
@ -116,19 +116,19 @@ public class CfgScannerConfigUtil {
|
||||||
if(id == null){
|
if(id == null){
|
||||||
id = ((Configuration)context.getConfiguration()).getDiscoveryProfileId();
|
id = ((Configuration)context.getConfiguration()).getDiscoveryProfileId();
|
||||||
}
|
}
|
||||||
|
|
||||||
if(id == null && searchFirstIfNone){
|
if(id == null && searchFirstIfNone){
|
||||||
id = getFirstProfileId(context.getConfiguration().getFilteredTools());
|
id = getFirstProfileId(context.getConfiguration().getFilteredTools());
|
||||||
}
|
}
|
||||||
return id;
|
return id;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static String getFirstProfileId(ITool[] tools){
|
public static String getFirstProfileId(ITool[] tools){
|
||||||
String id = null;
|
String id = null;
|
||||||
for(int i = 0; i < tools.length; i++){
|
for(int i = 0; i < tools.length; i++){
|
||||||
ITool tool = tools[i];
|
ITool tool = tools[i];
|
||||||
IInputType[] types = tool.getInputTypes();
|
IInputType[] types = tool.getInputTypes();
|
||||||
|
|
||||||
if(types.length != 0){
|
if(types.length != 0){
|
||||||
for(int k = 0; k < types.length; k++){
|
for(int k = 0; k < types.length; k++){
|
||||||
id = types[k].getDiscoveryProfileId(tool);
|
id = types[k].getDiscoveryProfileId(tool);
|
||||||
|
@ -142,24 +142,30 @@ public class CfgScannerConfigUtil {
|
||||||
if(id != null)
|
if(id != null)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
return id;
|
return id;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Search for toolchain's discovery profiles. Discovery profiles could be
|
* Search for toolchain's discovery profiles. Discovery profiles could be
|
||||||
* specified on toolchain level, input types level or in their super-classes.
|
* specified on toolchain level, input types level or in their super-classes.
|
||||||
*
|
*
|
||||||
* @param toolchain - toolchain to search for scanner discovery profiles.
|
* @param toolchain - toolchain to search for scanner discovery profiles.
|
||||||
* @return all available discovery profiles in given toolchain
|
* @return all available discovery profiles in given toolchain
|
||||||
*/
|
*/
|
||||||
public static Set<String> getAllScannerDiscoveryProfileIds(IToolChain toolchain) {
|
public static Set<String> getAllScannerDiscoveryProfileIds(IToolChain toolchain) {
|
||||||
Assert.isNotNull(toolchain);
|
Assert.isNotNull(toolchain);
|
||||||
|
|
||||||
Set<String> profiles = new TreeSet<String>();
|
Set<String> profiles = new TreeSet<String>();
|
||||||
|
|
||||||
if (toolchain!=null) {
|
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) {
|
if (toolchainProfileId!=null && toolchainProfileId.length()>0) {
|
||||||
profiles.add(toolchainProfileId);
|
profiles.add(toolchainProfileId);
|
||||||
}
|
}
|
||||||
|
@ -172,15 +178,15 @@ public class CfgScannerConfigUtil {
|
||||||
profiles.addAll(getAllScannerDiscoveryProfileIds(superClass));
|
profiles.addAll(getAllScannerDiscoveryProfileIds(superClass));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return profiles;
|
return profiles;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Search for tool's discovery profiles. Discovery profiles could be retrieved
|
* Search for tool's discovery profiles. Discovery profiles could be retrieved
|
||||||
* from tool/input type super-class. Input type could hold list of profiles
|
* from tool/input type super-class. Input type could hold list of profiles
|
||||||
* separated by pipe character '|'.
|
* separated by pipe character '|'.
|
||||||
*
|
*
|
||||||
* @param tool - tool to search for scanner discovery profiles
|
* @param tool - tool to search for scanner discovery profiles
|
||||||
* @return all available discovery profiles in given configuration
|
* @return all available discovery profiles in given configuration
|
||||||
*/
|
*/
|
||||||
|
@ -192,42 +198,42 @@ public class CfgScannerConfigUtil {
|
||||||
new Object[] { Tool.class.getName() });
|
new Object[] { Tool.class.getName() });
|
||||||
throw new UnsupportedOperationException(msg);
|
throw new UnsupportedOperationException(msg);
|
||||||
}
|
}
|
||||||
|
|
||||||
Set<String> profiles = new TreeSet<String>();
|
Set<String> profiles = new TreeSet<String>();
|
||||||
|
|
||||||
for (IInputType inputType : ((Tool) tool).getAllInputTypes()) {
|
for (IInputType inputType : ((Tool) tool).getAllInputTypes()) {
|
||||||
for (String profileId : getAllScannerDiscoveryProfileIds(inputType)) {
|
for (String profileId : getAllScannerDiscoveryProfileIds(inputType)) {
|
||||||
profiles.add(profileId);
|
profiles.add(profileId);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
ITool superClass = tool.getSuperClass();
|
ITool superClass = tool.getSuperClass();
|
||||||
if (superClass!=null) {
|
if (superClass!=null) {
|
||||||
profiles.addAll(getAllScannerDiscoveryProfileIds(superClass));
|
profiles.addAll(getAllScannerDiscoveryProfileIds(superClass));
|
||||||
}
|
}
|
||||||
return profiles;
|
return profiles;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Search for input type's discovery profiles. Discovery profiles could be specified
|
* Search for input type's discovery profiles. Discovery profiles could be specified
|
||||||
* on input type super-class. Input type could hold list of profiles
|
* on input type super-class. Input type could hold list of profiles
|
||||||
* separated by pipe character '|'.
|
* separated by pipe character '|'.
|
||||||
*
|
*
|
||||||
* @param inputType - input type to search for scanner discovery profiles
|
* @param inputType - input type to search for scanner discovery profiles
|
||||||
* @return all available discovery profiles in given configuration
|
* @return all available discovery profiles in given configuration
|
||||||
*/
|
*/
|
||||||
private static Set<String> getAllScannerDiscoveryProfileIds(IInputType inputType) {
|
private static Set<String> getAllScannerDiscoveryProfileIds(IInputType inputType) {
|
||||||
Assert.isNotNull(inputType);
|
Assert.isNotNull(inputType);
|
||||||
|
|
||||||
if ( ! (inputType instanceof InputType) ) {
|
if ( ! (inputType instanceof InputType) ) {
|
||||||
String msg = MessageFormat.format(ManagedMakeMessages.getString("CfgScannerConfigUtil_ErrorNotSupported"), //$NON-NLS-1$
|
String msg = MessageFormat.format(ManagedMakeMessages.getString("CfgScannerConfigUtil_ErrorNotSupported"), //$NON-NLS-1$
|
||||||
new Object[] { InputType.class.getName() });
|
new Object[] { InputType.class.getName() });
|
||||||
throw new UnsupportedOperationException(msg);
|
throw new UnsupportedOperationException(msg);
|
||||||
}
|
}
|
||||||
|
|
||||||
Set<String> profiles = new TreeSet<String>();
|
Set<String> profiles = new TreeSet<String>();
|
||||||
|
|
||||||
String attribute = ((InputType) inputType).getDiscoveryProfileIdAttribute();
|
String attribute = ((InputType) inputType).getLegacyDiscoveryProfileIdAttribute();
|
||||||
if (attribute!=null) {
|
if (attribute!=null) {
|
||||||
// FIXME: temporary; we should add new method to IInputType instead of that
|
// FIXME: temporary; we should add new method to IInputType instead of that
|
||||||
for (String profileId : attribute.split("\\|")) { //$NON-NLS-1$
|
for (String profileId : attribute.split("\\|")) { //$NON-NLS-1$
|
||||||
|
|
|
@ -24,14 +24,14 @@ import org.eclipse.core.runtime.IPath;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A tool-integrator defines default configurations as children of the project type.
|
* A tool-integrator defines default configurations as children of the project type.
|
||||||
* These provide a template for the configurations added to the user's project,
|
* These provide a template for the configurations added to the user's project,
|
||||||
* which are stored in the project's .cproject file.
|
* which are stored in the project's .cproject file.
|
||||||
* <p>
|
* <p>
|
||||||
* The configuration contains one child of type tool-chain. This describes how the
|
* The configuration contains one child of type tool-chain. This describes how the
|
||||||
* project's resources are transformed into the build artifact. The configuration can
|
* project's resources are transformed into the build artifact. The configuration can
|
||||||
* contain one or more children of type resourceConfiguration. These describe build
|
* contain one or more children of type resourceConfiguration. These describe build
|
||||||
* settings of individual resources that are different from the configuration as a whole.
|
* settings of individual resources that are different from the configuration as a whole.
|
||||||
*
|
*
|
||||||
* @since 2.1
|
* @since 2.1
|
||||||
* @noextend This class is not intended to be subclassed by clients.
|
* @noextend This class is not intended to be subclassed by clients.
|
||||||
* @noimplement This interface is not intended to be implemented by clients.
|
* @noimplement This interface is not intended to be implemented by clients.
|
||||||
|
@ -39,33 +39,35 @@ import org.eclipse.core.runtime.IPath;
|
||||||
public interface IConfiguration extends IBuildObject, IBuildObjectPropertiesContainer {
|
public interface IConfiguration extends IBuildObject, IBuildObjectPropertiesContainer {
|
||||||
public static final String ARTIFACT_NAME = "artifactName"; //$NON-NLS-1$
|
public static final String ARTIFACT_NAME = "artifactName"; //$NON-NLS-1$
|
||||||
public static final String CLEAN_COMMAND = "cleanCommand"; //$NON-NLS-1$
|
public static final String CLEAN_COMMAND = "cleanCommand"; //$NON-NLS-1$
|
||||||
public static final String PREBUILD_STEP = "prebuildStep"; //$NON-NLS-1$
|
public static final String PREBUILD_STEP = "prebuildStep"; //$NON-NLS-1$
|
||||||
public static final String POSTBUILD_STEP = "postbuildStep"; //$NON-NLS-1$
|
public static final String POSTBUILD_STEP = "postbuildStep"; //$NON-NLS-1$
|
||||||
public static final String PREANNOUNCEBUILD_STEP = "preannouncebuildStep"; //$NON-NLS-1$
|
public static final String PREANNOUNCEBUILD_STEP = "preannouncebuildStep"; //$NON-NLS-1$
|
||||||
public static final String POSTANNOUNCEBUILD_STEP = "postannouncebuildStep"; //$NON-NLS-1$
|
public static final String POSTANNOUNCEBUILD_STEP = "postannouncebuildStep"; //$NON-NLS-1$
|
||||||
// Schema element names
|
// Schema element names
|
||||||
public static final String CONFIGURATION_ELEMENT_NAME = "configuration"; //$NON-NLS-1$
|
public static final String CONFIGURATION_ELEMENT_NAME = "configuration"; //$NON-NLS-1$
|
||||||
public static final String ERROR_PARSERS = "errorParsers"; //$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 EXTENSION = "artifactExtension"; //$NON-NLS-1$
|
||||||
public static final String PARENT = "parent"; //$NON-NLS-1$
|
public static final String PARENT = "parent"; //$NON-NLS-1$
|
||||||
|
|
||||||
public static final String DESCRIPTION = "description"; //$NON-NLS-1$
|
public static final String DESCRIPTION = "description"; //$NON-NLS-1$
|
||||||
|
|
||||||
public static final String BUILD_PROPERTIES = "buildProperties"; //$NON-NLS-1$
|
public static final String BUILD_PROPERTIES = "buildProperties"; //$NON-NLS-1$
|
||||||
public static final String BUILD_ARTEFACT_TYPE = "buildArtefactType"; //$NON-NLS-1$
|
public static final String BUILD_ARTEFACT_TYPE = "buildArtefactType"; //$NON-NLS-1$
|
||||||
public static final String IS_SYSTEM = "isSystem"; //$NON-NLS-1$
|
public static final String IS_SYSTEM = "isSystem"; //$NON-NLS-1$
|
||||||
|
|
||||||
public static final String SOURCE_ENTRIES = "sourceEntries"; //$NON-NLS-1$
|
public static final String SOURCE_ENTRIES = "sourceEntries"; //$NON-NLS-1$
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the description of the configuration.
|
* Returns the description of the configuration.
|
||||||
*
|
*
|
||||||
* @return String
|
* @return String
|
||||||
*/
|
*/
|
||||||
public String getDescription();
|
public String getDescription();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets the description of the receiver to the value specified in the argument
|
* Sets the description of the receiver to the value specified in the argument
|
||||||
*/
|
*/
|
||||||
|
@ -84,204 +86,212 @@ public interface IConfiguration extends IBuildObject, IBuildObjectPropertiesCont
|
||||||
* @param name - The name for the new tool chain
|
* @param name - The name for the new tool chain
|
||||||
* @param isExtensionElement - set {@code true} if the toolchain being created
|
* @param isExtensionElement - set {@code true} if the toolchain being created
|
||||||
* represents extension point toolchain
|
* represents extension point toolchain
|
||||||
*
|
*
|
||||||
* @return IToolChain
|
* @return IToolChain
|
||||||
*/
|
*/
|
||||||
public IToolChain createToolChain(IToolChain superClass, String Id, String name, boolean isExtensionElement);
|
public IToolChain createToolChain(IToolChain superClass, String Id, String name, boolean isExtensionElement);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the extension that should be applied to build artifacts created by
|
* Returns the extension that should be applied to build artifacts created by
|
||||||
* this configuration.
|
* this configuration.
|
||||||
*
|
*
|
||||||
* @return String
|
* @return String
|
||||||
*/
|
*/
|
||||||
public String getArtifactExtension();
|
public String getArtifactExtension();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the name of the final build artifact.
|
* Returns the name of the final build artifact.
|
||||||
*
|
*
|
||||||
* @return String
|
* @return String
|
||||||
*/
|
*/
|
||||||
public String getArtifactName();
|
public String getArtifactName();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the build arguments from this configuration's builder
|
* Returns the build arguments from this configuration's builder
|
||||||
*
|
*
|
||||||
* @return String
|
* @return String
|
||||||
*/
|
*/
|
||||||
public String getBuildArguments();
|
public String getBuildArguments();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the build command from this configuration's builder
|
* Returns the build command from this configuration's builder
|
||||||
*
|
*
|
||||||
* @return String
|
* @return String
|
||||||
*/
|
*/
|
||||||
public String getBuildCommand();
|
public String getBuildCommand();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the prebuild step command
|
* Returns the prebuild step command
|
||||||
*
|
*
|
||||||
* @return String
|
* @return String
|
||||||
*/
|
*/
|
||||||
public String getPrebuildStep();
|
public String getPrebuildStep();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the postbuild step command
|
* Returns the postbuild step command
|
||||||
*
|
*
|
||||||
* @return String
|
* @return String
|
||||||
*/
|
*/
|
||||||
public String getPostbuildStep();
|
public String getPostbuildStep();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the display string associated with the prebuild step
|
* Returns the display string associated with the prebuild step
|
||||||
*
|
*
|
||||||
* @return String
|
* @return String
|
||||||
*/
|
*/
|
||||||
public String getPreannouncebuildStep();
|
public String getPreannouncebuildStep();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the display string associated with the postbuild step
|
* Returns the display string associated with the postbuild step
|
||||||
*
|
*
|
||||||
* @return String
|
* @return String
|
||||||
*/
|
*/
|
||||||
public String getPostannouncebuildStep();
|
public String getPostannouncebuildStep();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Answers the OS-specific command to remove files created by the build
|
* Answers the OS-specific command to remove files created by the build
|
||||||
* of this configuration.
|
* of this configuration.
|
||||||
*
|
*
|
||||||
* @return String
|
* @return String
|
||||||
*/
|
*/
|
||||||
public String getCleanCommand();
|
public String getCleanCommand();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Answers the semicolon separated list of unique IDs of the error parsers associated
|
* Answers the semicolon separated list of unique IDs of the error parsers associated
|
||||||
* with this configuration.
|
* with this configuration.
|
||||||
*
|
*
|
||||||
* @return String
|
* @return String
|
||||||
*/
|
*/
|
||||||
public String getErrorParserIds();
|
public String getErrorParserIds();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Answers the ordered list of unique IDs of the error parsers associated
|
* Answers the ordered list of unique IDs of the error parsers associated
|
||||||
* with this configuration.
|
* with this configuration.
|
||||||
*
|
*
|
||||||
* @return String[]
|
* @return String[]
|
||||||
*/
|
*/
|
||||||
public String[] getErrorParserList();
|
public String[] getErrorParserList();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Projects have C or CC natures. Tools can specify a filter so they are not
|
* Returns default language settings providers IDs specified for the configuration.
|
||||||
* misapplied to a project. This method allows the caller to retrieve a list
|
* @return default language settings providers IDs or {@code null}.
|
||||||
* of tools from a project that are correct for a project's nature.
|
*
|
||||||
*
|
* @since 8.1
|
||||||
* @return an array of <code>ITools</code> that have compatible filters
|
*/
|
||||||
|
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
|
||||||
|
* of tools from a project that are correct for a project's nature.
|
||||||
|
*
|
||||||
|
* @return an array of <code>ITools</code> that have compatible filters
|
||||||
* for this configuration.
|
* for this configuration.
|
||||||
*/
|
*/
|
||||||
ITool[] getFilteredTools();
|
ITool[] getFilteredTools();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the managed-project parent of this configuration, if this is a
|
* Returns the managed-project parent of this configuration, if this is a
|
||||||
* project configuration. Otherwise, returns <code>null</code>.
|
* project configuration. Otherwise, returns <code>null</code>.
|
||||||
*
|
*
|
||||||
* @return IManagedProject
|
* @return IManagedProject
|
||||||
*/
|
*/
|
||||||
public IManagedProject getManagedProject();
|
public IManagedProject getManagedProject();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the Eclipse project that owns the configuration.
|
* Returns the Eclipse project that owns the configuration.
|
||||||
*
|
*
|
||||||
* @return IResource
|
* @return IResource
|
||||||
*/
|
*/
|
||||||
public IResource getOwner();
|
public IResource getOwner();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the configuration that this configuration is based on.
|
* Returns the configuration that this configuration is based on.
|
||||||
*
|
*
|
||||||
* @return IConfiguration
|
* @return IConfiguration
|
||||||
*/
|
*/
|
||||||
public IConfiguration getParent();
|
public IConfiguration getParent();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the project-type parent of this configuration, if this is an
|
* Returns the project-type parent of this configuration, if this is an
|
||||||
* extension configuration. Otherwise, returns <code>null</code>.
|
* extension configuration. Otherwise, returns <code>null</code>.
|
||||||
*
|
*
|
||||||
* @return IProjectType
|
* @return IProjectType
|
||||||
*/
|
*/
|
||||||
public IProjectType getProjectType();
|
public IProjectType getProjectType();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param path - path of the resource
|
* @param path - path of the resource
|
||||||
*
|
*
|
||||||
* @return the resource configuration child of this configuration
|
* @return the resource configuration child of this configuration
|
||||||
* that is associated with the project resource, or <code>null</code> if none.
|
* that is associated with the project resource, or <code>null</code> if none.
|
||||||
*/
|
*/
|
||||||
public IResourceConfiguration getResourceConfiguration(String path);
|
public IResourceConfiguration getResourceConfiguration(String path);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the resource configuration children of this configuration.
|
* Returns the resource configuration children of this configuration.
|
||||||
*
|
*
|
||||||
* @return IResourceConfigurations[]
|
* @return IResourceConfigurations[]
|
||||||
*/
|
*/
|
||||||
public IResourceConfiguration[] getResourceConfigurations();
|
public IResourceConfiguration[] getResourceConfigurations();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the <code>ITool</code> in this configuration's tool-chain with
|
* Returns the <code>ITool</code> in this configuration's tool-chain with
|
||||||
* the same id as the argument, or <code>null</code>.
|
* the same id as the argument, or <code>null</code>.
|
||||||
*
|
*
|
||||||
* @param id unique identifier to search for
|
* @param id unique identifier to search for
|
||||||
* @return ITool
|
* @return ITool
|
||||||
*/
|
*/
|
||||||
public ITool getTool(String id);
|
public ITool getTool(String id);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the <code>ITool</code> in this configuration's tool-chain with
|
* Returns the <code>ITool</code> in this configuration's tool-chain with
|
||||||
* the specified ID, or the tool(s) with a superclass with this id.
|
* the specified ID, or the tool(s) with a superclass with this id.
|
||||||
*
|
*
|
||||||
* <p>If the tool-chain does not have a tool with that ID, the method
|
* <p>If the tool-chain does not have a tool with that ID, the method
|
||||||
* returns an empty array. It is the responsibility of the caller to
|
* returns an empty array. It is the responsibility of the caller to
|
||||||
* verify the return value.
|
* verify the return value.
|
||||||
*
|
*
|
||||||
* @param id unique identifier of the tool to search for
|
* @param id unique identifier of the tool to search for
|
||||||
* @return <code>ITool[]</code>
|
* @return <code>ITool[]</code>
|
||||||
* @since 3.0.2
|
* @since 3.0.2
|
||||||
*/
|
*/
|
||||||
public ITool[] getToolsBySuperClassId(String id);
|
public ITool[] getToolsBySuperClassId(String id);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the <code>IToolChain</code> child of this configuration.
|
* Returns the <code>IToolChain</code> child of this configuration.
|
||||||
*
|
*
|
||||||
* @return IToolChain
|
* @return IToolChain
|
||||||
*/
|
*/
|
||||||
public IToolChain getToolChain();
|
public IToolChain getToolChain();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the command-line invocation command for the specified tool.
|
* Returns the command-line invocation command for the specified tool.
|
||||||
*
|
*
|
||||||
* @param tool The tool that will have its command retrieved.
|
* @param tool The tool that will have its command retrieved.
|
||||||
* @return String The command
|
* @return String The command
|
||||||
*/
|
*/
|
||||||
public String getToolCommand(ITool tool);
|
public String getToolCommand(ITool tool);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the tools that are used in this configuration's tool-chain.
|
* Returns the tools that are used in this configuration's tool-chain.
|
||||||
*
|
*
|
||||||
* @return ITool[]
|
* @return ITool[]
|
||||||
*/
|
*/
|
||||||
public ITool[] getTools();
|
public ITool[] getTools();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the tool in this configuration specified with
|
* Returns the tool in this configuration specified with
|
||||||
* the toolChain#targetTool attribute that creates the build artifact
|
* the toolChain#targetTool attribute that creates the build artifact
|
||||||
*
|
*
|
||||||
* NOTE: This method returns null in case the toolChain definition
|
* NOTE: This method returns null in case the toolChain definition
|
||||||
* does not have the targetTool attribute or if the attribute does not
|
* does not have the targetTool attribute or if the attribute does not
|
||||||
* refer to the appropriate tool.
|
* refer to the appropriate tool.
|
||||||
* For the target tool calculation the IConfiguration#calculateTargetTool()
|
* For the target tool calculation the IConfiguration#calculateTargetTool()
|
||||||
* method should be used
|
* method should be used
|
||||||
*
|
*
|
||||||
* @see IConfiguration#calculateTargetTool()
|
* @see IConfiguration#calculateTargetTool()
|
||||||
*
|
*
|
||||||
* @return ITool
|
* @return ITool
|
||||||
*/
|
*/
|
||||||
public ITool getTargetTool();
|
public ITool getTargetTool();
|
||||||
|
@ -289,42 +299,42 @@ public interface IConfiguration extends IBuildObject, IBuildObjectPropertiesCont
|
||||||
/**
|
/**
|
||||||
* Returns <code>true</code> if this configuration has overridden the default build
|
* Returns <code>true</code> if this configuration has overridden the default build
|
||||||
* build command in this configuration, otherwise <code>false</code>.
|
* build command in this configuration, otherwise <code>false</code>.
|
||||||
*
|
*
|
||||||
* @return boolean
|
* @return boolean
|
||||||
*/
|
*/
|
||||||
public boolean hasOverriddenBuildCommand();
|
public boolean hasOverriddenBuildCommand();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns <code>true</code> if the extension matches one of the special
|
* Returns <code>true</code> if the extension matches one of the special
|
||||||
* file extensions the tools for the configuration consider to be a header file.
|
* file extensions the tools for the configuration consider to be a header file.
|
||||||
*
|
*
|
||||||
* @param ext the file extension of the resource
|
* @param ext the file extension of the resource
|
||||||
* @return boolean
|
* @return boolean
|
||||||
*/
|
*/
|
||||||
public boolean isHeaderFile(String ext);
|
public boolean isHeaderFile(String ext);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns <code>true</code> if this configuration has changes that need to
|
* Returns <code>true</code> if this configuration has changes that need to
|
||||||
* be saved in the project file, else <code>false</code>.
|
* be saved in the project file, else <code>false</code>.
|
||||||
* Should not be called for an extension configuration.
|
* Should not be called for an extension configuration.
|
||||||
*
|
*
|
||||||
* @return boolean
|
* @return boolean
|
||||||
*/
|
*/
|
||||||
public boolean isDirty();
|
public boolean isDirty();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns <code>true</code> if this configuration was loaded from a manifest file,
|
* Returns <code>true</code> if this configuration was loaded from a manifest file,
|
||||||
* and <code>false</code> if it was loaded from a project (.cdtbuild) file.
|
* and <code>false</code> if it was loaded from a project (.cdtbuild) file.
|
||||||
*
|
*
|
||||||
* @return boolean
|
* @return boolean
|
||||||
*/
|
*/
|
||||||
public boolean isExtensionElement();
|
public boolean isExtensionElement();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns whether this configuration has been changed and requires the
|
* Returns whether this configuration has been changed and requires the
|
||||||
* project to be rebuilt.
|
* project to be rebuilt.
|
||||||
*
|
*
|
||||||
* @return <code>true</code> if the configuration contains a change
|
* @return <code>true</code> if the configuration contains a change
|
||||||
* that needs the project to be rebuilt.
|
* that needs the project to be rebuilt.
|
||||||
* Should not be called for an extension configuration.
|
* Should not be called for an extension configuration.
|
||||||
*/
|
*/
|
||||||
|
@ -332,13 +342,13 @@ public interface IConfiguration extends IBuildObject, IBuildObjectPropertiesCont
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Removes a resource configuration from the configuration's list.
|
* Removes a resource configuration from the configuration's list.
|
||||||
*
|
*
|
||||||
* @param resConfig - resource configuration to remove
|
* @param resConfig - resource configuration to remove
|
||||||
*/
|
*/
|
||||||
public void removeResourceConfiguration(IResourceInfo resConfig);
|
public void removeResourceConfiguration(IResourceInfo resConfig);
|
||||||
|
|
||||||
public void removeResourceInfo(IPath path);
|
public void removeResourceInfo(IPath path);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set (override) the extension that should be appended to the build artifact
|
* Set (override) the extension that should be appended to the build artifact
|
||||||
* for the receiver.
|
* for the receiver.
|
||||||
|
@ -352,7 +362,7 @@ public interface IConfiguration extends IBuildObject, IBuildObjectPropertiesCont
|
||||||
public void setArtifactName(String name);
|
public void setArtifactName(String name);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets the arguments to be passed to the build utility used by the
|
* Sets the arguments to be passed to the build utility used by the
|
||||||
* receiver to produce a build goal.
|
* receiver to produce a build goal.
|
||||||
*/
|
*/
|
||||||
public void setBuildArguments(String makeArgs);
|
public void setBuildArguments(String makeArgs);
|
||||||
|
@ -363,26 +373,26 @@ public interface IConfiguration extends IBuildObject, IBuildObjectPropertiesCont
|
||||||
public void setBuildCommand(String command);
|
public void setBuildCommand(String command);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets the prebuild step for the receiver to the value in the argument.
|
* Sets the prebuild step for the receiver to the value in the argument.
|
||||||
*/
|
*/
|
||||||
public void setPrebuildStep(String step);
|
public void setPrebuildStep(String step);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets the postbuild step for the receiver to the value in the argument.
|
* Sets the postbuild step for the receiver to the value in the argument.
|
||||||
*/
|
*/
|
||||||
public void setPostbuildStep(String step);
|
public void setPostbuildStep(String step);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets the prebuild step display string for the receiver to the value in the argument.
|
* Sets the prebuild step display string for the receiver to the value in the argument.
|
||||||
*/
|
*/
|
||||||
public void setPreannouncebuildStep(String announceStep);
|
public void setPreannouncebuildStep(String announceStep);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets the postbuild step display string for the receiver to the value in the argument.
|
* Sets the postbuild step display string for the receiver to the value in the argument.
|
||||||
*/
|
*/
|
||||||
public void setPostannouncebuildStep(String announceStep);
|
public void setPostannouncebuildStep(String announceStep);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets the command used to clean the outputs of this configuration.
|
* Sets the command used to clean the outputs of this configuration.
|
||||||
* @param command - the command to clean outputs
|
* @param command - the command to clean outputs
|
||||||
*/
|
*/
|
||||||
|
@ -404,46 +414,46 @@ public interface IConfiguration extends IBuildObject, IBuildObjectPropertiesCont
|
||||||
* Sets the name of the receiver to the value specified in the argument
|
* Sets the name of the receiver to the value specified in the argument
|
||||||
*/
|
*/
|
||||||
public void setName(String name);
|
public void setName(String name);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets the value of a boolean option for this configuration.
|
* Sets the value of a boolean option for this configuration.
|
||||||
*
|
*
|
||||||
* @param parent The holder/parent of the option.
|
* @param parent The holder/parent of the option.
|
||||||
* @param option The option to change.
|
* @param option The option to change.
|
||||||
* @param value The value to apply to the option.
|
* @param value The value to apply to the option.
|
||||||
*
|
*
|
||||||
* @return IOption The modified option. This can be the same option or a newly created option.
|
* @return IOption The modified option. This can be the same option or a newly created option.
|
||||||
*
|
*
|
||||||
* @since 3.0 - The type of parent has changed from ITool to IHoldsOptions.
|
* @since 3.0 - The type of parent has changed from ITool to IHoldsOptions.
|
||||||
* Code assuming ITool as type, will continue to work unchanged.
|
* Code assuming ITool as type, will continue to work unchanged.
|
||||||
*/
|
*/
|
||||||
public IOption setOption(IHoldsOptions parent, IOption option, boolean value)
|
public IOption setOption(IHoldsOptions parent, IOption option, boolean value)
|
||||||
throws BuildException;
|
throws BuildException;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets the value of a string option for this configuration.
|
* Sets the value of a string option for this configuration.
|
||||||
*
|
*
|
||||||
* @param parent The holder/parent of the option.
|
* @param parent The holder/parent of the option.
|
||||||
* @param option The option that will be effected by change.
|
* @param option The option that will be effected by change.
|
||||||
* @param value The value to apply to the option.
|
* @param value The value to apply to the option.
|
||||||
*
|
*
|
||||||
* @return IOption The modified option. This can be the same option or a newly created option.
|
* @return IOption The modified option. This can be the same option or a newly created option.
|
||||||
*
|
*
|
||||||
* @since 3.0 - The type of parent has changed from ITool to IHoldsOptions.
|
* @since 3.0 - The type of parent has changed from ITool to IHoldsOptions.
|
||||||
* Code assuming ITool as type, will continue to work unchanged.
|
* Code assuming ITool as type, will continue to work unchanged.
|
||||||
*/
|
*/
|
||||||
public IOption setOption(IHoldsOptions parent, IOption option, String value)
|
public IOption setOption(IHoldsOptions parent, IOption option, String value)
|
||||||
throws BuildException;
|
throws BuildException;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets the value of a list option for this configuration.
|
* Sets the value of a list option for this configuration.
|
||||||
*
|
*
|
||||||
* @param parent The holder/parent of the option.
|
* @param parent The holder/parent of the option.
|
||||||
* @param option The option to change.
|
* @param option The option to change.
|
||||||
* @param value The values to apply to the option.
|
* @param value The values to apply to the option.
|
||||||
*
|
*
|
||||||
* @return IOption The modified option. This can be the same option or a newly created option.
|
* @return IOption The modified option. This can be the same option or a newly created option.
|
||||||
*
|
*
|
||||||
* @since 3.0 - The type of parent has changed from ITool to IHoldsOptions.
|
* @since 3.0 - The type of parent has changed from ITool to IHoldsOptions.
|
||||||
* Code assuming ITool as type, will continue to work unchanged.
|
* Code assuming ITool as type, will continue to work unchanged.
|
||||||
*/
|
*/
|
||||||
|
@ -452,7 +462,7 @@ public interface IConfiguration extends IBuildObject, IBuildObjectPropertiesCont
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets the rebuild state in this configuration.
|
* Sets the rebuild state in this configuration.
|
||||||
*
|
*
|
||||||
* @param rebuild <code>true</code> will force a rebuild the next time the project builds
|
* @param rebuild <code>true</code> will force a rebuild the next time the project builds
|
||||||
* @see org.eclipse.cdt.managedbuilder.core.IManagedBuildInfo#setRebuildState(boolean)
|
* @see org.eclipse.cdt.managedbuilder.core.IManagedBuildInfo#setRebuildState(boolean)
|
||||||
*/
|
*/
|
||||||
|
@ -460,93 +470,93 @@ public interface IConfiguration extends IBuildObject, IBuildObjectPropertiesCont
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Overrides the tool command for a tool defined in this configuration's tool-chain.
|
* Overrides the tool command for a tool defined in this configuration's tool-chain.
|
||||||
*
|
*
|
||||||
* @param tool The tool that will have its command modified.
|
* @param tool The tool that will have its command modified.
|
||||||
* @param command The command
|
* @param command The command
|
||||||
*/
|
*/
|
||||||
public void setToolCommand(ITool tool, String command);
|
public void setToolCommand(ITool tool, String command);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns <code>true</code> if the configuration's tool-chain is supported on the system
|
* Returns <code>true</code> if the configuration's tool-chain is supported on the system
|
||||||
* otherwise returns <code>false</code>
|
* otherwise returns <code>false</code>
|
||||||
*
|
*
|
||||||
* @return boolean
|
* @return boolean
|
||||||
*/
|
*/
|
||||||
public boolean isSupported();
|
public boolean isSupported();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the implementation of the IConfigurationEnvironmentVariableSupplier provided
|
* Returns the implementation of the IConfigurationEnvironmentVariableSupplier provided
|
||||||
* by the tool-integrator or <code>null</code> if none.
|
* by the tool-integrator or <code>null</code> if none.
|
||||||
*
|
*
|
||||||
* @return IConfigurationEnvironmentVariableSupplier
|
* @return IConfigurationEnvironmentVariableSupplier
|
||||||
*/
|
*/
|
||||||
public IConfigurationEnvironmentVariableSupplier getEnvironmentVariableSupplier();
|
public IConfigurationEnvironmentVariableSupplier getEnvironmentVariableSupplier();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the tool-integrator provided implementation of the configuration build macro supplier
|
* Returns the tool-integrator provided implementation of the configuration build macro supplier
|
||||||
* or <code>null</code> if none.
|
* or <code>null</code> if none.
|
||||||
*
|
*
|
||||||
* @return IConfigurationBuildMacroSupplier
|
* @return IConfigurationBuildMacroSupplier
|
||||||
*/
|
*/
|
||||||
public IConfigurationBuildMacroSupplier getBuildMacroSupplier();
|
public IConfigurationBuildMacroSupplier getBuildMacroSupplier();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* answers true if the configuration is temporary, otherwise - false
|
* answers true if the configuration is temporary, otherwise - false
|
||||||
* @return boolean
|
* @return boolean
|
||||||
*/
|
*/
|
||||||
public boolean isTemporary();
|
public boolean isTemporary();
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns whether this configuration requires a full rebuild
|
* Returns whether this configuration requires a full rebuild
|
||||||
*
|
*
|
||||||
* @return boolean
|
* @return boolean
|
||||||
*/
|
*/
|
||||||
public boolean needsFullRebuild();
|
public boolean needsFullRebuild();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Calculates the configuration target tool.
|
* Calculates the configuration target tool.
|
||||||
*
|
*
|
||||||
* @return ITool or null if not found
|
* @return ITool or null if not found
|
||||||
*
|
*
|
||||||
* @since 3.1
|
* @since 3.1
|
||||||
*/
|
*/
|
||||||
public ITool calculateTargetTool();
|
public ITool calculateTargetTool();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns a <code>ITool</code> for the tool associated with the
|
* Returns a <code>ITool</code> for the tool associated with the
|
||||||
* output extension.
|
* output extension.
|
||||||
*
|
*
|
||||||
* @param extension the file extension of the output file
|
* @param extension the file extension of the output file
|
||||||
* @return ITool
|
* @return ITool
|
||||||
*
|
*
|
||||||
* @since 3.1
|
* @since 3.1
|
||||||
*/
|
*/
|
||||||
public ITool getToolFromOutputExtension(String extension);
|
public ITool getToolFromOutputExtension(String extension);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns a <code>ITool</code> for the tool associated with the
|
* Returns a <code>ITool</code> for the tool associated with the
|
||||||
* input extension.
|
* input extension.
|
||||||
*
|
*
|
||||||
* @param sourceExtension the file extension of the input file
|
* @param sourceExtension the file extension of the input file
|
||||||
* @return ITool
|
* @return ITool
|
||||||
*
|
*
|
||||||
* @since 3.1
|
* @since 3.1
|
||||||
*/
|
*/
|
||||||
public ITool getToolFromInputExtension(String sourceExtension);
|
public ITool getToolFromInputExtension(String sourceExtension);
|
||||||
|
|
||||||
IResourceInfo getResourceInfo(IPath path, boolean exactPath);
|
IResourceInfo getResourceInfo(IPath path, boolean exactPath);
|
||||||
|
|
||||||
IResourceInfo[] getResourceInfos();
|
IResourceInfo[] getResourceInfos();
|
||||||
|
|
||||||
IResourceInfo getResourceInfoById(String id);
|
IResourceInfo getResourceInfoById(String id);
|
||||||
|
|
||||||
IFolderInfo getRootFolderInfo();
|
IFolderInfo getRootFolderInfo();
|
||||||
|
|
||||||
IFileInfo createFileInfo(IPath path);
|
IFileInfo createFileInfo(IPath path);
|
||||||
|
|
||||||
IFileInfo createFileInfo(IPath path, String id, String name);
|
IFileInfo createFileInfo(IPath path, String id, String name);
|
||||||
|
|
||||||
IFileInfo createFileInfo(IPath path, IFolderInfo base, ITool baseTool, String id, String name);
|
IFileInfo createFileInfo(IPath path, IFolderInfo base, ITool baseTool, String id, String name);
|
||||||
|
|
||||||
IFileInfo createFileInfo(IPath path, IFileInfo base, String id, String name);
|
IFileInfo createFileInfo(IPath path, IFileInfo base, String id, String name);
|
||||||
|
@ -554,49 +564,49 @@ public interface IConfiguration extends IBuildObject, IBuildObjectPropertiesCont
|
||||||
IFolderInfo createFolderInfo(IPath path);
|
IFolderInfo createFolderInfo(IPath path);
|
||||||
|
|
||||||
IFolderInfo createFolderInfo(IPath path, String id, String name);
|
IFolderInfo createFolderInfo(IPath path, String id, String name);
|
||||||
|
|
||||||
IFolderInfo createFolderInfo(IPath path, IFolderInfo base, String id, String name);
|
IFolderInfo createFolderInfo(IPath path, IFolderInfo base, String id, String name);
|
||||||
|
|
||||||
CConfigurationData getConfigurationData();
|
CConfigurationData getConfigurationData();
|
||||||
|
|
||||||
ICSourceEntry[] getSourceEntries();
|
ICSourceEntry[] getSourceEntries();
|
||||||
|
|
||||||
void setSourceEntries(ICSourceEntry[] entries);
|
void setSourceEntries(ICSourceEntry[] entries);
|
||||||
|
|
||||||
CBuildData getBuildData();
|
CBuildData getBuildData();
|
||||||
|
|
||||||
IBuilder getBuilder();
|
IBuilder getBuilder();
|
||||||
|
|
||||||
IBuilder getEditableBuilder();
|
IBuilder getEditableBuilder();
|
||||||
|
|
||||||
String getOutputPrefix(String outputExtension);
|
String getOutputPrefix(String outputExtension);
|
||||||
|
|
||||||
boolean isSystemObject();
|
boolean isSystemObject();
|
||||||
|
|
||||||
String getOutputExtension(String resourceExtension);
|
String getOutputExtension(String resourceExtension);
|
||||||
|
|
||||||
String getOutputFlag(String outputExt);
|
String getOutputFlag(String outputExt);
|
||||||
|
|
||||||
IManagedCommandLineInfo generateToolCommandLineInfo( String sourceExtension, String[] flags,
|
IManagedCommandLineInfo generateToolCommandLineInfo( String sourceExtension, String[] flags,
|
||||||
String outputFlag, String outputPrefix, String outputName, String[] inputResources, IPath inputLocation, IPath outputLocation );
|
String outputFlag, String outputPrefix, String outputName, String[] inputResources, IPath inputLocation, IPath outputLocation );
|
||||||
|
|
||||||
String[] getUserObjects(String extension);
|
String[] getUserObjects(String extension);
|
||||||
|
|
||||||
String[] getLibs(String extension);
|
String[] getLibs(String extension);
|
||||||
|
|
||||||
boolean buildsFileType(String srcExt);
|
boolean buildsFileType(String srcExt);
|
||||||
|
|
||||||
boolean supportsBuild(boolean managed);
|
boolean supportsBuild(boolean managed);
|
||||||
|
|
||||||
boolean isManagedBuildOn();
|
boolean isManagedBuildOn();
|
||||||
|
|
||||||
void setManagedBuildOn(boolean on) throws BuildException;
|
void setManagedBuildOn(boolean on) throws BuildException;
|
||||||
|
|
||||||
boolean isBuilderCompatible(IBuilder builder);
|
boolean isBuilderCompatible(IBuilder builder);
|
||||||
|
|
||||||
void changeBuilder(IBuilder newBuilder, String id, String name);
|
void changeBuilder(IBuilder newBuilder, String id, String name);
|
||||||
|
|
||||||
IBuildPropertyValue getBuildArtefactType();
|
IBuildPropertyValue getBuildArtefactType();
|
||||||
|
|
||||||
void setBuildArtefactType(String id) throws BuildException;
|
void setBuildArtefactType(String id) throws BuildException;
|
||||||
}
|
}
|
||||||
|
|
|
@ -16,19 +16,19 @@ import org.eclipse.cdt.managedbuilder.macros.IConfigurationBuildMacroSupplier;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This interface represents a tool-integrator-defined, ordered set of tools
|
* This interface represents a tool-integrator-defined, ordered set of tools
|
||||||
* that transform the project's input into the project's outputs. A
|
* that transform the project's input into the project's outputs. A
|
||||||
* tool-chain can be defined as part of a configuration, or as an
|
* tool-chain can be defined as part of a configuration, or as an
|
||||||
* independent specification that is referenced in a separate configuration
|
* independent specification that is referenced in a separate configuration
|
||||||
* via the toolChain superclass attribute.
|
* via the toolChain superclass attribute.
|
||||||
* <p>
|
* <p>
|
||||||
* The toolChain contains one or more children of type tool. These define
|
* The toolChain contains one or more children of type tool. These define
|
||||||
* the tools used in the tool-chain. The toolChain contains one child of
|
* the tools used in the tool-chain. The toolChain contains one child of
|
||||||
* type targetPlatform. This defines the architecture/os combination where
|
* type targetPlatform. This defines the architecture/os combination where
|
||||||
* the outputs of the project can be deployed. The toolChain contains one
|
* the outputs of the project can be deployed. The toolChain contains one
|
||||||
* child of type builder. This defines the "build" or "make" utility that
|
* child of type builder. This defines the "build" or "make" utility that
|
||||||
* is used to drive the transformation of the inputs into outputs.
|
* is used to drive the transformation of the inputs into outputs.
|
||||||
*
|
*
|
||||||
* @since 2.1
|
* @since 2.1
|
||||||
* @noextend This class is not intended to be subclassed by clients.
|
* @noextend This class is not intended to be subclassed by clients.
|
||||||
* @noimplement This interface is not intended to be implemented by clients.
|
* @noimplement This interface is not intended to be implemented by clients.
|
||||||
|
@ -49,13 +49,16 @@ public interface IToolChain extends IBuildObject, IHoldsOptions {
|
||||||
public static final String IS_SYSTEM= "isSystem"; //$NON-NLS-1$
|
public static final String IS_SYSTEM= "isSystem"; //$NON-NLS-1$
|
||||||
public static final String NON_INTERNAL_BUILDER_ID = "nonInternalBuilderId"; //$NON-NLS-1$
|
public static final String NON_INTERNAL_BUILDER_ID = "nonInternalBuilderId"; //$NON-NLS-1$
|
||||||
public static final String RESOURCE_TYPE_BASED_DISCOVERY = "resourceTypeBasedDiscovery"; //$NON-NLS-1$
|
public static final String RESOURCE_TYPE_BASED_DISCOVERY = "resourceTypeBasedDiscovery"; //$NON-NLS-1$
|
||||||
|
|
||||||
// The attribute name for the scanner info collector
|
// The attribute name for the scanner info collector
|
||||||
public static final String SCANNER_CONFIG_PROFILE_ID = "scannerConfigDiscoveryProfileId"; //$NON-NLS-1$
|
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.
|
* Returns the configuration that is the parent of this tool-chain.
|
||||||
*
|
*
|
||||||
* @return IConfiguration
|
* @return IConfiguration
|
||||||
*/
|
*/
|
||||||
public IConfiguration getParent();
|
public IConfiguration getParent();
|
||||||
|
@ -67,14 +70,14 @@ public interface IToolChain extends IBuildObject, IHoldsOptions {
|
||||||
* @param Id The id for the new tool chain
|
* @param Id The id for the new tool chain
|
||||||
* @param name The name for the new tool chain
|
* @param name The name for the new tool chain
|
||||||
* @param isExtensionElement Indicates whether this is an extension element or a managed project element
|
* @param isExtensionElement Indicates whether this is an extension element or a managed project element
|
||||||
*
|
*
|
||||||
* @return ITargetPlatform
|
* @return ITargetPlatform
|
||||||
*/
|
*/
|
||||||
public ITargetPlatform createTargetPlatform(ITargetPlatform superClass, String Id, String name, boolean isExtensionElement);
|
public ITargetPlatform createTargetPlatform(ITargetPlatform superClass, String Id, String name, boolean isExtensionElement);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the target-platform child of this tool-chain
|
* Returns the target-platform child of this tool-chain
|
||||||
*
|
*
|
||||||
* @return ITargetPlatform
|
* @return ITargetPlatform
|
||||||
*/
|
*/
|
||||||
public ITargetPlatform getTargetPlatform();
|
public ITargetPlatform getTargetPlatform();
|
||||||
|
@ -87,30 +90,30 @@ public interface IToolChain extends IBuildObject, IHoldsOptions {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the 'versionsSupported' of this tool-chain
|
* Returns the 'versionsSupported' of this tool-chain
|
||||||
*
|
*
|
||||||
* @return String
|
* @return String
|
||||||
*/
|
*/
|
||||||
|
|
||||||
public String getVersionsSupported();
|
public String getVersionsSupported();
|
||||||
/**
|
/**
|
||||||
* Returns the 'convertToId' of this tool-chain
|
* Returns the 'convertToId' of this tool-chain
|
||||||
*
|
*
|
||||||
* @return String
|
* @return String
|
||||||
*/
|
*/
|
||||||
|
|
||||||
public String getConvertToId();
|
public String getConvertToId();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets the 'versionsSupported' attribute of the tool-chain.
|
* Sets the 'versionsSupported' attribute of the tool-chain.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
public void setVersionsSupported(String versionsSupported);
|
public void setVersionsSupported(String versionsSupported);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets the 'convertToId' attribute of the tool-chain.
|
* Sets the 'convertToId' attribute of the tool-chain.
|
||||||
*/
|
*/
|
||||||
public void setConvertToId(String convertToId);
|
public void setConvertToId(String convertToId);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates the <code>Builder</code> child of this tool-chain.
|
* Creates the <code>Builder</code> child of this tool-chain.
|
||||||
*
|
*
|
||||||
|
@ -118,7 +121,7 @@ public interface IToolChain extends IBuildObject, IHoldsOptions {
|
||||||
* @param Id The id for the new tool chain
|
* @param Id The id for the new tool chain
|
||||||
* @param name The name for the new tool chain
|
* @param name The name for the new tool chain
|
||||||
* @param isExtensionElement Indicates whether this is an extension element or a managed project element
|
* @param isExtensionElement Indicates whether this is an extension element or a managed project element
|
||||||
*
|
*
|
||||||
* @return IBuilder
|
* @return IBuilder
|
||||||
*/
|
*/
|
||||||
public IBuilder createBuilder(IBuilder superClass, String Id, String name, boolean isExtensionElement);
|
public IBuilder createBuilder(IBuilder superClass, String Id, String name, boolean isExtensionElement);
|
||||||
|
@ -131,7 +134,7 @@ public interface IToolChain extends IBuildObject, IHoldsOptions {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the builder child of this tool-chain.
|
* Returns the builder child of this tool-chain.
|
||||||
*
|
*
|
||||||
* @return IBuilder
|
* @return IBuilder
|
||||||
*/
|
*/
|
||||||
public IBuilder getBuilder();
|
public IBuilder getBuilder();
|
||||||
|
@ -143,35 +146,35 @@ public interface IToolChain extends IBuildObject, IHoldsOptions {
|
||||||
* @param Id The id for the new tool chain
|
* @param Id The id for the new tool chain
|
||||||
* @param name The name for the new tool chain
|
* @param name The name for the new tool chain
|
||||||
* @param isExtensionElement Indicates whether this is an extension element or a managed project element
|
* @param isExtensionElement Indicates whether this is an extension element or a managed project element
|
||||||
*
|
*
|
||||||
* @return ITool
|
* @return ITool
|
||||||
*/
|
*/
|
||||||
public ITool createTool(ITool superClass, String Id, String name, boolean isExtensionElement);
|
public ITool createTool(ITool superClass, String Id, String name, boolean isExtensionElement);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns an array of tool children of this tool-chain
|
* Returns an array of tool children of this tool-chain
|
||||||
*
|
*
|
||||||
* @return ITool[]
|
* @return ITool[]
|
||||||
*/
|
*/
|
||||||
public ITool[] getTools();
|
public ITool[] getTools();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the tool in this tool-chain with the ID specified in the argument,
|
* Returns the tool in this tool-chain with the ID specified in the argument,
|
||||||
* or <code>null</code>
|
* or <code>null</code>
|
||||||
*
|
*
|
||||||
* @param id The ID of the requested tool
|
* @param id The ID of the requested tool
|
||||||
* @return ITool
|
* @return ITool
|
||||||
*/
|
*/
|
||||||
public ITool getTool(String id);
|
public ITool getTool(String id);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the <code>ITool</code> in the tool-chain with the specified
|
* Returns the <code>ITool</code> in the tool-chain with the specified
|
||||||
* ID, or the tool(s) with a superclass with this id.
|
* ID, or the tool(s) with a superclass with this id.
|
||||||
*
|
*
|
||||||
* <p>If the tool-chain does not have a tool with that ID, the method
|
* <p>If the tool-chain does not have a tool with that ID, the method
|
||||||
* returns an empty array. It is the responsibility of the caller to
|
* returns an empty array. It is the responsibility of the caller to
|
||||||
* verify the return value.
|
* verify the return value.
|
||||||
*
|
*
|
||||||
* @param id unique identifier of the tool to search for
|
* @param id unique identifier of the tool to search for
|
||||||
* @return <code>ITool[]</code>
|
* @return <code>ITool[]</code>
|
||||||
* @since 3.0.2
|
* @since 3.0.2
|
||||||
|
@ -181,55 +184,55 @@ public interface IToolChain extends IBuildObject, IHoldsOptions {
|
||||||
/**
|
/**
|
||||||
* Returns the <code>IToolChain</code> that is the superclass of this
|
* Returns the <code>IToolChain</code> that is the superclass of this
|
||||||
* tool-chain, or <code>null</code> if the attribute was not specified.
|
* tool-chain, or <code>null</code> if the attribute was not specified.
|
||||||
*
|
*
|
||||||
* @return IToolChain
|
* @return IToolChain
|
||||||
*/
|
*/
|
||||||
public IToolChain getSuperClass();
|
public IToolChain getSuperClass();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns whether this element is abstract. Returns <code>false</code>
|
* Returns whether this element is abstract. Returns <code>false</code>
|
||||||
* if the attribute was not specified.
|
* if the attribute was not specified.
|
||||||
* @return boolean
|
* @return boolean
|
||||||
*/
|
*/
|
||||||
public boolean isAbstract();
|
public boolean isAbstract();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets the isAbstract attribute of the tool-chain.
|
* Sets the isAbstract attribute of the tool-chain.
|
||||||
*/
|
*/
|
||||||
public void setIsAbstract(boolean b);
|
public void setIsAbstract(boolean b);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns a semi-colon delimited list of child Ids of the superclass'
|
* Returns a semi-colon delimited list of child Ids of the superclass'
|
||||||
* children that should not be automatically inherited by this element.
|
* children that should not be automatically inherited by this element.
|
||||||
* Returns an empty string if the attribute was not specified.
|
* Returns an empty string if the attribute was not specified.
|
||||||
* @return String
|
* @return String
|
||||||
*/
|
*/
|
||||||
public String getUnusedChildren();
|
public String getUnusedChildren();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns an array of operating systems the tool-chain outputs can run on.
|
* Returns an array of operating systems the tool-chain outputs can run on.
|
||||||
*
|
*
|
||||||
* @return String[]
|
* @return String[]
|
||||||
*/
|
*/
|
||||||
public String[] getOSList();
|
public String[] getOSList();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets the OS list.
|
* Sets the OS list.
|
||||||
*
|
*
|
||||||
* @param OSs The list of OS names
|
* @param OSs The list of OS names
|
||||||
*/
|
*/
|
||||||
public void setOSList(String[] OSs);
|
public void setOSList(String[] OSs);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns an array of architectures the tool-chain outputs can run on.
|
* Returns an array of architectures the tool-chain outputs can run on.
|
||||||
*
|
*
|
||||||
* @return String[]
|
* @return String[]
|
||||||
*/
|
*/
|
||||||
public String[] getArchList();
|
public String[] getArchList();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets the architecture list.
|
* Sets the architecture list.
|
||||||
*
|
*
|
||||||
* @param archs The list of architecture names
|
* @param archs The list of architecture names
|
||||||
*/
|
*/
|
||||||
public void setArchList(String[] archs);
|
public void setArchList(String[] archs);
|
||||||
|
@ -237,7 +240,7 @@ public interface IToolChain extends IBuildObject, IHoldsOptions {
|
||||||
/**
|
/**
|
||||||
* Returns the semicolon separated list of unique IDs of the error parsers associated
|
* Returns the semicolon separated list of unique IDs of the error parsers associated
|
||||||
* with the tool-chain.
|
* with the tool-chain.
|
||||||
*
|
*
|
||||||
* @return String
|
* @return String
|
||||||
*/
|
*/
|
||||||
public String getErrorParserIds();
|
public String getErrorParserIds();
|
||||||
|
@ -249,9 +252,9 @@ public interface IToolChain extends IBuildObject, IHoldsOptions {
|
||||||
public String getErrorParserIds(IConfiguration config);
|
public String getErrorParserIds(IConfiguration config);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the ordered list of unique IDs of the error parsers associated with the
|
* Returns the ordered list of unique IDs of the error parsers associated with the
|
||||||
* tool-chain.
|
* tool-chain.
|
||||||
*
|
*
|
||||||
* @return String[]
|
* @return String[]
|
||||||
*/
|
*/
|
||||||
public String[] getErrorParserList();
|
public String[] getErrorParserList();
|
||||||
|
@ -262,8 +265,17 @@ public interface IToolChain extends IBuildObject, IHoldsOptions {
|
||||||
public void setErrorParserIds(String ids);
|
public void setErrorParserIds(String ids);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the scanner config discovery profile id or <code>null</code> if none.
|
* 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.
|
||||||
|
*
|
||||||
* @return String
|
* @return String
|
||||||
*/
|
*/
|
||||||
public String getScannerConfigDiscoveryProfileId();
|
public String getScannerConfigDiscoveryProfileId();
|
||||||
|
@ -274,93 +286,93 @@ public interface IToolChain extends IBuildObject, IHoldsOptions {
|
||||||
public void setScannerConfigDiscoveryProfileId(String profileId);
|
public void setScannerConfigDiscoveryProfileId(String profileId);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the sem-colon separated list of Tool ids containing each
|
* Returns the sem-colon separated list of Tool ids containing each
|
||||||
* tool that can create the final build artifact (the end target of
|
* tool that can create the final build artifact (the end target of
|
||||||
* the build). MBS will use the first ID in the list that matches
|
* the build). MBS will use the first ID in the list that matches
|
||||||
* a Tool in the ToolChain. One reason for specifying a list, is
|
* a Tool in the ToolChain. One reason for specifying a list, is
|
||||||
* that different versions of a tool can be selected based upon the
|
* that different versions of a tool can be selected based upon the
|
||||||
* project nature (e.g. different tool definitions for a linker for C vs. C++).
|
* project nature (e.g. different tool definitions for a linker for C vs. C++).
|
||||||
*
|
*
|
||||||
* @return String
|
* @return String
|
||||||
*/
|
*/
|
||||||
public String getTargetToolIds();
|
public String getTargetToolIds();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets the sem-colon separated list of Tool ids containing each
|
* Sets the sem-colon separated list of Tool ids containing each
|
||||||
* tool that can create the final build artifact (the end target of
|
* tool that can create the final build artifact (the end target of
|
||||||
* the build).
|
* the build).
|
||||||
*/
|
*/
|
||||||
public void setTargetToolIds(String targetToolIds);
|
public void setTargetToolIds(String targetToolIds);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the list of Tool ids containing each
|
* Returns the list of Tool ids containing each
|
||||||
* tool that can create the final build artifact (the end target of
|
* tool that can create the final build artifact (the end target of
|
||||||
* the build). MBS will use the first ID in the list that matches
|
* the build). MBS will use the first ID in the list that matches
|
||||||
* a Tool in the ToolChain. One reason for specifying a list, is
|
* a Tool in the ToolChain. One reason for specifying a list, is
|
||||||
* that different versions of a tool can be selected based upon the
|
* that different versions of a tool can be selected based upon the
|
||||||
* project nature (e.g. different tool definitions for a linker for C vs. C++).
|
* project nature (e.g. different tool definitions for a linker for C vs. C++).
|
||||||
*
|
*
|
||||||
* @return String[]
|
* @return String[]
|
||||||
*/
|
*/
|
||||||
public String[] getTargetToolList();
|
public String[] getTargetToolList();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the OutputTypes in this tool-chain, besides the primary
|
* Returns the OutputTypes in this tool-chain, besides the primary
|
||||||
* output of the targetTool, that are also considered to be build
|
* output of the targetTool, that are also considered to be build
|
||||||
* artifacts.
|
* artifacts.
|
||||||
*
|
*
|
||||||
* @return IOutputType[]
|
* @return IOutputType[]
|
||||||
*/
|
*/
|
||||||
public IOutputType[] getSecondaryOutputs();
|
public IOutputType[] getSecondaryOutputs();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets the semicolon separated list of OutputType identifiers in
|
* Sets the semicolon separated list of OutputType identifiers in
|
||||||
* this tool-chain, besides the primary output of the targetTool,
|
* this tool-chain, besides the primary output of the targetTool,
|
||||||
* that are also considered to be build artifacts.
|
* that are also considered to be build artifacts.
|
||||||
*/
|
*/
|
||||||
public void setSecondaryOutputs(String ids);
|
public void setSecondaryOutputs(String ids);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns <code>true</code> if this tool-chain has changes that need to
|
* Returns <code>true</code> if this tool-chain has changes that need to
|
||||||
* be saved in the project file, else <code>false</code>.
|
* be saved in the project file, else <code>false</code>.
|
||||||
*
|
*
|
||||||
* @return boolean
|
* @return boolean
|
||||||
*/
|
*/
|
||||||
public boolean isDirty();
|
public boolean isDirty();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets the element's "dirty" (have I been modified?) flag.
|
* Sets the element's "dirty" (have I been modified?) flag.
|
||||||
*/
|
*/
|
||||||
public void setDirty(boolean isDirty);
|
public void setDirty(boolean isDirty);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns <code>true</code> if this tool-chain was loaded from a manifest file,
|
* Returns <code>true</code> if this tool-chain was loaded from a manifest file,
|
||||||
* and <code>false</code> if it was loaded from a project (.cdtbuild) file.
|
* and <code>false</code> if it was loaded from a project (.cdtbuild) file.
|
||||||
*
|
*
|
||||||
* @return boolean
|
* @return boolean
|
||||||
*/
|
*/
|
||||||
public boolean isExtensionElement();
|
public boolean isExtensionElement();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns <code>true</code> if the tool-chain support is installed on the system
|
* Returns <code>true</code> if the tool-chain support is installed on the system
|
||||||
* otherwise returns <code>false</code>
|
* otherwise returns <code>false</code>
|
||||||
*
|
*
|
||||||
* @return boolean
|
* @return boolean
|
||||||
*/
|
*/
|
||||||
public boolean isSupported();
|
public boolean isSupported();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the tool-integrator provided implementation of the configuration environment variable supplier
|
* Returns the tool-integrator provided implementation of the configuration environment variable supplier
|
||||||
* or <code>null</code> if none.
|
* or <code>null</code> if none.
|
||||||
*
|
*
|
||||||
* @return IConfigurationEnvironmentVariableSupplier
|
* @return IConfigurationEnvironmentVariableSupplier
|
||||||
*/
|
*/
|
||||||
public IConfigurationEnvironmentVariableSupplier getEnvironmentVariableSupplier();
|
public IConfigurationEnvironmentVariableSupplier getEnvironmentVariableSupplier();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the tool-integrator provided implementation of the configuration build macro supplier
|
* Returns the tool-integrator provided implementation of the configuration build macro supplier
|
||||||
* or <code>null</code> if none.
|
* or <code>null</code> if none.
|
||||||
*
|
*
|
||||||
* @return IConfigurationBuildMacroSupplier
|
* @return IConfigurationBuildMacroSupplier
|
||||||
*/
|
*/
|
||||||
public IConfigurationBuildMacroSupplier getBuildMacroSupplier();
|
public IConfigurationBuildMacroSupplier getBuildMacroSupplier();
|
||||||
|
@ -370,16 +382,16 @@ public interface IToolChain extends IBuildObject, IHoldsOptions {
|
||||||
* or null, if no conversion is required
|
* or null, if no conversion is required
|
||||||
*/
|
*/
|
||||||
public IOptionPathConverter getOptionPathConverter() ;
|
public IOptionPathConverter getOptionPathConverter() ;
|
||||||
|
|
||||||
IFolderInfo getParentFolderInfo();
|
IFolderInfo getParentFolderInfo();
|
||||||
|
|
||||||
CTargetPlatformData getTargetPlatformData();
|
CTargetPlatformData getTargetPlatformData();
|
||||||
|
|
||||||
boolean supportsBuild(boolean managed);
|
boolean supportsBuild(boolean managed);
|
||||||
|
|
||||||
boolean isSystemObject();
|
boolean isSystemObject();
|
||||||
|
|
||||||
boolean matches(IToolChain tc);
|
boolean matches(IToolChain tc);
|
||||||
|
|
||||||
String getUniqueRealName();
|
String getUniqueRealName();
|
||||||
}
|
}
|
||||||
|
|
|
@ -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
|
* All rights reserved. This program and the accompanying materials
|
||||||
* are made available under the terms of the Eclipse Public License v1.0
|
* are made available under the terms of the Eclipse Public License v1.0
|
||||||
* which accompanies this distribution, and is available at
|
* 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_STRING = ""; //$NON-NLS-1$
|
||||||
private static final String EMPTY_CFG_ID = "org.eclipse.cdt.build.core.emptycfg"; //$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
|
// Parent and children
|
||||||
private String parentId;
|
private String parentId;
|
||||||
|
@ -102,6 +105,8 @@ public class Configuration extends BuildObject implements IConfiguration, IBuild
|
||||||
private String cleanCommand;
|
private String cleanCommand;
|
||||||
private String artifactExtension;
|
private String artifactExtension;
|
||||||
private String errorParserIds;
|
private String errorParserIds;
|
||||||
|
private String defaultLanguageSettingsProvidersAttribute;
|
||||||
|
private String[] defaultLanguageSettingsProviderIds;
|
||||||
private String prebuildStep;
|
private String prebuildStep;
|
||||||
private String postbuildStep;
|
private String postbuildStep;
|
||||||
private String preannouncebuildStep;
|
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
|
// Get the semicolon separated list of IDs of the error parsers
|
||||||
errorParserIds = SafeStringInterner.safeIntern(element.getAttribute(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
|
// Get the artifact extension
|
||||||
artifactExtension = SafeStringInterner.safeIntern(element.getAttribute(EXTENSION));
|
artifactExtension = SafeStringInterner.safeIntern(element.getAttribute(EXTENSION));
|
||||||
|
|
||||||
|
@ -1453,6 +1461,62 @@ public class Configuration extends BuildObject implements IConfiguration, IBuild
|
||||||
return set;
|
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)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.managedbuilder.core.IConfiguration#setArtifactExtension(java.lang.String)
|
* @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.StringTokenizer;
|
||||||
import java.util.Vector;
|
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.ILanguage;
|
||||||
import org.eclipse.cdt.core.model.LanguageManager;
|
import org.eclipse.cdt.core.model.LanguageManager;
|
||||||
import org.eclipse.cdt.core.settings.model.ICStorageElement;
|
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.internal.core.SafeStringInterner;
|
||||||
import org.eclipse.cdt.managedbuilder.core.IAdditionalInput;
|
import org.eclipse.cdt.managedbuilder.core.IAdditionalInput;
|
||||||
import org.eclipse.cdt.managedbuilder.core.IBuildObject;
|
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.IFileInfo;
|
||||||
import org.eclipse.cdt.managedbuilder.core.IInputOrder;
|
import org.eclipse.cdt.managedbuilder.core.IInputOrder;
|
||||||
import org.eclipse.cdt.managedbuilder.core.IInputType;
|
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.internal.enablement.OptionEnablementExpression;
|
||||||
import org.eclipse.cdt.managedbuilder.makegen.IManagedDependencyGeneratorType;
|
import org.eclipse.cdt.managedbuilder.makegen.IManagedDependencyGeneratorType;
|
||||||
import org.eclipse.core.resources.IProject;
|
import org.eclipse.core.resources.IProject;
|
||||||
|
import org.eclipse.core.resources.IResource;
|
||||||
import org.eclipse.core.runtime.CoreException;
|
import org.eclipse.core.runtime.CoreException;
|
||||||
import org.eclipse.core.runtime.IConfigurationElement;
|
import org.eclipse.core.runtime.IConfigurationElement;
|
||||||
import org.eclipse.core.runtime.IPath;
|
import org.eclipse.core.runtime.IPath;
|
||||||
|
@ -1838,9 +1841,58 @@ public class InputType extends BuildObject implements IInputType {
|
||||||
return id;
|
return id;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getDiscoveryProfileIdAttribute(){
|
/**
|
||||||
if(buildInfoDicsoveryProfileId == null && superClass != null)
|
* Check if legacy scanner discovery method should be used.
|
||||||
return ((InputType)superClass).getDiscoveryProfileIdAttribute();
|
*/
|
||||||
|
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;
|
return buildInfoDicsoveryProfileId;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -50,16 +50,16 @@ import org.eclipse.core.runtime.IPath;
|
||||||
import org.osgi.framework.Version;
|
import org.osgi.framework.Version;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This class represents a set of configurations
|
* This class represents a set of configurations
|
||||||
* to be edited simultaneously on property pages.
|
* to be edited simultaneously on property pages.
|
||||||
*/
|
*/
|
||||||
public class MultiConfiguration extends MultiItemsHolder implements
|
public class MultiConfiguration extends MultiItemsHolder implements
|
||||||
IMultiConfiguration {
|
IMultiConfiguration {
|
||||||
private static final String[] EMPTY_STR_ARRAY = new String[0];
|
private static final String[] EMPTY_STR_ARRAY = new String[0];
|
||||||
|
|
||||||
protected IConfiguration[] fCfgs = null;
|
protected IConfiguration[] fCfgs = null;
|
||||||
private int curr = 0;
|
private int curr = 0;
|
||||||
|
|
||||||
public MultiConfiguration(IConfiguration[] cfs) {
|
public MultiConfiguration(IConfiguration[] cfs) {
|
||||||
fCfgs = cfs;
|
fCfgs = cfs;
|
||||||
for (int i=0; i<fCfgs.length; i++)
|
for (int i=0; i<fCfgs.length; i++)
|
||||||
|
@ -68,19 +68,19 @@ public class MultiConfiguration extends MultiItemsHolder implements
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public MultiConfiguration(ICConfigurationDescription[] cfds) {
|
public MultiConfiguration(ICConfigurationDescription[] cfds) {
|
||||||
this(cfds2cfs(cfds));
|
this(cfds2cfs(cfds));
|
||||||
}
|
}
|
||||||
|
|
||||||
public static IConfiguration[] cfds2cfs(ICConfigurationDescription[] cfgds) {
|
public static IConfiguration[] cfds2cfs(ICConfigurationDescription[] cfgds) {
|
||||||
IConfiguration[] cfs = new IConfiguration[cfgds.length];
|
IConfiguration[] cfs = new IConfiguration[cfgds.length];
|
||||||
for (int i=0; i<cfgds.length; i++)
|
for (int i=0; i<cfgds.length; i++)
|
||||||
cfs[i] = ManagedBuildManager.getConfigurationForDescription(cfgds[i]);
|
cfs[i] = ManagedBuildManager.getConfigurationForDescription(cfgds[i]);
|
||||||
return cfs;
|
return cfs;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.core.settings.model.MultiItemsHolder#getItems()
|
* @see org.eclipse.cdt.core.settings.model.MultiItemsHolder#getItems()
|
||||||
*/
|
*/
|
||||||
|
@ -211,24 +211,24 @@ public class MultiConfiguration extends MultiItemsHolder implements
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public IManagedCommandLineInfo generateToolCommandLineInfo(
|
public IManagedCommandLineInfo generateToolCommandLineInfo(
|
||||||
String sourceExtension,
|
String sourceExtension,
|
||||||
String[] flags,
|
String[] flags,
|
||||||
String outputFlag,
|
String outputFlag,
|
||||||
String outputPrefix,
|
String outputPrefix,
|
||||||
String outputName,
|
String outputName,
|
||||||
String[] inputResources,
|
String[] inputResources,
|
||||||
IPath inputLocation,
|
IPath inputLocation,
|
||||||
IPath outputLocation) {
|
IPath outputLocation) {
|
||||||
if (DEBUG)
|
if (DEBUG)
|
||||||
System.out.println("Strange multi access: MultiConfiguration.generateToolCommandLineInfo()"); //$NON-NLS-1$
|
System.out.println("Strange multi access: MultiConfiguration.generateToolCommandLineInfo()"); //$NON-NLS-1$
|
||||||
return curr().generateToolCommandLineInfo(
|
return curr().generateToolCommandLineInfo(
|
||||||
sourceExtension,
|
sourceExtension,
|
||||||
flags,
|
flags,
|
||||||
outputFlag,
|
outputFlag,
|
||||||
outputPrefix,
|
outputPrefix,
|
||||||
outputName,
|
outputName,
|
||||||
inputResources,
|
inputResources,
|
||||||
inputLocation,
|
inputLocation,
|
||||||
outputLocation);
|
outputLocation);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -243,7 +243,7 @@ public class MultiConfiguration extends MultiItemsHolder implements
|
||||||
return EMPTY_STR;
|
return EMPTY_STR;
|
||||||
return s;
|
return s;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String[] getArtifactExtensions() {
|
public String[] getArtifactExtensions() {
|
||||||
String[] s = new String[fCfgs.length];
|
String[] s = new String[fCfgs.length];
|
||||||
for (int i=0; i<fCfgs.length; i++)
|
for (int i=0; i<fCfgs.length; i++)
|
||||||
|
@ -278,7 +278,7 @@ public class MultiConfiguration extends MultiItemsHolder implements
|
||||||
String args0 = fCfgs[0].getBuildArguments();
|
String args0 = fCfgs[0].getBuildArguments();
|
||||||
if (args0 == null)
|
if (args0 == null)
|
||||||
args0 = EMPTY_STR;
|
args0 = EMPTY_STR;
|
||||||
|
|
||||||
for (IConfiguration cfg : fCfgs) {
|
for (IConfiguration cfg : fCfgs) {
|
||||||
String args = cfg.getBuildArguments();
|
String args = cfg.getBuildArguments();
|
||||||
if (args == null)
|
if (args == null)
|
||||||
|
@ -294,7 +294,7 @@ public class MultiConfiguration extends MultiItemsHolder implements
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public IBuildPropertyValue getBuildArtefactType() {
|
public IBuildPropertyValue getBuildArtefactType() {
|
||||||
IBuildPropertyValue b = fCfgs[0].getBuildArtefactType();
|
IBuildPropertyValue b = fCfgs[0].getBuildArtefactType();
|
||||||
if (b == null)
|
if (b == null)
|
||||||
return null;
|
return null;
|
||||||
for (int i=1; i<fCfgs.length; i++)
|
for (int i=1; i<fCfgs.length; i++)
|
||||||
|
@ -414,7 +414,7 @@ public class MultiConfiguration extends MultiItemsHolder implements
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.managedbuilder.core.IConfiguration#getErrorParserIds()
|
* @see org.eclipse.cdt.managedbuilder.core.IConfiguration#getErrorParserIds()
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getErrorParserIds() {
|
public String getErrorParserIds() {
|
||||||
String s = fCfgs[0].getErrorParserIds();
|
String s = fCfgs[0].getErrorParserIds();
|
||||||
|
@ -440,6 +440,12 @@ public class MultiConfiguration extends MultiItemsHolder implements
|
||||||
return s;
|
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)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.managedbuilder.core.IConfiguration#getFilteredTools()
|
* @see org.eclipse.cdt.managedbuilder.core.IConfiguration#getFilteredTools()
|
||||||
*/
|
*/
|
||||||
|
@ -842,9 +848,9 @@ public class MultiConfiguration extends MultiItemsHolder implements
|
||||||
return false;
|
return false;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean[] isManagedBuildOnMulti() {
|
public boolean[] isManagedBuildOnMulti() {
|
||||||
boolean[] b = new boolean[fCfgs.length];
|
boolean[] b = new boolean[fCfgs.length];
|
||||||
for (int i=0; i<fCfgs.length; i++)
|
for (int i=0; i<fCfgs.length; i++)
|
||||||
b[i] = fCfgs[i].isManagedBuildOn();
|
b[i] = fCfgs[i].isManagedBuildOn();
|
||||||
return b;
|
return b;
|
||||||
|
@ -1026,7 +1032,7 @@ public class MultiConfiguration extends MultiItemsHolder implements
|
||||||
* @see org.eclipse.cdt.managedbuilder.core.IConfiguration#setName(java.lang.String)
|
* @see org.eclipse.cdt.managedbuilder.core.IConfiguration#setName(java.lang.String)
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public void setName(String name) {} // do nothing
|
public void setName(String name) {} // do nothing
|
||||||
|
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.managedbuilder.core.IConfiguration#setOption(org.eclipse.cdt.managedbuilder.core.IHoldsOptions, org.eclipse.cdt.managedbuilder.core.IOption, boolean)
|
* @see org.eclipse.cdt.managedbuilder.core.IConfiguration#setOption(org.eclipse.cdt.managedbuilder.core.IHoldsOptions, org.eclipse.cdt.managedbuilder.core.IOption, boolean)
|
||||||
|
@ -1209,7 +1215,7 @@ public class MultiConfiguration extends MultiItemsHolder implements
|
||||||
}
|
}
|
||||||
return true; // all cfgs report true
|
return true; // all cfgs report true
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void setParallelDef(boolean parallel) {
|
public void setParallelDef(boolean parallel) {
|
||||||
for (IConfiguration cfg : fCfgs) {
|
for (IConfiguration cfg : fCfgs) {
|
||||||
|
@ -1217,7 +1223,7 @@ public class MultiConfiguration extends MultiItemsHolder implements
|
||||||
((Configuration)cfg).setParallelDef(parallel);
|
((Configuration)cfg).setParallelDef(parallel);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int getParallelNumber() {
|
public int getParallelNumber() {
|
||||||
int res = 0;
|
int res = 0;
|
||||||
|
@ -1226,7 +1232,7 @@ public class MultiConfiguration extends MultiItemsHolder implements
|
||||||
int num = ((Configuration)cfg).getParallelNumber();
|
int num = ((Configuration)cfg).getParallelNumber();
|
||||||
Assert.isTrue(num != 0); // can't be 0, see IMakeCommonBuildInfo.getParallelizationNum()
|
Assert.isTrue(num != 0); // can't be 0, see IMakeCommonBuildInfo.getParallelizationNum()
|
||||||
|
|
||||||
if (res == 0)
|
if (res == 0)
|
||||||
res = num;
|
res = num;
|
||||||
else if (res != num)
|
else if (res != num)
|
||||||
return 0; // values are different !
|
return 0; // values are different !
|
||||||
|
@ -1235,7 +1241,7 @@ public class MultiConfiguration extends MultiItemsHolder implements
|
||||||
}
|
}
|
||||||
return res; // all cfgs report same value
|
return res; // all cfgs report same value
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void setParallelNumber(int num) {
|
public void setParallelNumber(int num) {
|
||||||
for (IConfiguration cfg : fCfgs) {
|
for (IConfiguration cfg : fCfgs) {
|
||||||
|
@ -1243,12 +1249,12 @@ public class MultiConfiguration extends MultiItemsHolder implements
|
||||||
((Configuration)cfg).setParallelNumber(num);
|
((Configuration)cfg).setParallelNumber(num);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean getInternalBuilderParallel() {
|
public boolean getInternalBuilderParallel() {
|
||||||
return getParallelDef();
|
return getParallelDef();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean isInternalBuilderEnabled() {
|
public boolean isInternalBuilderEnabled() {
|
||||||
for (int i=0; i<fCfgs.length; i++)
|
for (int i=0; i<fCfgs.length; i++)
|
||||||
|
@ -1270,14 +1276,14 @@ public class MultiConfiguration extends MultiItemsHolder implements
|
||||||
return false;
|
return false;
|
||||||
return true; // all cfgs report true
|
return true; // all cfgs report true
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void enableInternalBuilder(boolean v) {
|
public void enableInternalBuilder(boolean v) {
|
||||||
for (int i=0; i<fCfgs.length; i++)
|
for (int i=0; i<fCfgs.length; i++)
|
||||||
if (fCfgs[i] instanceof Configuration)
|
if (fCfgs[i] instanceof Configuration)
|
||||||
((Configuration)fCfgs[i]).enableInternalBuilder(v);
|
((Configuration)fCfgs[i]).enableInternalBuilder(v);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns "default" configuration.
|
* Returns "default" configuration.
|
||||||
*/
|
*/
|
||||||
|
@ -1362,7 +1368,7 @@ public class MultiConfiguration extends MultiItemsHolder implements
|
||||||
ManagedBuilderCorePlugin.log(e);
|
ManagedBuilderCorePlugin.log(e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getBuildAttribute(String name, String defValue) {
|
public String getBuildAttribute(String name, String defValue) {
|
||||||
String res = defValue;
|
String res = defValue;
|
||||||
IBuilder b = fCfgs[0].getBuilder();
|
IBuilder b = fCfgs[0].getBuilder();
|
||||||
|
|
|
@ -24,6 +24,7 @@ import java.util.SortedMap;
|
||||||
import java.util.StringTokenizer;
|
import java.util.StringTokenizer;
|
||||||
|
|
||||||
import org.eclipse.cdt.build.internal.core.scannerconfig.CfgDiscoveredPathManager.PathInfoCache;
|
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.ICStorageElement;
|
||||||
import org.eclipse.cdt.core.settings.model.extension.CTargetPlatformData;
|
import org.eclipse.cdt.core.settings.model.extension.CTargetPlatformData;
|
||||||
import org.eclipse.cdt.core.settings.model.util.CDataUtil;
|
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.dataprovider.ConfigurationDataProvider;
|
||||||
import org.eclipse.cdt.managedbuilder.internal.enablement.OptionEnablementExpression;
|
import org.eclipse.cdt.managedbuilder.internal.enablement.OptionEnablementExpression;
|
||||||
import org.eclipse.cdt.managedbuilder.macros.IConfigurationBuildMacroSupplier;
|
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.CoreException;
|
||||||
import org.eclipse.core.runtime.IConfigurationElement;
|
import org.eclipse.core.runtime.IConfigurationElement;
|
||||||
import org.eclipse.core.runtime.IExtension;
|
import org.eclipse.core.runtime.IExtension;
|
||||||
|
@ -85,6 +88,7 @@ public class ToolChain extends HoldsOptions implements IToolChain, IMatchKeyProv
|
||||||
private String targetToolIds;
|
private String targetToolIds;
|
||||||
private String secondaryOutputIds;
|
private String secondaryOutputIds;
|
||||||
private Boolean isAbstract;
|
private Boolean isAbstract;
|
||||||
|
private String defaultLanguageSettingsProviderIds;
|
||||||
private String scannerConfigDiscoveryProfileId;
|
private String scannerConfigDiscoveryProfileId;
|
||||||
private String versionsSupported;
|
private String versionsSupported;
|
||||||
private String convertToId;
|
private String convertToId;
|
||||||
|
@ -554,6 +558,9 @@ public class ToolChain extends HoldsOptions implements IToolChain, IMatchKeyProv
|
||||||
// Get the target tool id
|
// Get the target tool id
|
||||||
targetToolIds = SafeStringInterner.safeIntern(element.getAttribute(TARGET_TOOL));
|
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
|
// Get the scanner config discovery profile id
|
||||||
scannerConfigDiscoveryProfileId = SafeStringInterner.safeIntern(element.getAttribute(SCANNER_CONFIG_PROFILE_ID));
|
scannerConfigDiscoveryProfileId = SafeStringInterner.safeIntern(element.getAttribute(SCANNER_CONFIG_PROFILE_ID));
|
||||||
String tmp = element.getAttribute(RESOURCE_TYPE_BASED_DISCOVERY);
|
String tmp = element.getAttribute(RESOURCE_TYPE_BASED_DISCOVERY);
|
||||||
|
@ -1529,18 +1536,68 @@ public class ToolChain extends HoldsOptions implements IToolChain, IMatchKeyProv
|
||||||
setDirty(true);
|
setDirty(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* (non-Javadoc)
|
@Override
|
||||||
* @see org.eclipse.cdt.managedbuilder.core.IToolChain#getScannerConfigDiscoveryProfileId()
|
public String getDefaultLanguageSettingsProviderIds() {
|
||||||
*/
|
if (defaultLanguageSettingsProviderIds == null && superClass instanceof IToolChain) {
|
||||||
@Override
|
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() {
|
public String getScannerConfigDiscoveryProfileId() {
|
||||||
if (scannerConfigDiscoveryProfileId == null) {
|
if (isLegacyScannerDiscovery()) {
|
||||||
if (getSuperClass() != null) {
|
return getLegacyScannerConfigDiscoveryProfileId();
|
||||||
return getSuperClass().getScannerConfigDiscoveryProfileId();
|
}
|
||||||
}
|
|
||||||
}
|
return getScannerConfigDiscoveryProfileIdInternal();
|
||||||
return scannerConfigDiscoveryProfileId;
|
}
|
||||||
}
|
|
||||||
|
/**
|
||||||
|
* 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;
|
||||||
|
}
|
||||||
|
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.managedbuilder.core.IToolChain#setScannerConfigDiscoveryProfileId(java.lang.String)
|
* @see org.eclipse.cdt.managedbuilder.core.IToolChain#setScannerConfigDiscoveryProfileId(java.lang.String)
|
||||||
|
|
|
@ -20,6 +20,10 @@ import java.util.Map;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
|
||||||
import org.eclipse.cdt.build.internal.core.scannerconfig2.CfgScannerConfigInfoFactory2;
|
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.ILanguageDescriptor;
|
||||||
import org.eclipse.cdt.core.model.LanguageManager;
|
import org.eclipse.cdt.core.model.LanguageManager;
|
||||||
import org.eclipse.cdt.core.settings.model.ICConfigurationDescription;
|
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
|
// Update the ManagedBuildInfo in the ManagedBuildManager map. Doing this creates a barrier for subsequent
|
||||||
// ManagedBuildManager#getBuildInfo(...) see Bug 305146 for more
|
// ManagedBuildManager#getBuildInfo(...) see Bug 305146 for more
|
||||||
ManagedBuildManager.setLoaddedBuildInfo(cfgDescription.getProjectDescription().getProject(), info);
|
ManagedBuildManager.setLoaddedBuildInfo(cfgDescription.getProjectDescription().getProject(), info);
|
||||||
|
setDefaultLanguageSettingsProvidersIds(cfg, cfgDescription);
|
||||||
return cfg.getConfigurationData();
|
return cfg.getConfigurationData();
|
||||||
}
|
}
|
||||||
return null;
|
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){
|
private boolean isPersistedCfg(ICConfigurationDescription cfgDescription){
|
||||||
return cfgDescription.getSessionProperty(CFG_PERSISTED_PROPERTY) != null;
|
return cfgDescription.getSessionProperty(CFG_PERSISTED_PROPERTY) != null;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1269,7 +1269,6 @@
|
||||||
dependencyExtensions="h"
|
dependencyExtensions="h"
|
||||||
dependencyCalculator="org.eclipse.cdt.managedbuilder.makegen.gnu.DefaultGCCDependencyCalculator2"
|
dependencyCalculator="org.eclipse.cdt.managedbuilder.makegen.gnu.DefaultGCCDependencyCalculator2"
|
||||||
id="cdt.managedbuild.tool.gnu.c.compiler.input"
|
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">
|
languageId="org.eclipse.cdt.core.gcc">
|
||||||
</inputType>
|
</inputType>
|
||||||
<outputType
|
<outputType
|
||||||
|
@ -1591,7 +1590,6 @@
|
||||||
dependencyExtensions="h,H,hpp"
|
dependencyExtensions="h,H,hpp"
|
||||||
dependencyCalculator="org.eclipse.cdt.managedbuilder.makegen.gnu.DefaultGCCDependencyCalculator2"
|
dependencyCalculator="org.eclipse.cdt.managedbuilder.makegen.gnu.DefaultGCCDependencyCalculator2"
|
||||||
id="cdt.managedbuild.tool.gnu.cpp.compiler.input"
|
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++">
|
languageId="org.eclipse.cdt.core.g++">
|
||||||
</inputType>
|
</inputType>
|
||||||
<outputType
|
<outputType
|
||||||
|
@ -1658,7 +1656,7 @@
|
||||||
<inputType
|
<inputType
|
||||||
id="cdt.managedbuild.tool.gnu.c.compiler.input.cygwin"
|
id="cdt.managedbuild.tool.gnu.c.compiler.input.cygwin"
|
||||||
superClass="cdt.managedbuild.tool.gnu.c.compiler.input"
|
superClass="cdt.managedbuild.tool.gnu.c.compiler.input"
|
||||||
scannerConfigDiscoveryProfileId="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileC"/>
|
/>
|
||||||
</tool>
|
</tool>
|
||||||
<tool
|
<tool
|
||||||
id="cdt.managedbuild.tool.gnu.cpp.compiler.cygwin"
|
id="cdt.managedbuild.tool.gnu.cpp.compiler.cygwin"
|
||||||
|
@ -1672,7 +1670,7 @@
|
||||||
<inputType
|
<inputType
|
||||||
id="cdt.managedbuild.tool.gnu.cpp.compiler.input.cygwin"
|
id="cdt.managedbuild.tool.gnu.cpp.compiler.input.cygwin"
|
||||||
superClass="cdt.managedbuild.tool.gnu.cpp.compiler.input"
|
superClass="cdt.managedbuild.tool.gnu.cpp.compiler.input"
|
||||||
scannerConfigDiscoveryProfileId="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileCPP"/>
|
/>
|
||||||
</tool>
|
</tool>
|
||||||
|
|
||||||
<builder
|
<builder
|
||||||
|
@ -1704,11 +1702,12 @@
|
||||||
</builder>
|
</builder>
|
||||||
|
|
||||||
<toolChain
|
<toolChain
|
||||||
archList="all"
|
archList="all"
|
||||||
osList="linux,hpux,aix,qnx"
|
id="cdt.managedbuild.toolchain.gnu.base"
|
||||||
name="%ToolChainName.Linux"
|
languageSettingsProviders="org.eclipse.cdt.managedbuilder.core.GCCBuildCommandParser;org.eclipse.cdt.managedbuilder.core.GCCBuiltinSpecsDetector"
|
||||||
targetTool="cdt.managedbuild.tool.gnu.c.linker;cdt.managedbuild.tool.gnu.cpp.linker;cdt.managedbuild.tool.gnu.archiver"
|
name="%ToolChainName.Linux"
|
||||||
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
|
<targetPlatform
|
||||||
id="cdt.managedbuild.target.gnu.platform.base"
|
id="cdt.managedbuild.target.gnu.platform.base"
|
||||||
name="%PlatformName.Dbg"
|
name="%PlatformName.Dbg"
|
||||||
|
@ -1773,6 +1772,7 @@
|
||||||
configurationEnvironmentSupplier="org.eclipse.cdt.managedbuilder.gnu.cygwin.GnuCygwinConfigurationEnvironmentSupplier"
|
configurationEnvironmentSupplier="org.eclipse.cdt.managedbuilder.gnu.cygwin.GnuCygwinConfigurationEnvironmentSupplier"
|
||||||
id="cdt.managedbuild.toolchain.gnu.cygwin.base"
|
id="cdt.managedbuild.toolchain.gnu.cygwin.base"
|
||||||
isToolChainSupported="org.eclipse.cdt.managedbuilder.gnu.cygwin.IsGnuCygwinToolChainSupported"
|
isToolChainSupported="org.eclipse.cdt.managedbuilder.gnu.cygwin.IsGnuCygwinToolChainSupported"
|
||||||
|
languageSettingsProviders="org.eclipse.cdt.managedbuilder.core.GCCBuildCommandParser;org.eclipse.cdt.managedbuilder.core.GCCBuiltinSpecsDetector"
|
||||||
name="%ToolChainName.Cygwin"
|
name="%ToolChainName.Cygwin"
|
||||||
osList="win32"
|
osList="win32"
|
||||||
targetTool="cdt.managedbuild.tool.gnu.cpp.linker.cygwin.base;cdt.managedbuild.tool.gnu.c.linker.cygwin.base;cdt.managedbuild.tool.gnu.archiver">
|
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"
|
configurationEnvironmentSupplier="org.eclipse.cdt.managedbuilder.gnu.mingw.MingwEnvironmentVariableSupplier"
|
||||||
id="cdt.managedbuild.toolchain.gnu.mingw.base"
|
id="cdt.managedbuild.toolchain.gnu.mingw.base"
|
||||||
isToolChainSupported="org.eclipse.cdt.managedbuilder.gnu.mingw.MingwIsToolChainSupported"
|
isToolChainSupported="org.eclipse.cdt.managedbuilder.gnu.mingw.MingwIsToolChainSupported"
|
||||||
|
languageSettingsProviders="org.eclipse.cdt.managedbuilder.core.GCCBuildCommandParser;org.eclipse.cdt.managedbuilder.core.GCCBuiltinSpecsDetector"
|
||||||
name="%ToolChainName.MinGW"
|
name="%ToolChainName.MinGW"
|
||||||
osList="win32"
|
osList="win32"
|
||||||
targetTool="cdt.managedbuild.tool.gnu.cpp.linker.mingw.base;cdt.managedbuild.tool.gnu.c.linker.mingw.base;cdt.managedbuild.tool.gnu.archiver">
|
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>
|
</toolChain>
|
||||||
|
|
||||||
<configuration
|
<configuration
|
||||||
id="cdt.managedbuild.config.gnu.base"
|
|
||||||
cleanCommand="rm -rf"
|
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"
|
<enablement type="CONTAINER_ATTRIBUTE"
|
||||||
attribute="artifactExtension"
|
attribute="artifactExtension"
|
||||||
value="so"
|
value="so"
|
||||||
|
@ -2480,27 +2481,27 @@
|
||||||
</projectType>
|
</projectType>
|
||||||
|
|
||||||
<configuration
|
<configuration
|
||||||
id="cdt.managedbuild.config.gnu.cygwin.base"
|
artifactExtension="exe"
|
||||||
cleanCommand="rm -rf"
|
cleanCommand="rm -rf"
|
||||||
artifactExtension="exe"
|
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"
|
<enablement type="CONTAINER_ATTRIBUTE"
|
||||||
attribute="artifactExtension"
|
attribute="artifactExtension"
|
||||||
value="dll"
|
value="dll"
|
||||||
extensionAdjustment="false">
|
extensionAdjustment="false">
|
||||||
<checkBuildProperty
|
<checkBuildProperty
|
||||||
property="org.eclipse.cdt.build.core.buildArtefactType"
|
property="org.eclipse.cdt.build.core.buildArtefactType"
|
||||||
value="org.eclipse.cdt.build.core.buildArtefactType.sharedLib"/>
|
value="org.eclipse.cdt.build.core.buildArtefactType.sharedLib"/>
|
||||||
</enablement>
|
</enablement>
|
||||||
<enablement type="CONTAINER_ATTRIBUTE"
|
<enablement type="CONTAINER_ATTRIBUTE"
|
||||||
attribute="artifactExtension"
|
attribute="artifactExtension"
|
||||||
value="a"
|
value="a"
|
||||||
extensionAdjustment="false">
|
extensionAdjustment="false">
|
||||||
<checkBuildProperty
|
<checkBuildProperty
|
||||||
property="org.eclipse.cdt.build.core.buildArtefactType"
|
property="org.eclipse.cdt.build.core.buildArtefactType"
|
||||||
value="org.eclipse.cdt.build.core.buildArtefactType.staticLib"/>
|
value="org.eclipse.cdt.build.core.buildArtefactType.staticLib"/>
|
||||||
</enablement>
|
</enablement>
|
||||||
</configuration>
|
</configuration>
|
||||||
|
|
||||||
<projectType
|
<projectType
|
||||||
buildArtefactType="org.eclipse.cdt.build.core.buildArtefactType.exe"
|
buildArtefactType="org.eclipse.cdt.build.core.buildArtefactType.exe"
|
||||||
|
@ -2878,10 +2879,10 @@
|
||||||
</projectType>
|
</projectType>
|
||||||
|
|
||||||
<configuration
|
<configuration
|
||||||
id="cdt.managedbuild.config.gnu.mingw.base"
|
artifactExtension="exe"
|
||||||
cleanCommand="rm -rf"
|
cleanCommand="rm -rf"
|
||||||
artifactExtension="exe"
|
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"
|
<enablement type="CONTAINER_ATTRIBUTE"
|
||||||
attribute="artifactExtension"
|
attribute="artifactExtension"
|
||||||
value="dll"
|
value="dll"
|
||||||
|
|
|
@ -207,6 +207,12 @@ public class TestConfiguration implements IConfiguration {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String[] getDefaultLanguageSettingsProviderIds() {
|
||||||
|
// TODO Auto-generated method stub
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public ITool[] getFilteredTools() {
|
public ITool[] getFilteredTools() {
|
||||||
// TODO Auto-generated method stub
|
// TODO Auto-generated method stub
|
||||||
|
|
|
@ -363,7 +363,11 @@ public class TestToolchain extends HoldsOptions implements IToolChain {
|
||||||
// TODO Auto-generated method stub
|
// TODO Auto-generated method stub
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getDefaultLanguageSettingsProviderIds() {
|
||||||
|
// TODO Auto-generated method stub
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -577,8 +577,13 @@
|
||||||
>
|
>
|
||||||
<enabledWhen>
|
<enabledWhen>
|
||||||
<adapt type="org.eclipse.core.resources.IProject">
|
<adapt type="org.eclipse.core.resources.IProject">
|
||||||
<test property="org.eclipse.core.resources.projectNature"
|
<and>
|
||||||
value="org.eclipse.cdt.managedbuilder.core.managedBuildNature"/>
|
<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>
|
</adapt>
|
||||||
</enabledWhen>
|
</enabledWhen>
|
||||||
</page>
|
</page>
|
||||||
|
|
|
@ -223,6 +223,7 @@ public class Messages extends NLS {
|
||||||
public static String PropertyPageDefsTab_9;
|
public static String PropertyPageDefsTab_9;
|
||||||
public static String PropertyPageDefsTab_showIncludeFileTab;
|
public static String PropertyPageDefsTab_showIncludeFileTab;
|
||||||
public static String PropertyPageDefsTab_showProvidersTab;
|
public static String PropertyPageDefsTab_showProvidersTab;
|
||||||
|
public static String PropertyPageDefsTab_showScannerDiscoveryTab;
|
||||||
public static String RefreshPolicyExceptionDialog_addDialogLabel;
|
public static String RefreshPolicyExceptionDialog_addDialogLabel;
|
||||||
public static String RefreshPolicyExceptionDialog_AddExceptionInfoDialog_message;
|
public static String RefreshPolicyExceptionDialog_AddExceptionInfoDialog_message;
|
||||||
public static String RefreshPolicyExceptionDialog_AddExceptionInfoDialog_title;
|
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_8=Always show names + profile IDs
|
||||||
PropertyPageDefsTab_9=Always show profile IDs only
|
PropertyPageDefsTab_9=Always show profile IDs only
|
||||||
PropertyPageDefsTab_showIncludeFileTab=Display "Include Files" tab
|
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
|
ProjectConvert_convertersList=Converters List
|
||||||
|
|
||||||
AbstractPrefPage_0=\ Preference settings will be applied to new projects \n only when there were no toolchains selected.
|
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;
|
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.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.managedbuilder.internal.ui.Messages;
|
||||||
import org.eclipse.cdt.ui.newui.AbstractCPropertyTab;
|
import org.eclipse.cdt.ui.newui.AbstractCPropertyTab;
|
||||||
import org.eclipse.cdt.ui.newui.CDTPrefUtil;
|
import org.eclipse.cdt.ui.newui.CDTPrefUtil;
|
||||||
|
@ -34,109 +34,116 @@ public class PropertyPageDefsTab extends AbstractCPropertyTab {
|
||||||
|
|
||||||
private static final int SPACING = 5; // for radio buttons layout
|
private static final int SPACING = 5; // for radio buttons layout
|
||||||
|
|
||||||
private Button show_tree;
|
private Button show_tree;
|
||||||
private Button show_inc_files;
|
private Button show_inc_files;
|
||||||
private Button show_mng;
|
private Button show_mng;
|
||||||
private Button show_tool;
|
private Button show_tool;
|
||||||
private Button show_exp;
|
private Button show_exp;
|
||||||
private Button show_providers_tab; // temporary checkbox for scanner discovery Providers tab
|
private Button show_sd;
|
||||||
private Button show_tipbox;
|
private Button show_providers_tab; // temporary checkbox for scanner discovery Providers tab
|
||||||
|
private Button show_tipbox;
|
||||||
|
|
||||||
private Button b_0;
|
private Button b_0;
|
||||||
private Button b_1;
|
private Button b_1;
|
||||||
private Button b_2;
|
private Button b_2;
|
||||||
private Button b_3;
|
private Button b_3;
|
||||||
|
|
||||||
private Button s_0;
|
private Button s_0;
|
||||||
private Button s_1;
|
private Button s_1;
|
||||||
private Button s_2;
|
private Button s_2;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void createControls(Composite parent) {
|
public void createControls(Composite parent) {
|
||||||
super.createControls(parent);
|
super.createControls(parent);
|
||||||
usercomp.setLayout(new GridLayout(1, false));
|
usercomp.setLayout(new GridLayout(1, false));
|
||||||
|
|
||||||
show_mng = new Button(usercomp, SWT.CHECK);
|
show_mng = new Button(usercomp, SWT.CHECK);
|
||||||
show_mng.setText(Messages.PropertyPageDefsTab_0);
|
show_mng.setText(Messages.PropertyPageDefsTab_0);
|
||||||
show_mng.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
|
show_mng.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
|
||||||
|
|
||||||
show_inc_files = new Button(usercomp, SWT.CHECK);
|
show_inc_files = new Button(usercomp, SWT.CHECK);
|
||||||
show_inc_files.setText(Messages.PropertyPageDefsTab_showIncludeFileTab);
|
show_inc_files.setText(Messages.PropertyPageDefsTab_showIncludeFileTab);
|
||||||
show_inc_files.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
|
show_inc_files.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
|
||||||
|
|
||||||
show_tree = new Button(usercomp, SWT.CHECK);
|
show_tree = new Button(usercomp, SWT.CHECK);
|
||||||
show_tree.setText(Messages.PropertyPageDefsTab_1);
|
show_tree.setText(Messages.PropertyPageDefsTab_1);
|
||||||
show_tree.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
|
show_tree.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
|
||||||
|
|
||||||
show_tool = new Button(usercomp, SWT.CHECK);
|
show_tool = new Button(usercomp, SWT.CHECK);
|
||||||
show_tool.setText(Messages.PropertyPageDefsTab_4);
|
show_tool.setText(Messages.PropertyPageDefsTab_4);
|
||||||
show_tool.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
|
show_tool.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
|
||||||
|
|
||||||
show_exp = new Button(usercomp, SWT.CHECK);
|
show_exp = new Button(usercomp, SWT.CHECK);
|
||||||
show_exp.setText(Messages.PropertyPageDefsTab_10);
|
show_exp.setText(Messages.PropertyPageDefsTab_10);
|
||||||
show_exp.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
|
show_exp.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
|
||||||
|
|
||||||
show_providers_tab = new Button(usercomp, SWT.CHECK);
|
show_sd = new Button(usercomp, SWT.CHECK);
|
||||||
show_providers_tab.setText(Messages.PropertyPageDefsTab_showProvidersTab);
|
show_sd.setText(Messages.PropertyPageDefsTab_showScannerDiscoveryTab);
|
||||||
show_providers_tab.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
|
show_sd.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
|
||||||
|
|
||||||
show_tipbox = new Button(usercomp, SWT.CHECK);
|
show_providers_tab = new Button(usercomp, SWT.CHECK);
|
||||||
show_tipbox.setText(Messages.PropertyPageDefsTab_16);
|
show_providers_tab.setText(Messages.PropertyPageDefsTab_showProvidersTab);
|
||||||
show_tipbox.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
|
show_providers_tab.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
|
||||||
|
|
||||||
Group saveGrp = new Group(usercomp, SWT.NONE);
|
show_tipbox = new Button(usercomp, SWT.CHECK);
|
||||||
saveGrp.setText(Messages.PropertyPageDefsTab_11);
|
show_tipbox.setText(Messages.PropertyPageDefsTab_16);
|
||||||
saveGrp.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
|
show_tipbox.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
|
||||||
FillLayout fl = new FillLayout(SWT.VERTICAL);
|
|
||||||
fl.spacing = SPACING;
|
|
||||||
fl.marginHeight = SPACING;
|
|
||||||
fl.marginWidth = SPACING;
|
|
||||||
saveGrp.setLayout(fl);
|
|
||||||
|
|
||||||
s_0 = new Button(saveGrp, SWT.RADIO);
|
Group saveGrp = new Group(usercomp, SWT.NONE);
|
||||||
s_0.setText(Messages.PropertyPageDefsTab_13);
|
saveGrp.setText(Messages.PropertyPageDefsTab_11);
|
||||||
s_1 = new Button(saveGrp, SWT.RADIO);
|
saveGrp.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
|
||||||
s_1.setText(Messages.PropertyPageDefsTab_12);
|
FillLayout fl = new FillLayout(SWT.VERTICAL);
|
||||||
s_2 = new Button(saveGrp, SWT.RADIO);
|
fl.spacing = SPACING;
|
||||||
s_2.setText(Messages.PropertyPageDefsTab_14);
|
fl.marginHeight = SPACING;
|
||||||
|
fl.marginWidth = SPACING;
|
||||||
|
saveGrp.setLayout(fl);
|
||||||
|
|
||||||
Group discGrp = new Group(usercomp, SWT.NONE);
|
s_0 = new Button(saveGrp, SWT.RADIO);
|
||||||
discGrp.setText(Messages.PropertyPageDefsTab_5);
|
s_0.setText(Messages.PropertyPageDefsTab_13);
|
||||||
discGrp.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
|
s_1 = new Button(saveGrp, SWT.RADIO);
|
||||||
fl = new FillLayout(SWT.VERTICAL);
|
s_1.setText(Messages.PropertyPageDefsTab_12);
|
||||||
fl.spacing = SPACING;
|
s_2 = new Button(saveGrp, SWT.RADIO);
|
||||||
fl.marginHeight = SPACING;
|
s_2.setText(Messages.PropertyPageDefsTab_14);
|
||||||
fl.marginWidth = SPACING;
|
|
||||||
discGrp.setLayout(fl);
|
|
||||||
|
|
||||||
b_0 = new Button(discGrp, SWT.RADIO);
|
Group discGrp = new Group(usercomp, SWT.NONE);
|
||||||
b_0.setText(Messages.PropertyPageDefsTab_6);
|
discGrp.setText(Messages.PropertyPageDefsTab_5);
|
||||||
b_1 = new Button(discGrp, SWT.RADIO);
|
discGrp.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
|
||||||
b_1.setText(Messages.PropertyPageDefsTab_7);
|
fl = new FillLayout(SWT.VERTICAL);
|
||||||
b_2 = new Button(discGrp, SWT.RADIO);
|
fl.spacing = SPACING;
|
||||||
b_2.setText(Messages.PropertyPageDefsTab_8);
|
fl.marginHeight = SPACING;
|
||||||
b_3 = new Button(discGrp, SWT.RADIO);
|
fl.marginWidth = SPACING;
|
||||||
b_3.setText(Messages.PropertyPageDefsTab_9);
|
discGrp.setLayout(fl);
|
||||||
|
|
||||||
show_inc_files.setSelection(CDTPrefUtil.getBool(CDTPrefUtil.KEY_SHOW_INC_FILES));
|
b_0 = new Button(discGrp, SWT.RADIO);
|
||||||
show_tree.setSelection(CDTPrefUtil.getBool(CDTPrefUtil.KEY_DTREE));
|
b_0.setText(Messages.PropertyPageDefsTab_6);
|
||||||
|
b_1 = new Button(discGrp, SWT.RADIO);
|
||||||
|
b_1.setText(Messages.PropertyPageDefsTab_7);
|
||||||
|
b_2 = new Button(discGrp, SWT.RADIO);
|
||||||
|
b_2.setText(Messages.PropertyPageDefsTab_8);
|
||||||
|
b_3 = new Button(discGrp, SWT.RADIO);
|
||||||
|
b_3.setText(Messages.PropertyPageDefsTab_9);
|
||||||
|
|
||||||
|
show_inc_files.setSelection(CDTPrefUtil.getBool(CDTPrefUtil.KEY_SHOW_INC_FILES));
|
||||||
|
show_tree.setSelection(CDTPrefUtil.getBool(CDTPrefUtil.KEY_DTREE));
|
||||||
show_mng.setSelection(!CDTPrefUtil.getBool(CDTPrefUtil.KEY_NOMNG));
|
show_mng.setSelection(!CDTPrefUtil.getBool(CDTPrefUtil.KEY_NOMNG));
|
||||||
show_tool.setSelection(!CDTPrefUtil.getBool(CDTPrefUtil.KEY_NOTOOLM));
|
show_tool.setSelection(!CDTPrefUtil.getBool(CDTPrefUtil.KEY_NOTOOLM));
|
||||||
show_exp.setSelection(CDTPrefUtil.getBool(CDTPrefUtil.KEY_EXPORT));
|
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));
|
show_tipbox.setSelection(CDTPrefUtil.getBool(CDTPrefUtil.KEY_TIPBOX));
|
||||||
|
|
||||||
switch (CDTPrefUtil.getInt(CDTPrefUtil.KEY_DISC_NAMES)) {
|
switch (CDTPrefUtil.getInt(CDTPrefUtil.KEY_DISC_NAMES)) {
|
||||||
case CDTPrefUtil.DISC_NAMING_UNIQUE_OR_BOTH: b_0.setSelection(true); break;
|
case CDTPrefUtil.DISC_NAMING_UNIQUE_OR_BOTH: b_0.setSelection(true); break;
|
||||||
case CDTPrefUtil.DISC_NAMING_UNIQUE_OR_IDS: b_1.setSelection(true); break;
|
case CDTPrefUtil.DISC_NAMING_UNIQUE_OR_IDS: b_1.setSelection(true); break;
|
||||||
case CDTPrefUtil.DISC_NAMING_ALWAYS_BOTH: b_2.setSelection(true); break;
|
case CDTPrefUtil.DISC_NAMING_ALWAYS_BOTH: b_2.setSelection(true); break;
|
||||||
case CDTPrefUtil.DISC_NAMING_ALWAYS_IDS: b_3.setSelection(true); break;
|
case CDTPrefUtil.DISC_NAMING_ALWAYS_IDS: b_3.setSelection(true); break;
|
||||||
}
|
}
|
||||||
|
|
||||||
switch (CDTPrefUtil.getInt(CDTPrefUtil.KEY_POSSAVE)) {
|
switch (CDTPrefUtil.getInt(CDTPrefUtil.KEY_POSSAVE)) {
|
||||||
case CDTPrefUtil.POSITION_SAVE_BOTH: s_1.setSelection(true); break;
|
case CDTPrefUtil.POSITION_SAVE_BOTH: s_1.setSelection(true); break;
|
||||||
case CDTPrefUtil.POSITION_SAVE_NONE: s_2.setSelection(true); break;
|
case CDTPrefUtil.POSITION_SAVE_NONE: s_2.setSelection(true); break;
|
||||||
default: s_0.setSelection(true); break;
|
default: s_0.setSelection(true); break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -147,7 +154,9 @@ public class PropertyPageDefsTab extends AbstractCPropertyTab {
|
||||||
CDTPrefUtil.setBool(CDTPrefUtil.KEY_NOMNG, !show_mng.getSelection());
|
CDTPrefUtil.setBool(CDTPrefUtil.KEY_NOMNG, !show_mng.getSelection());
|
||||||
CDTPrefUtil.setBool(CDTPrefUtil.KEY_NOTOOLM, !show_tool.getSelection());
|
CDTPrefUtil.setBool(CDTPrefUtil.KEY_NOTOOLM, !show_tool.getSelection());
|
||||||
CDTPrefUtil.setBool(CDTPrefUtil.KEY_EXPORT, show_exp.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());
|
CDTPrefUtil.setBool(CDTPrefUtil.KEY_TIPBOX, show_tipbox.getSelection());
|
||||||
int x = 0;
|
int x = 0;
|
||||||
if (b_1.getSelection()) x = 1;
|
if (b_1.getSelection()) x = 1;
|
||||||
|
@ -168,7 +177,8 @@ public class PropertyPageDefsTab extends AbstractCPropertyTab {
|
||||||
show_mng.setSelection(true);
|
show_mng.setSelection(true);
|
||||||
show_tool.setSelection(true);
|
show_tool.setSelection(true);
|
||||||
show_exp.setSelection(false);
|
show_exp.setSelection(false);
|
||||||
show_providers_tab.setSelection(false);
|
show_sd.setSelection(true);
|
||||||
|
show_providers_tab.setSelection(true);
|
||||||
show_tipbox.setSelection(false);
|
show_tipbox.setSelection(false);
|
||||||
b_0.setSelection(true);
|
b_0.setSelection(true);
|
||||||
b_1.setSelection(false);
|
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.Configuration;
|
||||||
import org.eclipse.cdt.managedbuilder.internal.core.ManagedBuildInfo;
|
import org.eclipse.cdt.managedbuilder.internal.core.ManagedBuildInfo;
|
||||||
import org.eclipse.cdt.managedbuilder.internal.core.ManagedProject;
|
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.internal.ui.Messages;
|
||||||
|
import org.eclipse.cdt.managedbuilder.ui.properties.ManagedBuilderUIPlugin;
|
||||||
import org.eclipse.cdt.ui.newui.CDTPrefUtil;
|
import org.eclipse.cdt.ui.newui.CDTPrefUtil;
|
||||||
import org.eclipse.cdt.ui.templateengine.IWizardDataPage;
|
import org.eclipse.cdt.ui.templateengine.IWizardDataPage;
|
||||||
import org.eclipse.cdt.ui.templateengine.Template;
|
import org.eclipse.cdt.ui.templateengine.Template;
|
||||||
|
@ -73,10 +74,10 @@ import org.eclipse.ui.dialogs.WizardNewProjectCreationPage;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This object is created per each Project type
|
* This object is created per each Project type
|
||||||
*
|
*
|
||||||
* It is responsible for:
|
* It is responsible for:
|
||||||
* - corresponding line in left pane of 1st wizard page
|
* - corresponding line in left pane of 1st wizard page
|
||||||
* - whole view of right pane, including
|
* - whole view of right pane, including
|
||||||
*
|
*
|
||||||
* @noextend This class is not intended to be subclassed by clients.
|
* @noextend This class is not intended to be subclassed by clients.
|
||||||
* @noinstantiate This class is not intended to be instantiated by clients.
|
* @noinstantiate This class is not intended to be instantiated by clients.
|
||||||
|
@ -84,16 +85,17 @@ import org.eclipse.ui.dialogs.WizardNewProjectCreationPage;
|
||||||
public class MBSWizardHandler extends CWizardHandler {
|
public class MBSWizardHandler extends CWizardHandler {
|
||||||
public static final String ARTIFACT = "org.eclipse.cdt.build.core.buildArtefactType"; //$NON-NLS-1$
|
public static final String ARTIFACT = "org.eclipse.cdt.build.core.buildArtefactType"; //$NON-NLS-1$
|
||||||
public static final String EMPTY_STR = ""; //$NON-NLS-1$
|
public static final String EMPTY_STR = ""; //$NON-NLS-1$
|
||||||
|
|
||||||
private static final String PROPERTY = "org.eclipse.cdt.build.core.buildType"; //$NON-NLS-1$
|
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 PROP_VAL = PROPERTY + ".debug"; //$NON-NLS-1$
|
||||||
private static final String tooltip =
|
|
||||||
Messages.CWizardHandler_1 +
|
private static final String tooltip =
|
||||||
Messages.CWizardHandler_2 +
|
Messages.CWizardHandler_1 +
|
||||||
Messages.CWizardHandler_3 +
|
Messages.CWizardHandler_2 +
|
||||||
Messages.CWizardHandler_4 +
|
Messages.CWizardHandler_3 +
|
||||||
Messages.CWizardHandler_5;
|
Messages.CWizardHandler_4 +
|
||||||
|
Messages.CWizardHandler_5;
|
||||||
|
|
||||||
protected SortedMap<String, IToolChain> full_tcs = new TreeMap<String, IToolChain>();
|
protected SortedMap<String, IToolChain> full_tcs = new TreeMap<String, IToolChain>();
|
||||||
private String propertyId = null;
|
private String propertyId = null;
|
||||||
private IProjectType pt = null;
|
private IProjectType pt = null;
|
||||||
|
@ -102,16 +104,16 @@ public class MBSWizardHandler extends CWizardHandler {
|
||||||
private IToolChain[] savedToolChains = null;
|
private IToolChain[] savedToolChains = null;
|
||||||
private IWizard wizard;
|
private IWizard wizard;
|
||||||
private IWizardPage startingPage;
|
private IWizardPage startingPage;
|
||||||
// private EntryDescriptor entryDescriptor = null;
|
// private EntryDescriptor entryDescriptor = null;
|
||||||
private EntryInfo entryInfo;
|
private EntryInfo entryInfo;
|
||||||
protected CfgHolder[] cfgs = null;
|
protected CfgHolder[] cfgs = null;
|
||||||
protected IWizardPage[] customPages;
|
protected IWizardPage[] customPages;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Current list of preferred toolchains
|
* Current list of preferred toolchains
|
||||||
*/
|
*/
|
||||||
private List<String> preferredTCs = new ArrayList<String>();
|
private List<String> preferredTCs = new ArrayList<String>();
|
||||||
|
|
||||||
protected static final class EntryInfo {
|
protected static final class EntryInfo {
|
||||||
private SortedMap<String, IToolChain> tcs;
|
private SortedMap<String, IToolChain> tcs;
|
||||||
private EntryDescriptor entryDescriptor;
|
private EntryDescriptor entryDescriptor;
|
||||||
|
@ -124,12 +126,12 @@ public class MBSWizardHandler extends CWizardHandler {
|
||||||
private IWizardPage predatingPage;
|
private IWizardPage predatingPage;
|
||||||
private IWizardPage followingPage;
|
private IWizardPage followingPage;
|
||||||
private IWizard wizard;
|
private IWizard wizard;
|
||||||
|
|
||||||
public EntryInfo(EntryDescriptor dr, SortedMap<String, IToolChain> _tcs){
|
public EntryInfo(EntryDescriptor dr, SortedMap<String, IToolChain> _tcs){
|
||||||
entryDescriptor = dr;
|
entryDescriptor = dr;
|
||||||
tcs = _tcs;
|
tcs = _tcs;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @since 5.1
|
* @since 5.1
|
||||||
*/
|
*/
|
||||||
|
@ -137,7 +139,7 @@ public class MBSWizardHandler extends CWizardHandler {
|
||||||
this(dr, _tcs);
|
this(dr, _tcs);
|
||||||
wizard = w;
|
wizard = w;
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean isValid(){
|
public boolean isValid(){
|
||||||
initialize();
|
initialize();
|
||||||
return isValid;
|
return isValid;
|
||||||
|
@ -147,7 +149,7 @@ public class MBSWizardHandler extends CWizardHandler {
|
||||||
initialize();
|
initialize();
|
||||||
return template;
|
return template;
|
||||||
}
|
}
|
||||||
|
|
||||||
public EntryDescriptor getDescriptor(){
|
public EntryDescriptor getDescriptor(){
|
||||||
return entryDescriptor;
|
return entryDescriptor;
|
||||||
}
|
}
|
||||||
|
@ -155,19 +157,19 @@ public class MBSWizardHandler extends CWizardHandler {
|
||||||
private void initialize(){
|
private void initialize(){
|
||||||
if(initialized)
|
if(initialized)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
do {
|
do {
|
||||||
if(entryDescriptor == null)
|
if(entryDescriptor == null)
|
||||||
break;
|
break;
|
||||||
String path[] = entryDescriptor.getPathArray();
|
String path[] = entryDescriptor.getPathArray();
|
||||||
if(path == null || path.length == 0)
|
if(path == null || path.length == 0)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
projectTypeId = path[0];
|
projectTypeId = path[0];
|
||||||
if(!entryDescriptor.isDefaultForCategory() &&
|
if(!entryDescriptor.isDefaultForCategory() &&
|
||||||
path.length > 1 && (!path[0].equals(ManagedBuildWizard.OTHERS_LABEL))){
|
path.length > 1 && (!path[0].equals(ManagedBuildWizard.OTHERS_LABEL))){
|
||||||
templateId = path[path.length - 1];
|
templateId = path[path.length - 1];
|
||||||
Template templates[] = null;
|
Template templates[] = null;
|
||||||
if(wizard instanceof ICDTCommonProjectWizard) {
|
if(wizard instanceof ICDTCommonProjectWizard) {
|
||||||
ICDTCommonProjectWizard wz = (ICDTCommonProjectWizard)wizard;
|
ICDTCommonProjectWizard wz = (ICDTCommonProjectWizard)wizard;
|
||||||
String[] langIDs = wz.getLanguageIDs();
|
String[] langIDs = wz.getLanguageIDs();
|
||||||
|
@ -175,42 +177,42 @@ public class MBSWizardHandler extends CWizardHandler {
|
||||||
List<Template> lstTemplates = new ArrayList<Template>();
|
List<Template> lstTemplates = new ArrayList<Template>();
|
||||||
for (String id : langIDs) {
|
for (String id : langIDs) {
|
||||||
lstTemplates.addAll(Arrays.asList(TemplateEngineUI.getDefault().
|
lstTemplates.addAll(Arrays.asList(TemplateEngineUI.getDefault().
|
||||||
getTemplates(projectTypeId, null, id)));
|
getTemplates(projectTypeId, null, id)));
|
||||||
}
|
}
|
||||||
templates = lstTemplates.toArray(new Template[lstTemplates.size()]);
|
templates = lstTemplates.toArray(new Template[lstTemplates.size()]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(null == templates) {
|
if(null == templates) {
|
||||||
templates = TemplateEngineUI.getDefault().getTemplates(projectTypeId);
|
templates = TemplateEngineUI.getDefault().getTemplates(projectTypeId);
|
||||||
}
|
}
|
||||||
if((null == templates) || (templates.length == 0))
|
if((null == templates) || (templates.length == 0))
|
||||||
break;
|
break;
|
||||||
|
|
||||||
for (Template t : templates) {
|
for (Template t : templates) {
|
||||||
if(t.getTemplateId().equals(templateId)){
|
if(t.getTemplateId().equals(templateId)){
|
||||||
template = t;
|
template = t;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(template == null)
|
if(template == null)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
isValid = true;
|
isValid = true;
|
||||||
} while(false);
|
} while(false);
|
||||||
|
|
||||||
initialized = true;
|
initialized = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Template getInitializedTemplate(IWizardPage predatingPage, IWizardPage followingPage, Map<String, String> map){
|
public Template getInitializedTemplate(IWizardPage predatingPage, IWizardPage followingPage, Map<String, String> map){
|
||||||
getNextPage(predatingPage, followingPage);
|
getNextPage(predatingPage, followingPage);
|
||||||
|
|
||||||
Template template = getTemplate();
|
Template template = getTemplate();
|
||||||
|
|
||||||
if(template != null){
|
if(template != null){
|
||||||
Map<String, String> valueStore = template.getValueStore();
|
Map<String, String> valueStore = template.getValueStore();
|
||||||
// valueStore.clear();
|
// valueStore.clear();
|
||||||
for (IWizardPage page : templatePages) {
|
for (IWizardPage page : templatePages) {
|
||||||
if (page instanceof UIWizardPage)
|
if (page instanceof UIWizardPage)
|
||||||
valueStore.putAll(((UIWizardPage)page).getPageData());
|
valueStore.putAll(((UIWizardPage)page).getPageData());
|
||||||
|
@ -223,11 +225,11 @@ public class MBSWizardHandler extends CWizardHandler {
|
||||||
}
|
}
|
||||||
return template;
|
return template;
|
||||||
}
|
}
|
||||||
|
|
||||||
public IWizardPage getNextPage(IWizardPage predatingPage, IWizardPage followingPage) {
|
public IWizardPage getNextPage(IWizardPage predatingPage, IWizardPage followingPage) {
|
||||||
initialize();
|
initialize();
|
||||||
if(this.templatePages == null
|
if(this.templatePages == null
|
||||||
|| this.predatingPage != predatingPage
|
|| this.predatingPage != predatingPage
|
||||||
|| this.followingPage != followingPage){
|
|| this.followingPage != followingPage){
|
||||||
this.predatingPage = predatingPage;
|
this.predatingPage = predatingPage;
|
||||||
this.followingPage = followingPage;
|
this.followingPage = followingPage;
|
||||||
|
@ -238,12 +240,12 @@ public class MBSWizardHandler extends CWizardHandler {
|
||||||
followingPage.setPreviousPage(predatingPage);
|
followingPage.setPreviousPage(predatingPage);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(templatePages.length != 0)
|
if(templatePages.length != 0)
|
||||||
return templatePages[0];
|
return templatePages[0];
|
||||||
return followingPage;
|
return followingPage;
|
||||||
}
|
}
|
||||||
|
|
||||||
private boolean canFinish(IWizardPage predatingPage, IWizardPage followingPage){
|
private boolean canFinish(IWizardPage predatingPage, IWizardPage followingPage){
|
||||||
getNextPage(predatingPage, followingPage);
|
getNextPage(predatingPage, followingPage);
|
||||||
for(int i = 0; i < templatePages.length; i++){
|
for(int i = 0; i < templatePages.length; i++){
|
||||||
|
@ -252,50 +254,50 @@ public class MBSWizardHandler extends CWizardHandler {
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Filters toolchains
|
* Filters toolchains
|
||||||
*
|
*
|
||||||
* @return - set of compatible toolchain's IDs
|
* @return - set of compatible toolchain's IDs
|
||||||
*/
|
*/
|
||||||
protected Set<String> tc_filter() {
|
protected Set<String> tc_filter() {
|
||||||
Set<String> full = tcs.keySet();
|
Set<String> full = tcs.keySet();
|
||||||
if (entryDescriptor == null)
|
if (entryDescriptor == null)
|
||||||
return full;
|
return full;
|
||||||
Set<String> out = new LinkedHashSet<String>(full.size());
|
Set<String> out = new LinkedHashSet<String>(full.size());
|
||||||
for (String s : full)
|
for (String s : full)
|
||||||
if (isToolChainAcceptable(s))
|
if (isToolChainAcceptable(s))
|
||||||
out.add(s);
|
out.add(s);
|
||||||
return out;
|
return out;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Checks whether given toolchain can be displayed
|
* Checks whether given toolchain can be displayed
|
||||||
*
|
*
|
||||||
* @param tcId - toolchain _NAME_ to check
|
* @param tcId - toolchain _NAME_ to check
|
||||||
* @return - true if toolchain can be displayed
|
* @return - true if toolchain can be displayed
|
||||||
*/
|
*/
|
||||||
public boolean isToolChainAcceptable(String tcId) {
|
public boolean isToolChainAcceptable(String tcId) {
|
||||||
if (template == null || template.getTemplateInfo() == null)
|
if (template == null || template.getTemplateInfo() == null)
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
String[] toolChainIds = template.getTemplateInfo().getToolChainIds();
|
String[] toolChainIds = template.getTemplateInfo().getToolChainIds();
|
||||||
if (toolChainIds == null || toolChainIds.length == 0)
|
if (toolChainIds == null || toolChainIds.length == 0)
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
Object ob = tcs.get(tcId);
|
Object ob = tcs.get(tcId);
|
||||||
if (ob == null)
|
if (ob == null)
|
||||||
return true; // sic ! This can occur with Other Toolchain only
|
return true; // sic ! This can occur with Other Toolchain only
|
||||||
if (!(ob instanceof IToolChain))
|
if (!(ob instanceof IToolChain))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
String id1 = ((IToolChain)ob).getId();
|
String id1 = ((IToolChain)ob).getId();
|
||||||
IToolChain sup = ((IToolChain)ob).getSuperClass();
|
IToolChain sup = ((IToolChain)ob).getSuperClass();
|
||||||
String id2 = sup == null ? null : sup.getId();
|
String id2 = sup == null ? null : sup.getId();
|
||||||
|
|
||||||
for (String id : toolChainIds) {
|
for (String id : toolChainIds) {
|
||||||
if ((id != null && id.equals(id1)) ||
|
if ((id != null && id.equals(id1)) ||
|
||||||
(id != null && id.equals(id2)))
|
(id != null && id.equals(id2)))
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
|
@ -305,20 +307,20 @@ public class MBSWizardHandler extends CWizardHandler {
|
||||||
return tc_filter().size();
|
return tc_filter().size();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public MBSWizardHandler(IProjectType _pt, Composite p, IWizard w) {
|
public MBSWizardHandler(IProjectType _pt, Composite p, IWizard w) {
|
||||||
super(p, Messages.CWizardHandler_0, _pt.getName());
|
super(p, Messages.CWizardHandler_0, _pt.getName());
|
||||||
pt = _pt;
|
pt = _pt;
|
||||||
setWizard(w);
|
setWizard(w);
|
||||||
}
|
}
|
||||||
|
|
||||||
public MBSWizardHandler(String name, Composite p, IWizard w) {
|
public MBSWizardHandler(String name, Composite p, IWizard w) {
|
||||||
super(p, Messages.CWizardHandler_0, name);
|
super(p, Messages.CWizardHandler_0, name);
|
||||||
setWizard(w);
|
setWizard(w);
|
||||||
}
|
}
|
||||||
|
|
||||||
public MBSWizardHandler(IBuildPropertyValue val, Composite p, IWizard w) {
|
public MBSWizardHandler(IBuildPropertyValue val, Composite p, IWizard w) {
|
||||||
super(p, Messages.CWizardHandler_0, val.getName());
|
super(p, Messages.CWizardHandler_0, val.getName());
|
||||||
propertyId = val.getId();
|
propertyId = val.getId();
|
||||||
setWizard(w);
|
setWizard(w);
|
||||||
}
|
}
|
||||||
|
@ -330,16 +332,16 @@ public class MBSWizardHandler extends CWizardHandler {
|
||||||
startingPage = w.getStartingPage();
|
startingPage = w.getStartingPage();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
protected IWizardPage getStartingPage(){
|
protected IWizardPage getStartingPage(){
|
||||||
return startingPage;
|
return startingPage;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Map<String, String> getMainPageData() {
|
public Map<String, String> getMainPageData() {
|
||||||
WizardNewProjectCreationPage page = (WizardNewProjectCreationPage)getStartingPage();
|
WizardNewProjectCreationPage page = (WizardNewProjectCreationPage)getStartingPage();
|
||||||
Map<String, String> data = new HashMap<String, String>();
|
Map<String, String> data = new HashMap<String, String>();
|
||||||
String projName = page.getProjectName();
|
String projName = page.getProjectName();
|
||||||
projName = projName != null ? projName.trim() : EMPTY_STR;
|
projName = projName != null ? projName.trim() : EMPTY_STR;
|
||||||
data.put("projectName", projName); //$NON-NLS-1$
|
data.put("projectName", projName); //$NON-NLS-1$
|
||||||
data.put("baseName", getBaseName(projName)); //$NON-NLS-1$
|
data.put("baseName", getBaseName(projName)); //$NON-NLS-1$
|
||||||
data.put("baseNameUpper", getBaseName(projName).toUpperCase() ); //$NON-NLS-1$
|
data.put("baseNameUpper", getBaseName(projName).toUpperCase() ); //$NON-NLS-1$
|
||||||
|
@ -350,7 +352,7 @@ public class MBSWizardHandler extends CWizardHandler {
|
||||||
data.put("location", location); //getProjectLocation().toPortableString()); //$NON-NLS-1$
|
data.put("location", location); //getProjectLocation().toPortableString()); //$NON-NLS-1$
|
||||||
return data;
|
return data;
|
||||||
}
|
}
|
||||||
|
|
||||||
private String getBaseName(String name) {
|
private String getBaseName(String name) {
|
||||||
String baseName = name;
|
String baseName = name;
|
||||||
int dot = baseName.lastIndexOf('.');
|
int dot = baseName.lastIndexOf('.');
|
||||||
|
@ -363,11 +365,11 @@ public class MBSWizardHandler extends CWizardHandler {
|
||||||
}
|
}
|
||||||
return baseName;
|
return baseName;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void handleSelection() {
|
public void handleSelection() {
|
||||||
List<String> preferred = CDTPrefUtil.getPreferredTCs();
|
List<String> preferred = CDTPrefUtil.getPreferredTCs();
|
||||||
|
|
||||||
if (table == null) {
|
if (table == null) {
|
||||||
table = new Table(parent, SWT.MULTI | SWT.V_SCROLL | SWT.BORDER);
|
table = new Table(parent, SWT.MULTI | SWT.V_SCROLL | SWT.BORDER);
|
||||||
table.getAccessible().addAccessibleListener(
|
table.getAccessible().addAccessibleListener(
|
||||||
|
@ -400,7 +402,7 @@ public class MBSWizardHandler extends CWizardHandler {
|
||||||
counter++;
|
counter++;
|
||||||
}
|
}
|
||||||
if (counter > 0) table.select(position);
|
if (counter > 0) table.select(position);
|
||||||
}
|
}
|
||||||
table.addSelectionListener(new SelectionAdapter() {
|
table.addSelectionListener(new SelectionAdapter() {
|
||||||
@Override
|
@Override
|
||||||
public void widgetSelected(SelectionEvent e) {
|
public void widgetSelected(SelectionEvent e) {
|
||||||
|
@ -421,11 +423,11 @@ public class MBSWizardHandler extends CWizardHandler {
|
||||||
if (listener != null)
|
if (listener != null)
|
||||||
listener.toolChainListChanged(table.getSelectionCount());
|
listener.toolChainListChanged(table.getSelectionCount());
|
||||||
}
|
}
|
||||||
|
|
||||||
private void loadCustomPages() {
|
private void loadCustomPages() {
|
||||||
if (! (getWizard() instanceof ICDTCommonProjectWizard))
|
if (! (getWizard() instanceof ICDTCommonProjectWizard))
|
||||||
return; // not probable
|
return; // not probable
|
||||||
|
|
||||||
ICDTCommonProjectWizard wz = (ICDTCommonProjectWizard)getWizard();
|
ICDTCommonProjectWizard wz = (ICDTCommonProjectWizard)getWizard();
|
||||||
MBSCustomPageManager.init();
|
MBSCustomPageManager.init();
|
||||||
MBSCustomPageManager.addStockPage(getStartingPage(), CDTMainWizardPage.PAGE_ID);
|
MBSCustomPageManager.addStockPage(getStartingPage(), CDTMainWizardPage.PAGE_ID);
|
||||||
|
@ -438,9 +440,9 @@ public class MBSWizardHandler extends CWizardHandler {
|
||||||
|
|
||||||
customPages = MBSCustomPageManager.getCustomPages();
|
customPages = MBSCustomPageManager.getCustomPages();
|
||||||
|
|
||||||
if (customPages == null)
|
if (customPages == null)
|
||||||
customPages = new IWizardPage[0];
|
customPages = new IWizardPage[0];
|
||||||
|
|
||||||
for (IWizardPage customPage : customPages)
|
for (IWizardPage customPage : customPages)
|
||||||
customPage.setWizard(wz);
|
customPage.setWizard(wz);
|
||||||
setCustomPagesFilter(wz);
|
setCustomPagesFilter(wz);
|
||||||
|
@ -463,13 +465,13 @@ public class MBSWizardHandler extends CWizardHandler {
|
||||||
boolean ptIsNull = (getProjectType() == null);
|
boolean ptIsNull = (getProjectType() == null);
|
||||||
if (!ptIsNull)
|
if (!ptIsNull)
|
||||||
MBSCustomPageManager.addPageProperty(
|
MBSCustomPageManager.addPageProperty(
|
||||||
MBSCustomPageManager.PAGE_ID,
|
MBSCustomPageManager.PAGE_ID,
|
||||||
MBSCustomPageManager.PROJECT_TYPE,
|
MBSCustomPageManager.PROJECT_TYPE,
|
||||||
getProjectType().getId()
|
getProjectType().getId()
|
||||||
);
|
);
|
||||||
|
|
||||||
IToolChain[] tcs = getSelectedToolChains();
|
IToolChain[] tcs = getSelectedToolChains();
|
||||||
ArrayList<IToolChain> x = new ArrayList<IToolChain>();
|
ArrayList<IToolChain> x = new ArrayList<IToolChain>();
|
||||||
TreeSet<String> y = new TreeSet<String>();
|
TreeSet<String> y = new TreeSet<String>();
|
||||||
if (tcs!=null) {
|
if (tcs!=null) {
|
||||||
int n = tcs.length;
|
int n = tcs.length;
|
||||||
|
@ -477,7 +479,7 @@ public class MBSWizardHandler extends CWizardHandler {
|
||||||
if (tcs[i] == null) // --- NO TOOLCHAIN ---
|
if (tcs[i] == null) // --- NO TOOLCHAIN ---
|
||||||
continue; // has no custom pages.
|
continue; // has no custom pages.
|
||||||
x.add(tcs[i]);
|
x.add(tcs[i]);
|
||||||
|
|
||||||
IConfiguration cfg = tcs[i].getParent();
|
IConfiguration cfg = tcs[i].getParent();
|
||||||
if (cfg == null)
|
if (cfg == null)
|
||||||
continue;
|
continue;
|
||||||
|
@ -487,24 +489,24 @@ public class MBSWizardHandler extends CWizardHandler {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
MBSCustomPageManager.addPageProperty(
|
MBSCustomPageManager.addPageProperty(
|
||||||
MBSCustomPageManager.PAGE_ID,
|
MBSCustomPageManager.PAGE_ID,
|
||||||
MBSCustomPageManager.TOOLCHAIN,
|
MBSCustomPageManager.TOOLCHAIN,
|
||||||
x);
|
x);
|
||||||
|
|
||||||
if (ptIsNull) {
|
if (ptIsNull) {
|
||||||
if (y.size() > 0)
|
if (y.size() > 0)
|
||||||
MBSCustomPageManager.addPageProperty(
|
MBSCustomPageManager.addPageProperty(
|
||||||
MBSCustomPageManager.PAGE_ID,
|
MBSCustomPageManager.PAGE_ID,
|
||||||
MBSCustomPageManager.PROJECT_TYPE,
|
MBSCustomPageManager.PROJECT_TYPE,
|
||||||
y);
|
y);
|
||||||
else
|
else
|
||||||
MBSCustomPageManager.addPageProperty(
|
MBSCustomPageManager.addPageProperty(
|
||||||
MBSCustomPageManager.PAGE_ID,
|
MBSCustomPageManager.PAGE_ID,
|
||||||
MBSCustomPageManager.PROJECT_TYPE,
|
MBSCustomPageManager.PROJECT_TYPE,
|
||||||
null);
|
null);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void handleUnSelection() {
|
public void handleUnSelection() {
|
||||||
if (table != null) {
|
if (table != null) {
|
||||||
|
@ -517,16 +519,16 @@ public class MBSWizardHandler extends CWizardHandler {
|
||||||
if (tc.isAbstract() || tc.isSystemObject()) return;
|
if (tc.isAbstract() || tc.isSystemObject()) return;
|
||||||
IConfiguration[] cfgs = null;
|
IConfiguration[] cfgs = null;
|
||||||
// New style managed project type. Configurations are referenced via propertyId.
|
// New style managed project type. Configurations are referenced via propertyId.
|
||||||
if (propertyId != null) {
|
if (propertyId != null) {
|
||||||
cfgs = ManagedBuildManager.getExtensionConfigurations(tc, ARTIFACT, propertyId);
|
cfgs = ManagedBuildManager.getExtensionConfigurations(tc, ARTIFACT, propertyId);
|
||||||
// Old style managewd project type. Configs are obtained via projectType
|
// Old style managewd project type. Configs are obtained via projectType
|
||||||
} else if (pt != null) {
|
} else if (pt != null) {
|
||||||
cfgs = ManagedBuildManager.getExtensionConfigurations(tc, pt);
|
cfgs = ManagedBuildManager.getExtensionConfigurations(tc, pt);
|
||||||
}
|
}
|
||||||
if (cfgs == null || cfgs.length == 0) return;
|
if (cfgs == null || cfgs.length == 0) return;
|
||||||
full_tcs.put(tc.getUniqueRealName(), tc);
|
full_tcs.put(tc.getUniqueRealName(), tc);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void createProject(IProject project, boolean defaults, boolean onFinish, IProgressMonitor monitor) throws CoreException {
|
public void createProject(IProject project, boolean defaults, boolean onFinish, IProgressMonitor monitor) throws CoreException {
|
||||||
try {
|
try {
|
||||||
|
@ -544,20 +546,20 @@ public class MBSWizardHandler extends CWizardHandler {
|
||||||
public void convertProject(IProject proj, IProgressMonitor monitor) throws CoreException {
|
public void convertProject(IProject proj, IProgressMonitor monitor) throws CoreException {
|
||||||
setProjectDescription(proj, true, true, monitor);
|
setProjectDescription(proj, true, true, monitor);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void setProjectDescription(IProject project, boolean defaults, boolean onFinish, IProgressMonitor monitor) throws CoreException {
|
private void setProjectDescription(IProject project, boolean defaults, boolean onFinish, IProgressMonitor monitor) throws CoreException {
|
||||||
ICProjectDescriptionManager mngr = CoreModel.getDefault().getProjectDescriptionManager();
|
ICProjectDescriptionManager mngr = CoreModel.getDefault().getProjectDescriptionManager();
|
||||||
ICProjectDescription des = mngr.createProjectDescription(project, false, !onFinish);
|
ICProjectDescription des = mngr.createProjectDescription(project, false, !onFinish);
|
||||||
ManagedBuildInfo info = ManagedBuildManager.createBuildInfo(project);
|
ManagedBuildInfo info = ManagedBuildManager.createBuildInfo(project);
|
||||||
monitor.worked(10);
|
monitor.worked(10);
|
||||||
cfgs = getCfgItems(false);
|
cfgs = getCfgItems(false);
|
||||||
if (cfgs == null || cfgs.length == 0)
|
if (cfgs == null || cfgs.length == 0)
|
||||||
cfgs = CDTConfigWizardPage.getDefaultCfgs(this);
|
cfgs = CDTConfigWizardPage.getDefaultCfgs(this);
|
||||||
|
|
||||||
if (cfgs == null || cfgs.length == 0 || cfgs[0].getConfiguration() == null) {
|
if (cfgs == null || cfgs.length == 0 || cfgs[0].getConfiguration() == null) {
|
||||||
throw new CoreException(new Status(IStatus.ERROR,
|
throw new CoreException(new Status(IStatus.ERROR,
|
||||||
ManagedBuilderUIPlugin.getUniqueIdentifier(),
|
ManagedBuilderUIPlugin.getUniqueIdentifier(),
|
||||||
Messages.CWizardHandler_6));
|
Messages.CWizardHandler_6));
|
||||||
}
|
}
|
||||||
Configuration cf = (Configuration)cfgs[0].getConfiguration();
|
Configuration cf = (Configuration)cfgs[0].getConfiguration();
|
||||||
ManagedProject mProj = new ManagedProject(project, cf.getProjectType());
|
ManagedProject mProj = new ManagedProject(project, cf.getProjectType());
|
||||||
|
@ -565,12 +567,12 @@ public class MBSWizardHandler extends CWizardHandler {
|
||||||
monitor.worked(10);
|
monitor.worked(10);
|
||||||
cfgs = CfgHolder.unique(cfgs);
|
cfgs = CfgHolder.unique(cfgs);
|
||||||
cfgs = CfgHolder.reorder(cfgs);
|
cfgs = CfgHolder.reorder(cfgs);
|
||||||
|
|
||||||
ICConfigurationDescription cfgDebug = null;
|
ICConfigurationDescription cfgDebug = null;
|
||||||
ICConfigurationDescription cfgFirst = null;
|
ICConfigurationDescription cfgFirst = null;
|
||||||
|
|
||||||
int work = 50/cfgs.length;
|
int work = 50/cfgs.length;
|
||||||
|
|
||||||
for (CfgHolder cfg : cfgs) {
|
for (CfgHolder cfg : cfgs) {
|
||||||
cf = (Configuration)cfg.getConfiguration();
|
cf = (Configuration)cfg.getConfiguration();
|
||||||
String id = ManagedBuildManager.calculateChildId(cf.getId(), null);
|
String id = ManagedBuildManager.calculateChildId(cf.getId(), null);
|
||||||
|
@ -582,32 +584,36 @@ public class MBSWizardHandler extends CWizardHandler {
|
||||||
|
|
||||||
IBuilder bld = config.getEditableBuilder();
|
IBuilder bld = config.getEditableBuilder();
|
||||||
if (bld != null) { bld.setManagedBuildOn(true); }
|
if (bld != null) { bld.setManagedBuildOn(true); }
|
||||||
|
|
||||||
config.setName(cfg.getName());
|
config.setName(cfg.getName());
|
||||||
config.setArtifactName(mProj.getDefaultArtifactName());
|
config.setArtifactName(mProj.getDefaultArtifactName());
|
||||||
|
|
||||||
IBuildProperty b = config.getBuildProperties().getProperty(PROPERTY);
|
IBuildProperty b = config.getBuildProperties().getProperty(PROPERTY);
|
||||||
if (cfgDebug == null && b != null && b.getValue() != null && PROP_VAL.equals(b.getValue().getId()))
|
if (cfgDebug == null && b != null && b.getValue() != null && PROP_VAL.equals(b.getValue().getId()))
|
||||||
cfgDebug = cfgDes;
|
cfgDebug = cfgDes;
|
||||||
if (cfgFirst == null) // select at least first configuration
|
if (cfgFirst == null) // select at least first configuration
|
||||||
cfgFirst = cfgDes;
|
cfgFirst = cfgDes;
|
||||||
|
|
||||||
|
ConfigurationDataProvider.setDefaultLanguageSettingsProviders(project, config, cfgDes);
|
||||||
|
|
||||||
monitor.worked(work);
|
monitor.worked(work);
|
||||||
}
|
}
|
||||||
mngr.setProjectDescription(project, des);
|
mngr.setProjectDescription(project, des);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void doTemplatesPostProcess(IProject prj) {
|
protected void doTemplatesPostProcess(IProject prj) {
|
||||||
if(entryInfo == null)
|
if(entryInfo == null)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
Template template = entryInfo.getInitializedTemplate(getStartingPage(), getConfigPage(), getMainPageData());
|
Template template = entryInfo.getInitializedTemplate(getStartingPage(), getConfigPage(), getMainPageData());
|
||||||
if(template == null)
|
if(template == null)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
List<IConfiguration> configs = new ArrayList<IConfiguration>();
|
List<IConfiguration> configs = new ArrayList<IConfiguration>();
|
||||||
for (CfgHolder cfg : cfgs) {
|
for (CfgHolder cfg : cfgs) {
|
||||||
configs.add((IConfiguration)cfg.getConfiguration());
|
configs.add(cfg.getConfiguration());
|
||||||
}
|
}
|
||||||
template.getTemplateInfo().setConfigurations(configs);
|
template.getTemplateInfo().setConfigurations(configs);
|
||||||
|
|
||||||
|
@ -616,19 +622,19 @@ public class MBSWizardHandler extends CWizardHandler {
|
||||||
TemplateEngineUIUtil.showError(statuses[0].getMessage(), statuses[0].getException());
|
TemplateEngineUIUtil.showError(statuses[0].getMessage(), statuses[0].getException());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
protected CDTConfigWizardPage getConfigPage() {
|
protected CDTConfigWizardPage getConfigPage() {
|
||||||
if (fConfigPage == null) {
|
if (fConfigPage == null) {
|
||||||
fConfigPage = new CDTConfigWizardPage(this);
|
fConfigPage = new CDTConfigWizardPage(this);
|
||||||
}
|
}
|
||||||
return fConfigPage;
|
return fConfigPage;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public IWizardPage getSpecificPage() {
|
public IWizardPage getSpecificPage() {
|
||||||
return entryInfo.getNextPage(getStartingPage(), getConfigPage());
|
return entryInfo.getNextPage(getStartingPage(), getConfigPage());
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Mark preferred toolchains with specific images
|
* Mark preferred toolchains with specific images
|
||||||
*/
|
*/
|
||||||
|
@ -647,11 +653,11 @@ public class MBSWizardHandler extends CWizardHandler {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public List<String> getPreferredTCNames() {
|
public List<String> getPreferredTCNames() {
|
||||||
return preferredTCs;
|
return preferredTCs;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getHeader() { return head; }
|
public String getHeader() { return head; }
|
||||||
public boolean isDummy() { return false; }
|
public boolean isDummy() { return false; }
|
||||||
|
@ -659,11 +665,11 @@ public class MBSWizardHandler extends CWizardHandler {
|
||||||
public boolean supportsPreferred() { return true; }
|
public boolean supportsPreferred() { return true; }
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean isChanged() {
|
public boolean isChanged() {
|
||||||
if (savedToolChains == null)
|
if (savedToolChains == null)
|
||||||
return true;
|
return true;
|
||||||
IToolChain[] tcs = getSelectedToolChains();
|
IToolChain[] tcs = getSelectedToolChains();
|
||||||
if (savedToolChains.length != tcs.length)
|
if (savedToolChains.length != tcs.length)
|
||||||
return true;
|
return true;
|
||||||
for (IToolChain savedToolChain : savedToolChains) {
|
for (IToolChain savedToolChain : savedToolChains) {
|
||||||
boolean found = false;
|
boolean found = false;
|
||||||
|
@ -678,12 +684,12 @@ public class MBSWizardHandler extends CWizardHandler {
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void saveState() {
|
public void saveState() {
|
||||||
savedToolChains = getSelectedToolChains();
|
savedToolChains = getSelectedToolChains();
|
||||||
}
|
}
|
||||||
|
|
||||||
// Methods specific for MBSWizardHandler
|
// Methods specific for MBSWizardHandler
|
||||||
|
|
||||||
public IToolChain[] getSelectedToolChains() {
|
public IToolChain[] getSelectedToolChains() {
|
||||||
|
@ -699,7 +705,7 @@ public class MBSWizardHandler extends CWizardHandler {
|
||||||
public int getToolChainsCount() {
|
public int getToolChainsCount() {
|
||||||
if (entryInfo == null)
|
if (entryInfo == null)
|
||||||
return full_tcs.size();
|
return full_tcs.size();
|
||||||
else
|
else
|
||||||
return entryInfo.tc_filter().size();
|
return entryInfo.tc_filter().size();
|
||||||
}
|
}
|
||||||
public String getPropertyId() {
|
public String getPropertyId() {
|
||||||
|
@ -716,13 +722,13 @@ public class MBSWizardHandler extends CWizardHandler {
|
||||||
return fConfigPage.getCfgItems(defaults);
|
return fConfigPage.getCfgItems(defaults);
|
||||||
}
|
}
|
||||||
@Override
|
@Override
|
||||||
public String getErrorMessage() {
|
public String getErrorMessage() {
|
||||||
TableItem[] tis = table.getSelection();
|
TableItem[] tis = table.getSelection();
|
||||||
if (tis == null || tis.length == 0)
|
if (tis == null || tis.length == 0)
|
||||||
return Messages.MBSWizardHandler_0;
|
return Messages.MBSWizardHandler_0;
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void doCustom(IProject newProject) {
|
protected void doCustom(IProject newProject) {
|
||||||
IRunnableWithProgress[] operations = MBSCustomPageManager.getOperations();
|
IRunnableWithProgress[] operations = MBSCustomPageManager.getOperations();
|
||||||
|
@ -736,7 +742,7 @@ public class MBSWizardHandler extends CWizardHandler {
|
||||||
ManagedBuilderUIPlugin.log(e);
|
ManagedBuilderUIPlugin.log(e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void postProcess(IProject newProject, boolean created) {
|
public void postProcess(IProject newProject, boolean created) {
|
||||||
deleteExtraConfigs(newProject);
|
deleteExtraConfigs(newProject);
|
||||||
|
@ -747,17 +753,17 @@ public class MBSWizardHandler extends CWizardHandler {
|
||||||
doCustom(newProject);
|
doCustom(newProject);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Deletes configurations
|
* Deletes configurations
|
||||||
*
|
*
|
||||||
* @param newProject - affected project
|
* @param newProject - affected project
|
||||||
*/
|
*/
|
||||||
private void deleteExtraConfigs(IProject newProject) {
|
private void deleteExtraConfigs(IProject newProject) {
|
||||||
if (isChanged()) return; // no need to delete
|
if (isChanged()) return; // no need to delete
|
||||||
if (listener != null && listener.isCurrent()) return; // nothing to delete
|
if (listener != null && listener.isCurrent()) return; // nothing to delete
|
||||||
if (fConfigPage == null || !fConfigPage.pagesLoaded) return;
|
if (fConfigPage == null || !fConfigPage.pagesLoaded) return;
|
||||||
|
|
||||||
ICProjectDescription prjd = CoreModel.getDefault().getProjectDescription(newProject, true);
|
ICProjectDescription prjd = CoreModel.getDefault().getProjectDescription(newProject, true);
|
||||||
if (prjd == null) return;
|
if (prjd == null) return;
|
||||||
ICConfigurationDescription[] all = prjd.getConfigurations();
|
ICConfigurationDescription[] all = prjd.getConfigurations();
|
||||||
|
@ -781,19 +787,19 @@ public class MBSWizardHandler extends CWizardHandler {
|
||||||
CoreModel.getDefault().setProjectDescription(newProject, prjd);
|
CoreModel.getDefault().setProjectDescription(newProject, prjd);
|
||||||
} catch (CoreException e) {}
|
} catch (CoreException e) {}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean isApplicable(EntryDescriptor data) {
|
public boolean isApplicable(EntryDescriptor data) {
|
||||||
EntryInfo info = new EntryInfo(data, full_tcs, wizard);
|
EntryInfo info = new EntryInfo(data, full_tcs, wizard);
|
||||||
return info.isValid() && (info.getToolChainsCount() > 0);
|
return info.isValid() && (info.getToolChainsCount() > 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void initialize(EntryDescriptor data) throws CoreException {
|
public void initialize(EntryDescriptor data) throws CoreException {
|
||||||
EntryInfo info = new EntryInfo(data, full_tcs, wizard);
|
EntryInfo info = new EntryInfo(data, full_tcs, wizard);
|
||||||
if(!info.isValid())
|
if(!info.isValid())
|
||||||
throw new CoreException(new Status(IStatus.ERROR, ManagedBuilderUIPlugin.getUniqueIdentifier(), "inappropriate descriptor")); //$NON-NLS-1$
|
throw new CoreException(new Status(IStatus.ERROR, ManagedBuilderUIPlugin.getUniqueIdentifier(), "inappropriate descriptor")); //$NON-NLS-1$
|
||||||
|
|
||||||
entryInfo = info;
|
entryInfo = info;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -819,20 +825,19 @@ public class MBSWizardHandler extends CWizardHandler {
|
||||||
public boolean canFinish() {
|
public boolean canFinish() {
|
||||||
if(entryInfo == null)
|
if(entryInfo == null)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
if (!getConfigPage().isCustomPageComplete())
|
if (!getConfigPage().isCustomPageComplete())
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
if(!entryInfo.canFinish(startingPage, getConfigPage()))
|
if(!entryInfo.canFinish(startingPage, getConfigPage()))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
if (customPages != null)
|
if (customPages != null)
|
||||||
for (int i=0; i<customPages.length; i++)
|
for (int i=0; i<customPages.length; i++)
|
||||||
if (!customPages[i].isPageComplete())
|
if (!customPages[i].isPageComplete())
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
return super.canFinish();
|
return super.canFinish();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -15,6 +15,7 @@ import java.lang.reflect.InvocationTargetException;
|
||||||
import org.eclipse.cdt.core.CCProjectNature;
|
import org.eclipse.cdt.core.CCProjectNature;
|
||||||
import org.eclipse.cdt.core.CCorePlugin;
|
import org.eclipse.cdt.core.CCorePlugin;
|
||||||
import org.eclipse.cdt.core.model.CoreModel;
|
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.ICProjectDescription;
|
||||||
import org.eclipse.cdt.core.settings.model.ICProjectDescriptionManager;
|
import org.eclipse.cdt.core.settings.model.ICProjectDescriptionManager;
|
||||||
import org.eclipse.cdt.core.settings.model.extension.CConfigurationData;
|
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.ManagedBuildInfo;
|
||||||
import org.eclipse.cdt.managedbuilder.internal.core.ManagedProject;
|
import org.eclipse.cdt.managedbuilder.internal.core.ManagedProject;
|
||||||
import org.eclipse.cdt.managedbuilder.internal.core.ToolChain;
|
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.internal.ui.Messages;
|
||||||
import org.eclipse.cdt.managedbuilder.ui.properties.ManagedBuilderUIPlugin;
|
import org.eclipse.cdt.managedbuilder.ui.properties.ManagedBuilderUIPlugin;
|
||||||
import org.eclipse.core.resources.IProject;
|
import org.eclipse.core.resources.IProject;
|
||||||
|
@ -110,7 +112,10 @@ public class NewMakeProjFromExisting extends Wizard implements IImportWizard, IN
|
||||||
IBuilder builder = config.getEditableBuilder();
|
IBuilder builder = config.getEditableBuilder();
|
||||||
builder.setManagedBuildOn(false);
|
builder.setManagedBuildOn(false);
|
||||||
CConfigurationData data = config.getConfigurationData();
|
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);
|
monitor.worked(1);
|
||||||
|
|
||||||
pdMgr.setProjectDescription(project, projDesc);
|
pdMgr.setProjectDescription(project, projDesc);
|
||||||
|
|
|
@ -12,6 +12,7 @@
|
||||||
package org.eclipse.cdt.managedbuilder.ui.wizards;
|
package org.eclipse.cdt.managedbuilder.ui.wizards;
|
||||||
|
|
||||||
import org.eclipse.cdt.core.model.CoreModel;
|
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.ICProjectDescription;
|
||||||
import org.eclipse.cdt.core.settings.model.ICProjectDescriptionManager;
|
import org.eclipse.cdt.core.settings.model.ICProjectDescriptionManager;
|
||||||
import org.eclipse.cdt.core.settings.model.extension.CConfigurationData;
|
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.ManagedBuildInfo;
|
||||||
import org.eclipse.cdt.managedbuilder.internal.core.ManagedProject;
|
import org.eclipse.cdt.managedbuilder.internal.core.ManagedProject;
|
||||||
import org.eclipse.cdt.managedbuilder.internal.core.ToolChain;
|
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.internal.ui.Messages;
|
||||||
import org.eclipse.core.resources.IProject;
|
import org.eclipse.core.resources.IProject;
|
||||||
import org.eclipse.core.runtime.CoreException;
|
import org.eclipse.core.runtime.CoreException;
|
||||||
|
@ -37,16 +39,16 @@ import org.eclipse.swt.widgets.Composite;
|
||||||
public class STDWizardHandler extends MBSWizardHandler {
|
public class STDWizardHandler extends MBSWizardHandler {
|
||||||
|
|
||||||
public STDWizardHandler(Composite p, IWizard w) {
|
public STDWizardHandler(Composite p, IWizard w) {
|
||||||
super(Messages.StdBuildWizard_0, p, w);
|
super(Messages.StdBuildWizard_0, p, w);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void addTc(IToolChain tc) {
|
public void addTc(IToolChain tc) {
|
||||||
if (tc == null) {
|
if (tc == null) {
|
||||||
full_tcs.put(Messages.StdProjectTypeHandler_0, null);
|
full_tcs.put(Messages.StdProjectTypeHandler_0, null);
|
||||||
} else {
|
} else {
|
||||||
if (tc.isAbstract() || tc.isSystemObject()) return;
|
if (tc.isAbstract() || tc.isSystemObject()) return;
|
||||||
// unlike CWizardHandler, we don't check for configs
|
// unlike CWizardHandler, we don't check for configs
|
||||||
full_tcs.put(tc.getUniqueRealName(), tc);
|
full_tcs.put(tc.getUniqueRealName(), tc);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -58,9 +60,9 @@ public class STDWizardHandler extends MBSWizardHandler {
|
||||||
public void createProject(IProject project, boolean defaults, boolean onFinish, IProgressMonitor monitor) throws CoreException {
|
public void createProject(IProject project, boolean defaults, boolean onFinish, IProgressMonitor monitor) throws CoreException {
|
||||||
try {
|
try {
|
||||||
monitor.beginTask("", 100);//$NON-NLS-1$
|
monitor.beginTask("", 100);//$NON-NLS-1$
|
||||||
|
|
||||||
setProjectDescription(project, defaults, onFinish, monitor);
|
setProjectDescription(project, defaults, onFinish, monitor);
|
||||||
|
|
||||||
doTemplatesPostProcess(project);
|
doTemplatesPostProcess(project);
|
||||||
doCustom(project);
|
doCustom(project);
|
||||||
monitor.worked(30);
|
monitor.worked(30);
|
||||||
|
@ -70,53 +72,60 @@ public class STDWizardHandler extends MBSWizardHandler {
|
||||||
}
|
}
|
||||||
|
|
||||||
private void setProjectDescription(IProject project, boolean defaults, boolean onFinish, IProgressMonitor monitor)
|
private void setProjectDescription(IProject project, boolean defaults, boolean onFinish, IProgressMonitor monitor)
|
||||||
throws CoreException {
|
throws CoreException {
|
||||||
ICProjectDescriptionManager mngr = CoreModel.getDefault().getProjectDescriptionManager();
|
|
||||||
ICProjectDescription des = mngr.createProjectDescription(project, false, !onFinish);
|
ICProjectDescriptionManager mngr = CoreModel.getDefault().getProjectDescriptionManager();
|
||||||
ManagedBuildInfo info = ManagedBuildManager.createBuildInfo(project);
|
ICProjectDescription des = mngr.createProjectDescription(project, false, !onFinish);
|
||||||
ManagedProject mProj = new ManagedProject(des);
|
ManagedBuildInfo info = ManagedBuildManager.createBuildInfo(project);
|
||||||
info.setManagedProject(mProj);
|
ManagedProject mProj = new ManagedProject(des);
|
||||||
monitor.worked(20);
|
info.setManagedProject(mProj);
|
||||||
cfgs = CfgHolder.unique(getCfgItems(false));
|
monitor.worked(20);
|
||||||
cfgs = CfgHolder.reorder(cfgs);
|
cfgs = CfgHolder.unique(getCfgItems(false));
|
||||||
int work = 50/cfgs.length;
|
cfgs = CfgHolder.reorder(cfgs);
|
||||||
for (int i=0; i<cfgs.length; i++) {
|
int work = 50/cfgs.length;
|
||||||
String s = (cfgs[i].getToolChain() == null) ? "0" : ((ToolChain)(cfgs[i].getToolChain())).getId(); //$NON-NLS-1$
|
for (int i=0; i<cfgs.length; i++) {
|
||||||
Configuration cfg = new Configuration(mProj, (ToolChain)cfgs[i].getToolChain(), ManagedBuildManager.calculateChildId(s, null), cfgs[i].getName());
|
String s = (cfgs[i].getToolChain() == null) ? "0" : ((ToolChain)(cfgs[i].getToolChain())).getId(); //$NON-NLS-1$
|
||||||
cfgs[i].setConfiguration(cfg);
|
Configuration cfg = new Configuration(mProj, (ToolChain)cfgs[i].getToolChain(), ManagedBuildManager.calculateChildId(s, null), cfgs[i].getName());
|
||||||
IBuilder bld = cfg.getEditableBuilder();
|
cfgs[i].setConfiguration(cfg);
|
||||||
if (bld != null) {
|
IBuilder bld = cfg.getEditableBuilder();
|
||||||
if(bld.isInternalBuilder()){
|
if (bld != null) {
|
||||||
IConfiguration prefCfg = ManagedBuildManager.getPreferenceConfiguration(false);
|
if(bld.isInternalBuilder()){
|
||||||
IBuilder prefBuilder = prefCfg.getBuilder();
|
IConfiguration prefCfg = ManagedBuildManager.getPreferenceConfiguration(false);
|
||||||
cfg.changeBuilder(prefBuilder, ManagedBuildManager.calculateChildId(cfg.getId(), null), prefBuilder.getName());
|
IBuilder prefBuilder = prefCfg.getBuilder();
|
||||||
bld = cfg.getEditableBuilder();
|
cfg.changeBuilder(prefBuilder, ManagedBuildManager.calculateChildId(cfg.getId(), null), prefBuilder.getName());
|
||||||
bld.setBuildPath(null);
|
bld = cfg.getEditableBuilder();
|
||||||
}
|
bld.setBuildPath(null);
|
||||||
bld.setManagedBuildOn(false);
|
}
|
||||||
} else {
|
bld.setManagedBuildOn(false);
|
||||||
System.out.println(Messages.StdProjectTypeHandler_3);
|
} else {
|
||||||
}
|
System.out.println(Messages.StdProjectTypeHandler_3);
|
||||||
cfg.setArtifactName(mProj.getDefaultArtifactName());
|
}
|
||||||
CConfigurationData data = cfg.getConfigurationData();
|
cfg.setArtifactName(mProj.getDefaultArtifactName());
|
||||||
des.createConfiguration(ManagedBuildManager.CFG_DATA_PROVIDER_ID, data);
|
CConfigurationData data = cfg.getConfigurationData();
|
||||||
monitor.worked(work);
|
ICConfigurationDescription cfgDes = des.createConfiguration(ManagedBuildManager.CFG_DATA_PROVIDER_ID, data);
|
||||||
}
|
|
||||||
mngr.setProjectDescription(project, des);
|
ConfigurationDataProvider.setDefaultLanguageSettingsProviders(project, cfg, cfgDes);
|
||||||
}
|
|
||||||
public boolean canCreateWithoutToolchain() { return true; }
|
monitor.worked(work);
|
||||||
|
}
|
||||||
|
mngr.setProjectDescription(project, des);
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean canCreateWithoutToolchain() {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void convertProject(IProject proj, IProgressMonitor monitor) throws CoreException {
|
public void convertProject(IProject proj, IProgressMonitor monitor) throws CoreException {
|
||||||
setProjectDescription(proj, true, true, monitor);
|
setProjectDescription(proj, true, true, monitor);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* If no toolchains selected by user, use default toolchain
|
* If no toolchains selected by user, use default toolchain
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public IToolChain[] getSelectedToolChains() {
|
public IToolChain[] getSelectedToolChains() {
|
||||||
if (full_tcs.size() == 0 || table.getSelection().length == 0)
|
if (full_tcs.size() == 0 || table.getSelection().length == 0)
|
||||||
return new IToolChain[] { null };
|
return new IToolChain[] { null };
|
||||||
else
|
else
|
||||||
return super.getSelectedToolChains();
|
return super.getSelectedToolChains();
|
||||||
|
|
|
@ -12,7 +12,9 @@
|
||||||
package org.eclipse.cdt.core.language.settings.providers;
|
package org.eclipse.cdt.core.language.settings.providers;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
import java.util.HashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
import org.eclipse.cdt.core.CCorePlugin;
|
import org.eclipse.cdt.core.CCorePlugin;
|
||||||
import org.eclipse.cdt.core.model.CoreModel;
|
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) */
|
/** 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$
|
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$
|
private static String DISABLE_LSP_PREFERENCE = "language.settings.providers.disabled"; //$NON-NLS-1$
|
||||||
// the default needs to be "false" for legacy projects to be open with old SD enabled for MBS provider
|
// the default for project needs to be "disabled" - for legacy projects to be open with old SD enabled for MBS provider
|
||||||
private static boolean USE_LANGUAGE_SETTINGS_PROVIDERS_DEFAULT = false;
|
private static boolean DISABLE_LSP_DEFAULT_PROJECT = true;
|
||||||
private static final String PREFERENCES_QUALIFIER = CCorePlugin.PLUGIN_ID;
|
private static boolean DISABLE_LSP_DEFAULT_WORKSPACE = false;
|
||||||
private static final String LANGUAGE_SETTINGS_PROVIDERS_NODE = "languageSettingsProviders"; //$NON-NLS-1$
|
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.
|
* Get preferences node for org.eclipse.cdt.core.
|
||||||
*/
|
*/
|
||||||
private static Preferences getPreferences(IProject project) {
|
private static Preferences getPreferences(IProject project) {
|
||||||
if (project == null) {
|
if (project == null) {
|
||||||
return InstanceScope.INSTANCE.getNode(PREFERENCES_QUALIFIER).node(LANGUAGE_SETTINGS_PROVIDERS_NODE);
|
return InstanceScope.INSTANCE.getNode(PREFERENCES_QUALIFIER_CCORE);
|
||||||
} else {
|
} 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) {
|
public static boolean isLanguageSettingsProvidersFunctionalityEnabled(IProject project) {
|
||||||
Preferences pref = getPreferences(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) {
|
public static void setLanguageSettingsProvidersFunctionalityEnabled(IProject project, boolean value) {
|
||||||
Preferences pref = getPreferences(project);
|
Preferences pref = getPreferences(project);
|
||||||
pref.putBoolean(USE_LANGUAGE_SETTINGS_PROVIDERS_PREFERENCE, value);
|
pref.putBoolean(DISABLE_LSP_PREFERENCE, !value);
|
||||||
try {
|
try {
|
||||||
pref.flush();
|
pref.flush();
|
||||||
} catch (BackingStoreException e) {
|
} catch (BackingStoreException e) {
|
||||||
|
@ -147,4 +152,33 @@ public class ScannerDiscoveryLegacySupport {
|
||||||
return providers;
|
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
|
BuildConfigurationActionSet.descr=Build active configuration for the current project
|
||||||
|
|
||||||
BuildLoggingPreferencePage.name=Logging
|
BuildLoggingPreferencePage.name=Logging
|
||||||
|
LanguageSettingsProvidersPropertyPage.name=Preprocessor Include Paths, Macros etc.
|
||||||
|
|
||||||
# Common Editor ruler actions
|
# Common Editor ruler actions
|
||||||
AddTask.label=Add &Task...
|
AddTask.label=Add &Task...
|
||||||
|
|
|
@ -3370,7 +3370,7 @@
|
||||||
</enabledWhen>
|
</enabledWhen>
|
||||||
</page>
|
</page>
|
||||||
<page
|
<page
|
||||||
name="Preprocessor Include Paths, Macros etc."
|
name="%LanguageSettingsProvidersPropertyPage.name"
|
||||||
id="org.eclipse.cdt.ui.language.settings"
|
id="org.eclipse.cdt.ui.language.settings"
|
||||||
class="org.eclipse.cdt.internal.ui.language.settings.providers.LanguageSettingsProvidersPage"
|
class="org.eclipse.cdt.internal.ui.language.settings.providers.LanguageSettingsProvidersPage"
|
||||||
category="org.eclipse.cdt.ui.newui.Page_head_general">
|
category="org.eclipse.cdt.ui.newui.Page_head_general">
|
||||||
|
@ -3378,7 +3378,7 @@
|
||||||
<adapt type="org.eclipse.core.resources.IResource">
|
<adapt type="org.eclipse.core.resources.IResource">
|
||||||
<and>
|
<and>
|
||||||
<test property="org.eclipse.core.resources.projectNature" value="org.eclipse.cdt.core.cnature"/>
|
<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>
|
</and>
|
||||||
</adapt>
|
</adapt>
|
||||||
</enabledWhen>
|
</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.ILanguageSettingsProvidersKeeper;
|
||||||
import org.eclipse.cdt.core.language.settings.providers.LanguageSettingsBaseProvider;
|
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.LanguageSettingsManager;
|
||||||
|
import org.eclipse.cdt.core.language.settings.providers.ScannerDiscoveryLegacySupport;
|
||||||
import org.eclipse.cdt.core.model.ILanguage;
|
import org.eclipse.cdt.core.model.ILanguage;
|
||||||
import org.eclipse.cdt.core.model.LanguageManager;
|
import org.eclipse.cdt.core.model.LanguageManager;
|
||||||
import org.eclipse.cdt.core.settings.model.ICConfigurationDescription;
|
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.CDTSharedImages;
|
||||||
import org.eclipse.cdt.ui.CUIPlugin;
|
import org.eclipse.cdt.ui.CUIPlugin;
|
||||||
import org.eclipse.cdt.ui.newui.AbstractCPropertyTab;
|
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.LanguageSettingsImages;
|
||||||
import org.eclipse.cdt.internal.ui.newui.Messages;
|
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());
|
List<ILanguageSettingsProvider> newProviders = new ArrayList<ILanguageSettingsProvider>(oldProviders.size());
|
||||||
|
|
||||||
// clear entries for a given resource for all languages where applicable
|
// clear entries for a given resource for all languages where applicable
|
||||||
providers: for (ILanguageSettingsProvider provider : oldProviders) {
|
providers: for (ILanguageSettingsProvider provider : oldProviders) {
|
||||||
ILanguageSettingsEditableProvider providerCopy = null;
|
ILanguageSettingsEditableProvider providerCopy = null;
|
||||||
if (provider instanceof ILanguageSettingsEditableProvider) {
|
if (provider instanceof ILanguageSettingsEditableProvider) {
|
||||||
for (TreeItem langItems : treeLanguages.getItems()) {
|
for (TreeItem langItems : treeLanguages.getItems()) {
|
||||||
|
@ -1113,7 +1113,7 @@ providers: for (ILanguageSettingsProvider provider : oldProviders) {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean canBeVisible() {
|
public boolean canBeVisible() {
|
||||||
if (CDTPrefUtil.getBool(LanguageSettingsProvidersPage.KEY_NO_SHOW_PROVIDERS)) {
|
if (!ScannerDiscoveryLegacySupport.isLanguageSettingsProvidersFunctionalityEnabled(null)) {
|
||||||
return false;
|
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.ILanguageSettingsProvidersKeeper;
|
||||||
import org.eclipse.cdt.core.language.settings.providers.LanguageSettingsManager;
|
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.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.ICConfigurationDescription;
|
||||||
import org.eclipse.cdt.core.settings.model.ICResourceDescription;
|
import org.eclipse.cdt.core.settings.model.ICResourceDescription;
|
||||||
import org.eclipse.cdt.ui.CDTSharedImages;
|
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.dialogs.ICOptionPage;
|
||||||
import org.eclipse.cdt.ui.language.settings.providers.AbstractLanguageSettingProviderOptionPage;
|
import org.eclipse.cdt.ui.language.settings.providers.AbstractLanguageSettingProviderOptionPage;
|
||||||
import org.eclipse.cdt.ui.newui.AbstractCPropertyTab;
|
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.utils.ui.controls.TabFolderLayout;
|
||||||
|
|
||||||
import org.eclipse.cdt.internal.ui.newui.Messages;
|
import org.eclipse.cdt.internal.ui.newui.Messages;
|
||||||
|
@ -1161,7 +1161,7 @@ public class LanguageSettingsProviderTab extends AbstractCPropertyTab {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean canBeVisible() {
|
public boolean canBeVisible() {
|
||||||
if (CDTPrefUtil.getBool(LanguageSettingsProvidersPage.KEY_NO_SHOW_PROVIDERS)) {
|
if (!ScannerDiscoveryLegacySupport.isLanguageSettingsProvidersFunctionalityEnabled(null)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -24,11 +24,6 @@ import org.eclipse.cdt.ui.newui.ICPropertyTab;
|
||||||
* @noinstantiate This class is not intended to be instantiated by clients.
|
* @noinstantiate This class is not intended to be instantiated by clients.
|
||||||
*/
|
*/
|
||||||
public class LanguageSettingsProvidersPage extends AbstractPage {
|
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 boolean isLanguageSettingsProvidersEnabled = false;
|
||||||
private static IProject project = null;
|
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$
|
public static final String KEY_EXPORT = "properties.export.page.enable"; //$NON-NLS-1$
|
||||||
/** @since 5.2 Show the "Include Files" settings entry tab */
|
/** @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$
|
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 */
|
/** @since 5.2 */
|
||||||
public static final String KEY_TIPBOX = "properties.option.tipbox.enable"; //$NON-NLS-1$
|
public static final String KEY_TIPBOX = "properties.option.tipbox.enable"; //$NON-NLS-1$
|
||||||
// string keys
|
// string keys
|
||||||
|
@ -47,37 +49,37 @@ public class CDTPrefUtil {
|
||||||
public static final String KEY_CONFSET = "workingsets.selected.configs"; //$NON-NLS-1$
|
public static final String KEY_CONFSET = "workingsets.selected.configs"; //$NON-NLS-1$
|
||||||
// integer keys
|
// integer keys
|
||||||
public static final String KEY_POSSAVE = "properties.save.position"; //$NON-NLS-1$
|
public static final String KEY_POSSAVE = "properties.save.position"; //$NON-NLS-1$
|
||||||
public static final int POSITION_SAVE_SIZE = 0;
|
public static final int POSITION_SAVE_SIZE = 0;
|
||||||
public static final int POSITION_SAVE_NONE = 2;
|
public static final int POSITION_SAVE_NONE = 2;
|
||||||
public static final int POSITION_SAVE_BOTH = 3;
|
public static final int POSITION_SAVE_BOTH = 3;
|
||||||
|
|
||||||
public static final String KEY_DISC_NAMES = "properties.discovery.naming"; //$NON-NLS-1$
|
public static final String KEY_DISC_NAMES = "properties.discovery.naming"; //$NON-NLS-1$
|
||||||
public static final int DISC_NAMING_UNIQUE_OR_BOTH = 0;
|
public static final int DISC_NAMING_UNIQUE_OR_BOTH = 0;
|
||||||
public static final int DISC_NAMING_UNIQUE_OR_IDS = 1;
|
public static final int DISC_NAMING_UNIQUE_OR_IDS = 1;
|
||||||
public static final int DISC_NAMING_ALWAYS_BOTH = 2;
|
public static final int DISC_NAMING_ALWAYS_BOTH = 2;
|
||||||
public static final int DISC_NAMING_ALWAYS_IDS = 3;
|
public static final int DISC_NAMING_ALWAYS_IDS = 3;
|
||||||
public static final int DISC_NAMING_DEFAULT = DISC_NAMING_UNIQUE_OR_BOTH;
|
public static final int DISC_NAMING_DEFAULT = DISC_NAMING_UNIQUE_OR_BOTH;
|
||||||
|
|
||||||
/** Property key used for string list display mode for multi-configuration edits (conjunction/disjunction) */
|
/** Property key used for string list display mode for multi-configuration edits (conjunction/disjunction) */
|
||||||
public static final String KEY_DMODE = "properties.multi.displ.mode"; //$NON-NLS-1$
|
public static final String KEY_DMODE = "properties.multi.displ.mode"; //$NON-NLS-1$
|
||||||
/** Conjunction implies showing only common elements (intersection) */
|
/** Conjunction implies showing only common elements (intersection) */
|
||||||
public static final int DMODE_CONJUNCTION = 1;
|
public static final int DMODE_CONJUNCTION = 1;
|
||||||
/** Disjunction implies showing all elements (union) */
|
/** Disjunction implies showing all elements (union) */
|
||||||
public static final int DMODE_DISJUNCTION = 2;
|
public static final int DMODE_DISJUNCTION = 2;
|
||||||
|
|
||||||
/** Property key used for string list write mode for multi-configuration edits (modify/replace) */
|
/** Property key used for string list write mode for multi-configuration edits (modify/replace) */
|
||||||
public static final String KEY_WMODE = "properties.multi.write.mode"; //$NON-NLS-1$
|
public static final String KEY_WMODE = "properties.multi.write.mode"; //$NON-NLS-1$
|
||||||
/** Modify implies changing only given elements and not changing any others */
|
/** Modify implies changing only given elements and not changing any others */
|
||||||
public static final int WMODE_MODIFY = 4;
|
public static final int WMODE_MODIFY = 4;
|
||||||
/** Replace implies replacing the whole list with the given one, overwriting old entries */
|
/** Replace implies replacing the whole list with the given one, overwriting old entries */
|
||||||
public static final int WMODE_REPLACE = 8;
|
public static final int WMODE_REPLACE = 8;
|
||||||
|
|
||||||
public static final String NULL = "NULL"; //$NON-NLS-1$
|
public static final String NULL = "NULL"; //$NON-NLS-1$
|
||||||
private static final IPreferenceStore pref = CUIPlugin.getDefault().getPreferenceStore();
|
private static final IPreferenceStore pref = CUIPlugin.getDefault().getPreferenceStore();
|
||||||
private static final String DELIMITER = " "; //$NON-NLS-1$
|
private static final String DELIMITER = " "; //$NON-NLS-1$
|
||||||
public static final String CONFSETDEL = "\f"; //$NON-NLS-1$
|
public static final String CONFSETDEL = "\f"; //$NON-NLS-1$
|
||||||
private static LinkedList<String> preferredTCs = null;
|
private static LinkedList<String> preferredTCs = null;
|
||||||
|
|
||||||
public static final Object[] EMPTY_ARRAY = new Object[0];
|
public static final Object[] EMPTY_ARRAY = new Object[0];
|
||||||
|
|
||||||
// low-level methods
|
// low-level methods
|
||||||
|
@ -93,40 +95,40 @@ public class CDTPrefUtil {
|
||||||
preferredTCs = new LinkedList<String>(Arrays.asList(getStr(KEY_PREFTC).split(DELIMITER)));
|
preferredTCs = new LinkedList<String>(Arrays.asList(getStr(KEY_PREFTC).split(DELIMITER)));
|
||||||
}
|
}
|
||||||
public static List<String> getPreferredTCs() {
|
public static List<String> getPreferredTCs() {
|
||||||
if (preferredTCs == null) readPreferredTCs();
|
if (preferredTCs == null) readPreferredTCs();
|
||||||
return preferredTCs;
|
return preferredTCs;
|
||||||
}
|
}
|
||||||
public static void delPreferredTC(String s) {
|
public static void delPreferredTC(String s) {
|
||||||
if (preferredTCs == null) readPreferredTCs();
|
if (preferredTCs == null) readPreferredTCs();
|
||||||
preferredTCs.remove(s);
|
preferredTCs.remove(s);
|
||||||
}
|
}
|
||||||
public static void addPreferredTC(String s) {
|
public static void addPreferredTC(String s) {
|
||||||
if (preferredTCs == null) readPreferredTCs();
|
if (preferredTCs == null) readPreferredTCs();
|
||||||
if (!preferredTCs.contains(s)) preferredTCs.add(s);
|
if (!preferredTCs.contains(s)) preferredTCs.add(s);
|
||||||
}
|
}
|
||||||
public static void cleanPreferredTCs() {
|
public static void cleanPreferredTCs() {
|
||||||
setStr(KEY_PREFTC, IPreferenceStore.STRING_DEFAULT_DEFAULT);
|
setStr(KEY_PREFTC, IPreferenceStore.STRING_DEFAULT_DEFAULT);
|
||||||
readPreferredTCs();
|
readPreferredTCs();
|
||||||
}
|
}
|
||||||
public static void savePreferredTCs() {
|
public static void savePreferredTCs() {
|
||||||
if (preferredTCs == null) return;
|
if (preferredTCs == null) return;
|
||||||
Iterator<String> it = preferredTCs.iterator();
|
Iterator<String> it = preferredTCs.iterator();
|
||||||
StringBuilder b = new StringBuilder();
|
StringBuilder b = new StringBuilder();
|
||||||
while (it.hasNext()) {
|
while (it.hasNext()) {
|
||||||
String s = it.next();
|
String s = it.next();
|
||||||
if (s == null) continue;
|
if (s == null) continue;
|
||||||
b.append(s);
|
b.append(s);
|
||||||
b.append(DELIMITER);
|
b.append(DELIMITER);
|
||||||
}
|
}
|
||||||
setStr(KEY_PREFTC, b.toString().trim());
|
setStr(KEY_PREFTC, b.toString().trim());
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns string list display mode for multi-configuration edits (conjunction/disjunction).
|
* Returns string list display mode for multi-configuration edits (conjunction/disjunction).
|
||||||
*
|
*
|
||||||
* @return the mode which can be either {@link CDTPrefUtil#DMODE_CONJUNCTION} (default value)
|
* @return the mode which can be either {@link CDTPrefUtil#DMODE_CONJUNCTION} (default value)
|
||||||
* or else {@link CDTPrefUtil#DMODE_DISJUNCTION}.
|
* or else {@link CDTPrefUtil#DMODE_DISJUNCTION}.
|
||||||
*
|
*
|
||||||
* @since 5.3
|
* @since 5.3
|
||||||
*/
|
*/
|
||||||
public static int getMultiCfgStringListDisplayMode() {
|
public static int getMultiCfgStringListDisplayMode() {
|
||||||
|
@ -136,25 +138,25 @@ public class CDTPrefUtil {
|
||||||
}
|
}
|
||||||
return mode;
|
return mode;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets string list display mode for multi-configuration edits (conjunction/disjunction).
|
* Sets string list display mode for multi-configuration edits (conjunction/disjunction).
|
||||||
*
|
*
|
||||||
* @param mode must be either {@link CDTPrefUtil#DMODE_CONJUNCTION}
|
* @param mode must be either {@link CDTPrefUtil#DMODE_CONJUNCTION}
|
||||||
* or {@link CDTPrefUtil#DMODE_DISJUNCTION}.
|
* or {@link CDTPrefUtil#DMODE_DISJUNCTION}.
|
||||||
*
|
*
|
||||||
* @since 5.3
|
* @since 5.3
|
||||||
*/
|
*/
|
||||||
public static void setMultiCfgStringListDisplayMode(int mode) {
|
public static void setMultiCfgStringListDisplayMode(int mode) {
|
||||||
setInt(KEY_DMODE, mode);
|
setInt(KEY_DMODE, mode);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns string list write mode for multi-configuration edits (modify/replace).
|
* Returns string list write mode for multi-configuration edits (modify/replace).
|
||||||
*
|
*
|
||||||
* @return the mode which can be either {@link CDTPrefUtil#WMODE_MODIFY} (default value)
|
* @return the mode which can be either {@link CDTPrefUtil#WMODE_MODIFY} (default value)
|
||||||
* or else {@link CDTPrefUtil#WMODE_REPLACE}.
|
* or else {@link CDTPrefUtil#WMODE_REPLACE}.
|
||||||
*
|
*
|
||||||
* @since 5.3
|
* @since 5.3
|
||||||
*/
|
*/
|
||||||
public static int getMultiCfgStringListWriteMode() {
|
public static int getMultiCfgStringListWriteMode() {
|
||||||
|
@ -164,19 +166,19 @@ public class CDTPrefUtil {
|
||||||
}
|
}
|
||||||
return mode;
|
return mode;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets string list write mode for multi-configuration edits (modify/replace).
|
* Sets string list write mode for multi-configuration edits (modify/replace).
|
||||||
*
|
*
|
||||||
* @param mode must be either {@link CDTPrefUtil#WMODE_MODIFY}
|
* @param mode must be either {@link CDTPrefUtil#WMODE_MODIFY}
|
||||||
* or {@link CDTPrefUtil#WMODE_REPLACE}.
|
* or {@link CDTPrefUtil#WMODE_REPLACE}.
|
||||||
*
|
*
|
||||||
* @since 5.3
|
* @since 5.3
|
||||||
*/
|
*/
|
||||||
public static void setMultiCfgStringListWriteMode(int mode) {
|
public static void setMultiCfgStringListWriteMode(int mode) {
|
||||||
setInt(KEY_WMODE, mode);
|
setInt(KEY_WMODE, mode);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @deprecated as of CDT 8.0. Use {@link StringListModeControl} to display string list modes.
|
* @deprecated as of CDT 8.0. Use {@link StringListModeControl} to display string list modes.
|
||||||
*/
|
*/
|
||||||
|
@ -185,15 +187,15 @@ public class CDTPrefUtil {
|
||||||
String s = null;
|
String s = null;
|
||||||
switch(getMultiCfgStringListDisplayMode()) {
|
switch(getMultiCfgStringListDisplayMode()) {
|
||||||
case DMODE_CONJUNCTION:
|
case DMODE_CONJUNCTION:
|
||||||
s = Messages.EnvironmentTab_17;
|
s = Messages.EnvironmentTab_17;
|
||||||
break;
|
break;
|
||||||
case DMODE_DISJUNCTION:
|
case DMODE_DISJUNCTION:
|
||||||
s = Messages.EnvironmentTab_18;
|
s = Messages.EnvironmentTab_18;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
return Messages.EnvironmentTab_19 + s;
|
return Messages.EnvironmentTab_19 + s;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @deprecated as of CDT 8.0. Use {@link StringListModeControl} to display string list modes.
|
* @deprecated as of CDT 8.0. Use {@link StringListModeControl} to display string list modes.
|
||||||
*/
|
*/
|
||||||
|
@ -202,15 +204,15 @@ public class CDTPrefUtil {
|
||||||
String s = null;
|
String s = null;
|
||||||
switch(getMultiCfgStringListWriteMode()) {
|
switch(getMultiCfgStringListWriteMode()) {
|
||||||
case WMODE_MODIFY:
|
case WMODE_MODIFY:
|
||||||
s = Messages.EnvironmentTab_24;
|
s = Messages.EnvironmentTab_24;
|
||||||
break;
|
break;
|
||||||
case WMODE_REPLACE:
|
case WMODE_REPLACE:
|
||||||
s = Messages.EnvironmentTab_21;
|
s = Messages.EnvironmentTab_21;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
return Messages.EnvironmentTab_22 + s;
|
return Messages.EnvironmentTab_22 + s;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Toggle string list display mode: conjunction <-> disjunction.
|
* Toggle string list display mode: conjunction <-> disjunction.
|
||||||
*/
|
*/
|
||||||
|
@ -240,39 +242,37 @@ public class CDTPrefUtil {
|
||||||
public static final String[] getStrListForDisplay(String[][] input) {
|
public static final String[] getStrListForDisplay(String[][] input) {
|
||||||
return getStrListForDisplay(input, getMultiCfgStringListDisplayMode());
|
return getStrListForDisplay(input, getMultiCfgStringListDisplayMode());
|
||||||
}
|
}
|
||||||
|
|
||||||
private static final String[] getStrListForDisplay(String[][] input, int mode) {
|
private static final String[] getStrListForDisplay(String[][] input, int mode) {
|
||||||
Object[] ob = getListForDisplay(input, getMultiCfgStringListDisplayMode(), null);
|
Object[] ob = getListForDisplay(input, getMultiCfgStringListDisplayMode(), null);
|
||||||
String[] ss = new String[ob.length];
|
String[] ss = new String[ob.length];
|
||||||
System.arraycopy(ob, 0, ss, 0, ob.length);
|
System.arraycopy(ob, 0, ss, 0, ob.length);
|
||||||
return ss;
|
return ss;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static final Object[] getListForDisplay(Object[][] input, Comparator<Object> cmp) {
|
public static final Object[] getListForDisplay(Object[][] input, Comparator<Object> cmp) {
|
||||||
return getListForDisplay(input, getMultiCfgStringListDisplayMode(), cmp);
|
return getListForDisplay(input, getMultiCfgStringListDisplayMode(), cmp);
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* Utility method forms string list
|
* Utility method forms string list
|
||||||
* according to current list display mode
|
* according to current list display mode
|
||||||
*
|
*
|
||||||
* @param input - array of string arrays
|
* @param input - array of string arrays
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
private static final Object[] getListForDisplay(Object[][] input, int mode, Comparator<Object> cmp) {
|
private static final Object[] getListForDisplay(Object[][] input, int mode, Comparator<Object> cmp) {
|
||||||
if (input == null || input.length == 0)
|
if (input == null || input.length == 0)
|
||||||
return EMPTY_ARRAY;
|
return EMPTY_ARRAY;
|
||||||
|
|
||||||
if (input.length == 1) {
|
if (input.length == 1) {
|
||||||
return (input[0] == null) ?
|
return (input[0] == null) ? EMPTY_ARRAY : input[0];
|
||||||
EMPTY_ARRAY :
|
|
||||||
input[0];
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Object[] s1 = input[0];
|
Object[] s1 = input[0];
|
||||||
if (s1 == null ||
|
if (s1 == null || s1.length == 0)
|
||||||
s1.length == 0)
|
|
||||||
return EMPTY_ARRAY;
|
return EMPTY_ARRAY;
|
||||||
if (getMultiCfgStringListDisplayMode() == DMODE_CONJUNCTION)
|
|
||||||
{
|
if (getMultiCfgStringListDisplayMode() == DMODE_CONJUNCTION) {
|
||||||
ArrayList<Object> lst = new ArrayList<Object>();
|
ArrayList<Object> lst = new ArrayList<Object>();
|
||||||
for (int i=0; i<s1.length; i++) {
|
for (int i=0; i<s1.length; i++) {
|
||||||
if (s1[i] == null)
|
if (s1[i] == null)
|
||||||
|
@ -280,10 +280,12 @@ public class CDTPrefUtil {
|
||||||
boolean found = true;
|
boolean found = true;
|
||||||
for (int k = 1; k<input.length; k++) {
|
for (int k = 1; k<input.length; k++) {
|
||||||
Object[] s2 = input[k];
|
Object[] s2 = input[k];
|
||||||
if (s2 == null || s2.length == 0)
|
if (s2 == null || s2.length == 0) {
|
||||||
return EMPTY_ARRAY;
|
return EMPTY_ARRAY;
|
||||||
if (i == 0)
|
}
|
||||||
|
if (i == 0) {
|
||||||
Arrays.sort(s2, cmp);
|
Arrays.sort(s2, cmp);
|
||||||
|
}
|
||||||
if (Arrays.binarySearch(s2, s1[i], cmp) < 0) {
|
if (Arrays.binarySearch(s2, s1[i], cmp) < 0) {
|
||||||
found = false;
|
found = false;
|
||||||
break;
|
break;
|
||||||
|
@ -297,17 +299,18 @@ public class CDTPrefUtil {
|
||||||
}
|
}
|
||||||
TreeSet<Object> lst = new TreeSet<Object>(cmp); // set, to avoid doubles
|
TreeSet<Object> lst = new TreeSet<Object>(cmp); // set, to avoid doubles
|
||||||
for (Object[] element : input) {
|
for (Object[] element : input) {
|
||||||
if (element == null ||
|
if (element == null || element.length == 0) {
|
||||||
element.length == 0)
|
|
||||||
continue;
|
continue;
|
||||||
for (Object element2 : element)
|
}
|
||||||
|
for (Object element2 : element) {
|
||||||
lst.add(element2);
|
lst.add(element2);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
s1 = lst.toArray();
|
s1 = lst.toArray();
|
||||||
Arrays.sort(s1, cmp);
|
Arrays.sort(s1, cmp);
|
||||||
return s1;
|
return s1;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @deprecated Use the {@link WorkingSetConfigurationManager} class, instead.
|
* @deprecated Use the {@link WorkingSetConfigurationManager} class, instead.
|
||||||
*/
|
*/
|
||||||
|
@ -315,15 +318,15 @@ public class CDTPrefUtil {
|
||||||
public static List<String> readConfigSets() {
|
public static List<String> readConfigSets() {
|
||||||
return new LinkedList<String>(Arrays.asList(getStr(KEY_CONFSET).split(CONFSETDEL)));
|
return new LinkedList<String>(Arrays.asList(getStr(KEY_CONFSET).split(CONFSETDEL)));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @deprecated Use the {@link WorkingSetConfigurationManager} class, instead.
|
* @deprecated Use the {@link WorkingSetConfigurationManager} class, instead.
|
||||||
*/
|
*/
|
||||||
@Deprecated
|
@Deprecated
|
||||||
public static void saveConfigSets(List<String> out) {
|
public static void saveConfigSets(List<String> out) {
|
||||||
StringBuilder b = new StringBuilder();
|
StringBuilder b = new StringBuilder();
|
||||||
for (String s : out) {
|
for (String s : out) {
|
||||||
if (s == null) continue;
|
if (s == null) continue;
|
||||||
b.append(s);
|
b.append(s);
|
||||||
b.append(CONFSETDEL);
|
b.append(CONFSETDEL);
|
||||||
}
|
}
|
||||||
|
|
|
@ -522,18 +522,19 @@
|
||||||
name="%TargetName.xlc.exe"
|
name="%TargetName.xlc.exe"
|
||||||
projectMacroSupplier="org.eclipse.cdt.managedbuilder.xlc.ui.XLCProjectMacroSupplier">
|
projectMacroSupplier="org.eclipse.cdt.managedbuilder.xlc.ui.XLCProjectMacroSupplier">
|
||||||
<configuration
|
<configuration
|
||||||
name="%ConfigName.Dbg"
|
artifactExtension="exe"
|
||||||
artifactExtension="exe"
|
cleanCommand="rm -rf"
|
||||||
cleanCommand="rm -rf"
|
errorParsers="org.eclipse.cdt.errorparsers.xlc.XlcErrorParser"
|
||||||
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
|
<toolChain
|
||||||
archList="all"
|
archList="all"
|
||||||
configurationEnvironmentSupplier="org.eclipse.cdt.managedbuilder.xlc.aix.AixConfigurationEnvironmentSupplier"
|
configurationEnvironmentSupplier="org.eclipse.cdt.managedbuilder.xlc.aix.AixConfigurationEnvironmentSupplier"
|
||||||
id="cdt.managedbuild.toolchain.xlc.exe.debug"
|
id="cdt.managedbuild.toolchain.xlc.exe.debug"
|
||||||
name="%ToolChainName.Dbg"
|
name="%ToolChainName.Dbg"
|
||||||
osList="all"
|
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">
|
targetTool="cdt.managedbuild.tool.xlc.c.linker.exe.debug;cdt.managedbuild.tool.xlc.cpp.linker.exe.debug">
|
||||||
<targetPlatform
|
<targetPlatform
|
||||||
id="cdt.managedbuild.target.xlc.platform.exe.debug"
|
id="cdt.managedbuild.target.xlc.platform.exe.debug"
|
||||||
|
@ -588,17 +589,18 @@
|
||||||
</toolChain>
|
</toolChain>
|
||||||
</configuration>
|
</configuration>
|
||||||
<configuration
|
<configuration
|
||||||
name="%ConfigName.Rel"
|
name="%ConfigName.Rel"
|
||||||
artifactExtension="exe"
|
artifactExtension="exe"
|
||||||
cleanCommand="rm -rf"
|
cleanCommand="rm -rf"
|
||||||
errorParsers="org.eclipse.cdt.errorparsers.xlc.XlcErrorParser"
|
errorParsers="org.eclipse.cdt.errorparsers.xlc.XlcErrorParser"
|
||||||
id="cdt.managedbuild.config.xlc.exe.release">
|
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
|
<toolChain
|
||||||
archList="all"
|
archList="all"
|
||||||
id="cdt.managedbuild.toolchain.xlc.exe.release"
|
id="cdt.managedbuild.toolchain.xlc.exe.release"
|
||||||
name="%ToolChainName.Rel"
|
name="%ToolChainName.Rel"
|
||||||
osList="all"
|
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">
|
targetTool="cdt.managedbuild.tool.xlc.c.linker.exe.release;cdt.managedbuild.tool.xlc.cpp.linker.exe.release">
|
||||||
<targetPlatform
|
<targetPlatform
|
||||||
id="cdt.managedbuild.target.xlc.platform.exe.release"
|
id="cdt.managedbuild.target.xlc.platform.exe.release"
|
||||||
|
@ -661,15 +663,17 @@
|
||||||
name="%TargetName.xlc.so"
|
name="%TargetName.xlc.so"
|
||||||
projectMacroSupplier="org.eclipse.cdt.managedbuilder.xlc.ui.XLCProjectMacroSupplier">
|
projectMacroSupplier="org.eclipse.cdt.managedbuilder.xlc.ui.XLCProjectMacroSupplier">
|
||||||
<configuration
|
<configuration
|
||||||
name="%ConfigName.Dbg"
|
name="%ConfigName.Dbg"
|
||||||
cleanCommand="rm -rf"
|
cleanCommand="rm -rf"
|
||||||
artifactExtension="so"
|
artifactExtension="so"
|
||||||
errorParsers="org.eclipse.cdt.errorparsers.xlc.XlcErrorParser"
|
errorParsers="org.eclipse.cdt.errorparsers.xlc.XlcErrorParser"
|
||||||
id="cdt.managedbuild.config.xlc.so.debug">
|
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
|
<toolChain
|
||||||
name="%ToolChainName.Dbg"
|
id="cdt.managedbuild.toolchain.xlc.so.debug"
|
||||||
targetTool="cdt.managedbuild.tool.xlc.c.linker.so.debug;cdt.managedbuild.tool.xlc.cpp.linker.so.debug"
|
languageSettingsProviders="org.eclipse.cdt.managedbuilder.xlc.core.XlcBuildCommandParser;org.eclipse.cdt.managedbuilder.xlc.core.XlcBuiltinSpecsDetector"
|
||||||
id="cdt.managedbuild.toolchain.xlc.so.debug">
|
name="%ToolChainName.Dbg"
|
||||||
|
targetTool="cdt.managedbuild.tool.xlc.c.linker.so.debug;cdt.managedbuild.tool.xlc.cpp.linker.so.debug">
|
||||||
<targetPlatform
|
<targetPlatform
|
||||||
id="cdt.managedbuild.target.xlc.platform.so.debug"
|
id="cdt.managedbuild.target.xlc.platform.so.debug"
|
||||||
name="%PlatformName.Dbg"
|
name="%PlatformName.Dbg"
|
||||||
|
@ -723,15 +727,17 @@
|
||||||
</toolChain>
|
</toolChain>
|
||||||
</configuration>
|
</configuration>
|
||||||
<configuration
|
<configuration
|
||||||
name="%ConfigName.Rel"
|
name="%ConfigName.Rel"
|
||||||
cleanCommand="rm -rf"
|
cleanCommand="rm -rf"
|
||||||
artifactExtension="so"
|
artifactExtension="so"
|
||||||
errorParsers="org.eclipse.cdt.errorparsers.xlc.XlcErrorParser"
|
errorParsers="org.eclipse.cdt.errorparsers.xlc.XlcErrorParser"
|
||||||
id="cdt.managedbuild.config.xlc.so.release">
|
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
|
<toolChain
|
||||||
name="%ToolChainName.Rel"
|
id="cdt.managedbuild.toolchain.xlc.so.release"
|
||||||
targetTool="cdt.managedbuild.tool.xlc.c.linker.so.release;cdt.managedbuild.tool.xlc.cpp.linker.so.release"
|
languageSettingsProviders="org.eclipse.cdt.managedbuilder.xlc.core.XlcBuildCommandParser;org.eclipse.cdt.managedbuilder.xlc.core.XlcBuiltinSpecsDetector"
|
||||||
id="cdt.managedbuild.toolchain.xlc.so.release">
|
name="%ToolChainName.Rel"
|
||||||
|
targetTool="cdt.managedbuild.tool.xlc.c.linker.so.release;cdt.managedbuild.tool.xlc.cpp.linker.so.release">
|
||||||
<targetPlatform
|
<targetPlatform
|
||||||
id="cdt.managedbuild.target.xlc.platform.so.release"
|
id="cdt.managedbuild.target.xlc.platform.so.release"
|
||||||
name="%PlatformName.Rel"
|
name="%PlatformName.Rel"
|
||||||
|
@ -793,15 +799,17 @@
|
||||||
name="%TargetName.xlc.lib"
|
name="%TargetName.xlc.lib"
|
||||||
projectMacroSupplier="org.eclipse.cdt.managedbuilder.xlc.ui.XLCProjectMacroSupplier">
|
projectMacroSupplier="org.eclipse.cdt.managedbuilder.xlc.ui.XLCProjectMacroSupplier">
|
||||||
<configuration
|
<configuration
|
||||||
name="%ConfigName.Dbg"
|
name="%ConfigName.Dbg"
|
||||||
cleanCommand="rm -rf"
|
cleanCommand="rm -rf"
|
||||||
artifactExtension="lib"
|
artifactExtension="lib"
|
||||||
errorParsers="org.eclipse.cdt.errorparsers.xlc.XlcErrorParser"
|
errorParsers="org.eclipse.cdt.errorparsers.xlc.XlcErrorParser"
|
||||||
id="cdt.managedbuild.config.xlc.lib.debug">
|
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
|
<toolChain
|
||||||
name="%ToolChainName.Dbg"
|
id="cdt.managedbuild.toolchain.xlc.lib.debug"
|
||||||
targetTool="cdt.managedbuild.tool.xlc.archiver.lib.debug"
|
languageSettingsProviders="org.eclipse.cdt.managedbuilder.xlc.core.XlcBuildCommandParser;org.eclipse.cdt.managedbuilder.xlc.core.XlcBuiltinSpecsDetector"
|
||||||
id="cdt.managedbuild.toolchain.xlc.lib.debug">
|
name="%ToolChainName.Dbg"
|
||||||
|
targetTool="cdt.managedbuild.tool.xlc.archiver.lib.debug">
|
||||||
<targetPlatform
|
<targetPlatform
|
||||||
id="cdt.managedbuild.target.xlc.platform.lib.debug"
|
id="cdt.managedbuild.target.xlc.platform.lib.debug"
|
||||||
name="%PlatformName.Dbg"
|
name="%PlatformName.Dbg"
|
||||||
|
@ -851,15 +859,17 @@
|
||||||
</toolChain>
|
</toolChain>
|
||||||
</configuration>
|
</configuration>
|
||||||
<configuration
|
<configuration
|
||||||
name="%ConfigName.Rel"
|
name="%ConfigName.Rel"
|
||||||
cleanCommand="rm -rf"
|
cleanCommand="rm -rf"
|
||||||
artifactExtension="lib"
|
artifactExtension="lib"
|
||||||
errorParsers="org.eclipse.cdt.errorparsers.xlc.XlcErrorParser"
|
errorParsers="org.eclipse.cdt.errorparsers.xlc.XlcErrorParser"
|
||||||
id="cdt.managedbuild.config.xlc.lib.release">
|
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
|
<toolChain
|
||||||
name="%ToolChainName.Rel"
|
id="cdt.managedbuild.toolchain.xlc.lib.release"
|
||||||
targetTool="cdt.managedbuild.tool.xlc.archiver.lib.release"
|
languageSettingsProviders="org.eclipse.cdt.managedbuilder.xlc.core.XlcBuildCommandParser;org.eclipse.cdt.managedbuilder.xlc.core.XlcBuiltinSpecsDetector"
|
||||||
id="cdt.managedbuild.toolchain.xlc.lib.release">
|
name="%ToolChainName.Rel"
|
||||||
|
targetTool="cdt.managedbuild.tool.xlc.archiver.lib.release">
|
||||||
<targetPlatform
|
<targetPlatform
|
||||||
id="cdt.managedbuild.target.xlc.platform.lib.release"
|
id="cdt.managedbuild.target.xlc.platform.lib.release"
|
||||||
name="%PlatformName.Rel"
|
name="%PlatformName.Rel"
|
||||||
|
@ -3732,7 +3742,6 @@
|
||||||
id="cdt.managedbuild.tool.xlc.c.compiler.input"
|
id="cdt.managedbuild.tool.xlc.c.compiler.input"
|
||||||
name="%inputType.c.name"
|
name="%inputType.c.name"
|
||||||
primaryInput="true"
|
primaryInput="true"
|
||||||
scannerConfigDiscoveryProfileId="org.eclipse.cdt.managedbuilder.xlc.core.XLCManagedMakePerProjectProfile"
|
|
||||||
sourceContentType="org.eclipse.cdt.core.cSource"
|
sourceContentType="org.eclipse.cdt.core.cSource"
|
||||||
sources="c">
|
sources="c">
|
||||||
</inputType>
|
</inputType>
|
||||||
|
@ -3753,7 +3762,6 @@
|
||||||
id="cdt.managedbuild.tool.xlc.cpp.c.compiler.input"
|
id="cdt.managedbuild.tool.xlc.cpp.c.compiler.input"
|
||||||
name="%inputType.c.name.2"
|
name="%inputType.c.name.2"
|
||||||
primaryInput="true"
|
primaryInput="true"
|
||||||
scannerConfigDiscoveryProfileId="org.eclipse.cdt.managedbuilder.xlc.core.XLCManagedMakePerProjectProfile"
|
|
||||||
sourceContentType="org.eclipse.cdt.core.cSource"
|
sourceContentType="org.eclipse.cdt.core.cSource"
|
||||||
sources="c">
|
sources="c">
|
||||||
</inputType>
|
</inputType>
|
||||||
|
@ -3763,7 +3771,6 @@
|
||||||
id="cdt.managedbuild.tool.xlc.cpp.compiler.input"
|
id="cdt.managedbuild.tool.xlc.cpp.compiler.input"
|
||||||
name="%inputType.cpp.name"
|
name="%inputType.cpp.name"
|
||||||
primaryInput="true"
|
primaryInput="true"
|
||||||
scannerConfigDiscoveryProfileId="org.eclipse.cdt.managedbuilder.xlc.core.XLCManagedMakePerProjectProfileCPP"
|
|
||||||
sourceContentType="org.eclipse.cdt.core.cxxSource"
|
sourceContentType="org.eclipse.cdt.core.cxxSource"
|
||||||
sources="c,C,cc,cxx,cpp">
|
sources="c,C,cc,cxx,cpp">
|
||||||
</inputType>
|
</inputType>
|
||||||
|
|
Loading…
Add table
Reference in a new issue