mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-29 19:45:01 +02:00
Clean up
This commit is contained in:
parent
95886b4f65
commit
1e208208ed
17 changed files with 2615 additions and 2686 deletions
|
@ -263,7 +263,7 @@ Specifying this attribute is fully equivalent to specifying the "org.eclips
|
|||
<attribute name="errorParsers" type="string">
|
||||
<annotation>
|
||||
<documentation>
|
||||
The semi-colon separated list of the default error parsers to be used with this configuration. The list is ordered with the first error parser on the list invoked first, the second error parser second, and so on. The list may contain the error parsers defined by CDT and/or other installed error parser extensions. The list of error parsers to be used may be changed by the user on a per-configuration basis. When specified, this overrides the tool-chain errorParsers attribute.
|
||||
The semi-colon separated list of the default error parsers to be used with this configuration. The list is ordered with the first error parser on the list invoked first, the second error parser second, and so on. The list may contain the error parsers defined by CDT and/or other installed error parser extensions. The list of error parsers to be used may be changed by the user on a per-configuration basis. When specified, this overrides the tool-chain errorParsers attribute.
|
||||
</documentation>
|
||||
</annotation>
|
||||
</attribute>
|
||||
|
@ -271,8 +271,8 @@ Specifying this attribute is fully equivalent to specifying the "org.eclips
|
|||
<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 "*", in this case shared instance of the provider defined on workspace level is used. Also 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.
|
||||
This field could be amended with toolchain-level providers list by using ${Toolchain} keyword. Provider ID can be prefixed with "-" which will cause id to be removed from the preceeding list including providers defined with ${Toolchain} keyword.
|
||||
If this field is not specified, "org.eclipse.cdt.managedbuilder.core.MBSLanguageSettingsProvider" (MBS Language Settings Provider) is used by default.
|
||||
</documentation>
|
||||
</annotation>
|
||||
</attribute>
|
||||
|
@ -414,15 +414,14 @@ Specifying this attribute is fully equivalent to specifying the "org.eclips
|
|||
<attribute name="errorParsers" type="string">
|
||||
<annotation>
|
||||
<documentation>
|
||||
The semi-colon separated list of the default error parsers to be used with this tool-chain. The list is ordered with the first error parser on the list invoked first, the second error parser second, and so on. The list may contain the error parsers defined by CDT and/or other installed error parser extensions. When specified, this overrides the tool errorParsers attributes of the tool children of the tool-chain and the builder child of the tool-chain.
|
||||
The semi-colon separated list of the default error parsers to be used with this tool-chain. The list is ordered with the first error parser on the list invoked first, the second error parser second, and so on. The list may contain the error parsers defined by CDT and/or other installed error parser extensions. When specified, this overrides the tool errorParsers attributes of the tool children of the tool-chain and the builder child of the tool-chain.
|
||||
</documentation>
|
||||
</annotation>
|
||||
</attribute>
|
||||
<attribute name="languageSettingsProviders" type="string">
|
||||
<annotation>
|
||||
<documentation>
|
||||
Semicolon-separated list of providers ID implementing ILanguageSettingProvider interface. Provider ID can be prefixed with "*", in this case shared instance of the provider defined on workspace level is used.
|
||||
This list could be adjusted on configuration level in the corresponding attribute.
|
||||
Semicolon-separated list of providers ID implementing ILanguageSettingProvider interface. This list could be adjusted on configuration level in the corresponding attribute.
|
||||
</documentation>
|
||||
</annotation>
|
||||
</attribute>
|
||||
|
@ -749,14 +748,14 @@ The pathConverter of a toolchain applies for all tools of the toolchain except i
|
|||
<attribute name="customBuildStep" type="boolean">
|
||||
<annotation>
|
||||
<documentation>
|
||||
Specifies whether this Tool represents a user-define custom build step. The default is false. When True, the default value of the commandLinePattern attribute changes to “$(command)�.
|
||||
Specifies whether this Tool represents a user-define custom build step. The default is false. When True, the default value of the commandLinePattern attribute changes to "$(command)".
|
||||
</documentation>
|
||||
</annotation>
|
||||
</attribute>
|
||||
<attribute name="announcement" type="string">
|
||||
<annotation>
|
||||
<documentation>
|
||||
Specifies a string that is written to the build output prior to each invocation of the tool. The default value is “Invoking tool-name (tool-id)…�
|
||||
Specifies a string that is written to the build output prior to each invocation of the tool. The default value is "Invoking tool-name (tool-id)..."
|
||||
</documentation>
|
||||
<appInfo>
|
||||
<meta.attribute translatable="true"/>
|
||||
|
@ -1083,7 +1082,7 @@ Overrides language id specified with the languageId attribute.
|
|||
<attribute name="primaryInputType" type="string">
|
||||
<annotation>
|
||||
<documentation>
|
||||
The id of the input type that is used in determining the build “rules� for the output type and for the default name of the output file. The default is the input type with primaryInput == true.
|
||||
The id of the input type that is used in determining the build "rules" for the output type and for the default name of the output file. The default is the input type with primaryInput == true.
|
||||
</documentation>
|
||||
</annotation>
|
||||
</attribute>
|
||||
|
@ -1097,7 +1096,7 @@ Overrides language id specified with the languageId attribute.
|
|||
<attribute name="outputPrefix" type="string">
|
||||
<annotation>
|
||||
<documentation>
|
||||
Some tools produce files with a special prefix that must be specified. For example, a librarian on POSIX systems expects the output to be libtarget.a, so 'lib' would be the prefix. The default is to use the Tool “outputPrefix� attribute if primaryOutput is True, otherwise the default is an empty string. This attribute supports MBS configuration context macros.
|
||||
Some tools produce files with a special prefix that must be specified. For example, a librarian on POSIX systems expects the output to be libtarget.a, so 'lib' would be the prefix. The default is to use the Tool "outputPrefix" attribute if primaryOutput is True, otherwise the default is an empty string. This attribute supports MBS configuration context macros.
|
||||
</documentation>
|
||||
</annotation>
|
||||
</attribute>
|
||||
|
@ -2052,11 +2051,11 @@ If the "buildPathResolver" attribute is specified, the "pathDelim
|
|||
<documentation>
|
||||
Represents the applicability type for this enablement.
|
||||
Can contain the following values:
|
||||
UI_VISIBILITY – the given enablement expression specifies whether the option is to be visible in UI,
|
||||
UI_ENABLEMENT – the given enablement expression specifies the enable state of the controls that represent the option in UI,
|
||||
CMD_USAGE – the given enablement expression specifies whether the option is to be used in command line
|
||||
UI_VISIBILITY - the given enablement expression specifies whether the option is to be visible in UI,
|
||||
UI_ENABLEMENT - the given enablement expression specifies the enable state of the controls that represent the option in UI,
|
||||
CMD_USAGE - the given enablement expression specifies whether the option is to be used in command line
|
||||
CONTAINER_ATTRIBUTE - the given enablement expressions specifies thecontainer attribute value
|
||||
ALL – this value means the combination of all the above values.
|
||||
ALL - this value means the combination of all the above values.
|
||||
|
||||
Several types could be specified simultaneously using the "|" as a delimiter, e.g.:
|
||||
type="UI_VISIBILITY|CMD_USAGE"
|
||||
|
@ -2190,7 +2189,7 @@ Default value is true.
|
|||
<attribute name="value" type="string">
|
||||
<annotation>
|
||||
<documentation>
|
||||
Specifies the expected value. If the current option value matches the value specified in this attribute, the checkOption element is treated as true, otherwise – as false.
|
||||
Specifies the expected value. If the current option value matches the value specified in this attribute, the checkOption element is treated as true, otherwise - as false.
|
||||
The expected value could be specified either as a string that may contain build macros or as a regular expression. During the comparison, the build macros are resolved and the option value is checked to match the resulting string or regular expression. The way the expected value is specified and treated depends on the value of the isRegex attribute
|
||||
</documentation>
|
||||
</annotation>
|
||||
|
@ -2205,14 +2204,14 @@ The expected value could be specified either as a string that may contain build
|
|||
<attribute name="otherOptionId" type="string">
|
||||
<annotation>
|
||||
<documentation>
|
||||
The id of the option which is to be compared with the option specified with the “optionId� attribute. The default is the id of the option that holds this expression. If the “value� attribute is specified, both the “otherOptionId� and the “otherHolderId� attributes are ignored. When searching for the option to be checked, MBS will examine all the options the holder contains along with all superclasses of each option to find the option with the specified id.
|
||||
The id of the option which is to be compared with the option specified with the "optionId" attribute. The default is the id of the option that holds this expression. If the "value" attribute is specified, both the "otherOptionId" and the "otherHolderId" attributes are ignored. When searching for the option to be checked, MBS will examine all the options the holder contains along with all superclasses of each option to find the option with the specified id.
|
||||
</documentation>
|
||||
</annotation>
|
||||
</attribute>
|
||||
<attribute name="otherHolderId" type="string">
|
||||
<annotation>
|
||||
<documentation>
|
||||
The option holder id that holds the option specified with the “otherOptionId� attribute. The default is the id of the holder that holds the container of this expression. If the “value� attribute is specified, both the “otherOptionId� and the “otherHolderId� attributes are ingnored. When searching for the needed holder, MBS will examine all the holders the current configuration contains along with all superclasses of each holder in order to find the holder with the specified id.
|
||||
The option holder id that holds the option specified with the "otherOptionId" attribute. The default is the id of the holder that holds the container of this expression. If the "value" attribute is specified, both the "otherOptionId" and the "otherHolderId" attributes are ingnored. When searching for the needed holder, MBS will examine all the holders the current configuration contains along with all superclasses of each holder in order to find the holder with the specified id.
|
||||
</documentation>
|
||||
</annotation>
|
||||
</attribute>
|
||||
|
@ -2236,7 +2235,7 @@ The expected value could be specified either as a string that may contain build
|
|||
<attribute name="value" type="string" use="required">
|
||||
<annotation>
|
||||
<documentation>
|
||||
Specifies the expected value. If the current string specified in the “string� attribute matches the value specified in this attribute, the checkString element is treated as true, otherwise – as false.
|
||||
Specifies the expected value. If the current string specified in the "string" attribute matches the value specified in this attribute, the checkString element is treated as true, otherwise - as false.
|
||||
The expected value could be specified either as a string that might contain the build macros or as a regular expression.
|
||||
The way the value is specified and treated depends on the value of the isRegex attribute.
|
||||
</documentation>
|
||||
|
|
|
@ -174,11 +174,11 @@ public interface IConfiguration extends IBuildObject, IBuildObjectPropertiesCont
|
|||
|
||||
/**
|
||||
* Returns default language settings providers IDs specified for the configuration.
|
||||
* @return default language settings providers IDs.
|
||||
* @return default language settings providers IDs or {@code null}.
|
||||
*
|
||||
* @since 8.1
|
||||
*/
|
||||
public String[] getDefaultLanguageSettingsProvidersIds();
|
||||
public String[] getDefaultLanguageSettingsProviderIds();
|
||||
|
||||
/**
|
||||
* Projects have C or CC natures. Tools can specify a filter so they are not
|
||||
|
|
|
@ -271,7 +271,7 @@ public interface IToolChain extends IBuildObject, IHoldsOptions {
|
|||
*
|
||||
* @since 8.1
|
||||
*/
|
||||
public String getDefaultLanguageSettingsProvidersIds();
|
||||
public String getDefaultLanguageSettingsProviderIds();
|
||||
|
||||
/**
|
||||
* Returns the scanner config discovery profile id or <code>null</code> if none.
|
||||
|
|
|
@ -26,7 +26,6 @@ import java.util.Vector;
|
|||
|
||||
import org.eclipse.cdt.build.core.scannerconfig.ICfgScannerConfigBuilderInfo2Set;
|
||||
import org.eclipse.cdt.build.internal.core.scannerconfig.CfgDiscoveredPathManager.PathInfoCache;
|
||||
import org.eclipse.cdt.core.CCorePlugin;
|
||||
import org.eclipse.cdt.core.ErrorParserManager;
|
||||
import org.eclipse.cdt.core.settings.model.CSourceEntry;
|
||||
import org.eclipse.cdt.core.settings.model.ICConfigurationDescription;
|
||||
|
@ -84,10 +83,8 @@ import org.eclipse.core.resources.IResource;
|
|||
import org.eclipse.core.resources.IResourceDelta;
|
||||
import org.eclipse.core.runtime.CoreException;
|
||||
import org.eclipse.core.runtime.IPath;
|
||||
import org.eclipse.core.runtime.IStatus;
|
||||
import org.eclipse.core.runtime.Path;
|
||||
import org.eclipse.core.runtime.Platform;
|
||||
import org.eclipse.core.runtime.Status;
|
||||
import org.eclipse.osgi.util.NLS;
|
||||
import org.osgi.framework.Version;
|
||||
|
||||
|
@ -96,6 +93,8 @@ public class Configuration extends BuildObject implements IConfiguration, IBuild
|
|||
private static final String EMPTY_STRING = ""; //$NON-NLS-1$
|
||||
private static final String EMPTY_CFG_ID = "org.eclipse.cdt.build.core.emptycfg"; //$NON-NLS-1$
|
||||
private static final String LANGUAGE_SETTINGS_PROVIDER_DELIMITER = ";"; //$NON-NLS-1$
|
||||
private static final String LANGUAGE_SETTINGS_PROVIDER_NEGATION_SIGN = "-"; //$NON-NLS-1$
|
||||
private static final String $TOOLCHAIN = "${Toolchain}"; //$NON-NLS-1$
|
||||
|
||||
// Parent and children
|
||||
private String parentId;
|
||||
|
@ -107,7 +106,7 @@ public class Configuration extends BuildObject implements IConfiguration, IBuild
|
|||
private String artifactExtension;
|
||||
private String errorParserIds;
|
||||
private String defaultLanguageSettingsProvidersAttribute;
|
||||
private String[] defaultLanguageSettingsProvidersIds;
|
||||
private String[] defaultLanguageSettingsProviderIds;
|
||||
private String prebuildStep;
|
||||
private String postbuildStep;
|
||||
private String preannouncebuildStep;
|
||||
|
@ -1462,6 +1461,10 @@ public class Configuration extends BuildObject implements IConfiguration, IBuild
|
|||
return set;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get value of attribute {@link IConfiguration#LANGUAGE_SETTINGS_PROVIDERS}
|
||||
* It not defined, it will try to pull the attribute from the parent configuration.
|
||||
*/
|
||||
private String getDefaultLanguageSettingsProvidersAttribute() {
|
||||
if (defaultLanguageSettingsProvidersAttribute == null && parent instanceof Configuration) {
|
||||
defaultLanguageSettingsProvidersAttribute = ((Configuration) parent).getDefaultLanguageSettingsProvidersAttribute();
|
||||
|
@ -1470,29 +1473,32 @@ public class Configuration extends BuildObject implements IConfiguration, IBuild
|
|||
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[] getDefaultLanguageSettingsProvidersIds() {
|
||||
defaultLanguageSettingsProvidersIds = null;
|
||||
if (defaultLanguageSettingsProvidersIds == null) {
|
||||
getDefaultLanguageSettingsProvidersAttribute();
|
||||
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("-")) {
|
||||
if (id.startsWith(LANGUAGE_SETTINGS_PROVIDER_NEGATION_SIGN)) {
|
||||
id = id.substring(1);
|
||||
ids.remove(id);
|
||||
} else if (!ids.contains(id)){
|
||||
if (id.contains("${Toolchain}")) {
|
||||
} else if (!ids.contains(id)) {
|
||||
if (id.contains($TOOLCHAIN)) {
|
||||
IToolChain toolchain = getToolChain();
|
||||
if (toolchain != null) {
|
||||
String toolchainProvidersIds = toolchain.getDefaultLanguageSettingsProvidersIds();
|
||||
String toolchainProvidersIds = toolchain.getDefaultLanguageSettingsProviderIds();
|
||||
if (toolchainProvidersIds != null) {
|
||||
ids.addAll(Arrays.asList(toolchainProvidersIds.split(LANGUAGE_SETTINGS_PROVIDER_DELIMITER)));
|
||||
} else {
|
||||
String message = "Invalid use of ${Toolchain} tag, toolchain does not specify language settings providers. cfg=" + getId();
|
||||
ManagedBuilderCorePlugin.log(new Status(IStatus.ERROR, CCorePlugin.PLUGIN_ID, IStatus.ERROR, message, new Exception()));
|
||||
}
|
||||
}
|
||||
} else {
|
||||
|
@ -1502,13 +1508,13 @@ public class Configuration extends BuildObject implements IConfiguration, IBuild
|
|||
}
|
||||
|
||||
}
|
||||
defaultLanguageSettingsProvidersIds = ids.toArray(new String[ids.size()]);
|
||||
defaultLanguageSettingsProviderIds = ids.toArray(new String[ids.size()]);
|
||||
} else if (parent != null) {
|
||||
defaultLanguageSettingsProvidersIds = parent.getDefaultLanguageSettingsProvidersIds();
|
||||
defaultLanguageSettingsProviderIds = parent.getDefaultLanguageSettingsProviderIds();
|
||||
}
|
||||
}
|
||||
|
||||
return defaultLanguageSettingsProvidersIds;
|
||||
return defaultLanguageSettingsProviderIds;
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
|
|
|
@ -441,7 +441,7 @@ public class MultiConfiguration extends MultiItemsHolder implements
|
|||
}
|
||||
|
||||
@Override
|
||||
public String[] getDefaultLanguageSettingsProvidersIds() {
|
||||
public String[] getDefaultLanguageSettingsProviderIds() {
|
||||
ManagedBuilderCorePlugin.error("Default Language Settings Providers are not supported in multiconfiguration mode");
|
||||
return null;
|
||||
}
|
||||
|
|
|
@ -88,7 +88,7 @@ public class ToolChain extends HoldsOptions implements IToolChain, IMatchKeyProv
|
|||
private String targetToolIds;
|
||||
private String secondaryOutputIds;
|
||||
private Boolean isAbstract;
|
||||
private String defaultLanguageSettingsProvidersIds;
|
||||
private String defaultLanguageSettingsProviderIds;
|
||||
private String scannerConfigDiscoveryProfileId;
|
||||
private String versionsSupported;
|
||||
private String convertToId;
|
||||
|
@ -559,7 +559,7 @@ public class ToolChain extends HoldsOptions implements IToolChain, IMatchKeyProv
|
|||
targetToolIds = SafeStringInterner.safeIntern(element.getAttribute(TARGET_TOOL));
|
||||
|
||||
// Get the initial/default language setttings providers IDs
|
||||
defaultLanguageSettingsProvidersIds = element.getAttribute(LANGUAGE_SETTINGS_PROVIDERS);
|
||||
defaultLanguageSettingsProviderIds = element.getAttribute(LANGUAGE_SETTINGS_PROVIDERS);
|
||||
|
||||
// Get the scanner config discovery profile id
|
||||
scannerConfigDiscoveryProfileId = SafeStringInterner.safeIntern(element.getAttribute(SCANNER_CONFIG_PROFILE_ID));
|
||||
|
@ -1537,13 +1537,11 @@ public class ToolChain extends HoldsOptions implements IToolChain, IMatchKeyProv
|
|||
}
|
||||
|
||||
@Override
|
||||
public String getDefaultLanguageSettingsProvidersIds() {
|
||||
if (defaultLanguageSettingsProvidersIds == null) {
|
||||
if (superClass instanceof IToolChain) {
|
||||
defaultLanguageSettingsProvidersIds = ((IToolChain) superClass).getDefaultLanguageSettingsProvidersIds();
|
||||
public String getDefaultLanguageSettingsProviderIds() {
|
||||
if (defaultLanguageSettingsProviderIds == null && superClass instanceof IToolChain) {
|
||||
defaultLanguageSettingsProviderIds = ((IToolChain) superClass).getDefaultLanguageSettingsProviderIds();
|
||||
}
|
||||
}
|
||||
return defaultLanguageSettingsProvidersIds;
|
||||
return defaultLanguageSettingsProviderIds;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -1552,9 +1550,9 @@ public class ToolChain extends HoldsOptions implements IToolChain, IMatchKeyProv
|
|||
private boolean isLanguageSettingsProvidersFunctionalityEnabled() {
|
||||
boolean isLanguageSettingsProvidersEnabled = false;
|
||||
IConfiguration cfg = getParent();
|
||||
if (cfg!=null) {
|
||||
if (cfg != null) {
|
||||
IResource rc = cfg.getOwner();
|
||||
if (rc!=null) {
|
||||
if (rc != null) {
|
||||
IProject project = rc.getProject();
|
||||
isLanguageSettingsProvidersEnabled = ScannerDiscoveryLegacySupport.isLanguageSettingsProvidersFunctionalityEnabled(project);
|
||||
}
|
||||
|
@ -1564,11 +1562,13 @@ public class ToolChain extends HoldsOptions implements IToolChain, IMatchKeyProv
|
|||
|
||||
/**
|
||||
* Temporary method to support compatibility during SD transition.
|
||||
* @see ScannerDiscoveryLegacySupport#getDeprecatedLegacyProfiles(String)
|
||||
*
|
||||
* @noreference This method is not intended to be referenced by clients.
|
||||
*/
|
||||
public String getLegacyScannerConfigDiscoveryProfileId() {
|
||||
String profileId = scannerConfigDiscoveryProfileId;
|
||||
if (profileId==null) {
|
||||
if (profileId == null) {
|
||||
profileId = ScannerDiscoveryLegacySupport.getDeprecatedLegacyProfiles(id);
|
||||
if (profileId == null) {
|
||||
IToolChain superClass = getSuperClass();
|
||||
|
|
|
@ -519,7 +519,7 @@ public class ConfigurationDataProvider extends CConfigurationDataProvider implem
|
|||
|
||||
private static List<ILanguageSettingsProvider> getDefaultLanguageSettingsProviders(IConfiguration cfg) {
|
||||
List<ILanguageSettingsProvider> providers = new ArrayList<ILanguageSettingsProvider>();
|
||||
String[] ids = cfg.getDefaultLanguageSettingsProvidersIds();
|
||||
String[] ids = cfg.getDefaultLanguageSettingsProviderIds();
|
||||
if (ids != null) {
|
||||
for (String id : ids) {
|
||||
ILanguageSettingsProvider provider = null;
|
||||
|
|
|
@ -208,7 +208,7 @@ public class TestConfiguration implements IConfiguration {
|
|||
}
|
||||
|
||||
@Override
|
||||
public String[] getDefaultLanguageSettingsProvidersIds() {
|
||||
public String[] getDefaultLanguageSettingsProviderIds() {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
|
|
@ -365,7 +365,7 @@ public class TestToolchain extends HoldsOptions implements IToolChain {
|
|||
}
|
||||
|
||||
@Override
|
||||
public String getDefaultLanguageSettingsProvidersIds() {
|
||||
public String getDefaultLanguageSettingsProviderIds() {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
|
|
@ -274,7 +274,7 @@ PropertyPageDefsTab_7=Show disc. page names if they are unique. Else show profil
|
|||
PropertyPageDefsTab_8=Always show names + profile IDs
|
||||
PropertyPageDefsTab_9=Always show profile IDs only
|
||||
PropertyPageDefsTab_showIncludeFileTab=Display "Include Files" tab
|
||||
PropertyPageDefsTab_showProvidersTab=Display "Preprocessor Include Paths" tabs
|
||||
PropertyPageDefsTab_showProvidersTab=Display "Preprocessor Include Paths" tab and enable language settings providers
|
||||
ProjectConvert_convertersList=Converters List
|
||||
|
||||
AbstractPrefPage_0=\ Preference settings will be applied to new projects \n only when there were no toolchains selected.
|
||||
|
|
|
@ -11,7 +11,6 @@
|
|||
package org.eclipse.cdt.managedbuilder.ui.preferences;
|
||||
|
||||
import org.eclipse.cdt.core.settings.model.ICResourceDescription;
|
||||
import org.eclipse.cdt.internal.ui.language.settings.providers.LanguageSettingsProvidersPage;
|
||||
import org.eclipse.cdt.managedbuilder.internal.ui.Messages;
|
||||
import org.eclipse.cdt.ui.newui.AbstractCPropertyTab;
|
||||
import org.eclipse.cdt.ui.newui.CDTPrefUtil;
|
||||
|
@ -31,7 +30,6 @@ public class WizardDefaultsTab extends AbstractCPropertyTab {
|
|||
|
||||
private Button show_sup;
|
||||
private Button show_oth;
|
||||
private Button checkBoxTryNewSD;
|
||||
|
||||
@Override
|
||||
public void createControls(Composite parent) {
|
||||
|
@ -46,27 +44,20 @@ public class WizardDefaultsTab extends AbstractCPropertyTab {
|
|||
show_oth.setText(Messages.WizardDefaultsTab_1);
|
||||
show_oth.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
|
||||
|
||||
checkBoxTryNewSD = new Button(usercomp, SWT.CHECK);
|
||||
checkBoxTryNewSD.setText(org.eclipse.cdt.internal.ui.newui.Messages.LanguageSettingsProviders_EnableForProject);
|
||||
checkBoxTryNewSD.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
|
||||
|
||||
show_sup.setSelection(!CDTPrefUtil.getBool(CDTPrefUtil.KEY_NOSUPP));
|
||||
show_oth.setSelection(CDTPrefUtil.getBool(CDTPrefUtil.KEY_OTHERS));
|
||||
checkBoxTryNewSD.setSelection(CDTPrefUtil.getBool(LanguageSettingsProvidersPage.KEY_NEWSD));
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void performOK() {
|
||||
CDTPrefUtil.setBool(CDTPrefUtil.KEY_NOSUPP, !show_sup.getSelection());
|
||||
CDTPrefUtil.setBool(CDTPrefUtil.KEY_OTHERS, show_oth.getSelection());
|
||||
CDTPrefUtil.setBool(LanguageSettingsProvidersPage.KEY_NEWSD, checkBoxTryNewSD.getSelection());
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void performDefaults() {
|
||||
show_sup.setSelection(true);
|
||||
show_oth.setSelection(false);
|
||||
checkBoxTryNewSD.setSelection(true);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -32,6 +32,7 @@ import org.eclipse.cdt.core.settings.model.ICProjectDescription;
|
|||
import org.eclipse.cdt.core.settings.model.ICProjectDescriptionManager;
|
||||
import org.eclipse.cdt.core.settings.model.extension.CConfigurationData;
|
||||
import org.eclipse.cdt.core.templateengine.process.ProcessFailureException;
|
||||
import org.eclipse.cdt.internal.ui.language.settings.providers.LanguageSettingsProvidersPage;
|
||||
import org.eclipse.cdt.internal.ui.wizards.ICDTCommonProjectWizard;
|
||||
import org.eclipse.cdt.managedbuilder.buildproperties.IBuildProperty;
|
||||
import org.eclipse.cdt.managedbuilder.buildproperties.IBuildPropertyValue;
|
||||
|
@ -598,21 +599,13 @@ public class MBSWizardHandler extends CWizardHandler {
|
|||
cfgFirst = cfgDes;
|
||||
|
||||
if (cfgDes instanceof ILanguageSettingsProvidersKeeper) {
|
||||
boolean isTryingNewSD = false;
|
||||
IWizardPage page = getStartingPage();
|
||||
if (page instanceof CDTMainWizardPage) {
|
||||
isTryingNewSD = ((CDTMainWizardPage)page).isTryingNewSD();
|
||||
}
|
||||
|
||||
ScannerDiscoveryLegacySupport.setLanguageSettingsProvidersFunctionalityEnabled(project, isTryingNewSD);
|
||||
List<ILanguageSettingsProvider> providers;
|
||||
if (isTryingNewSD) {
|
||||
boolean isEnableProvidersPreference = !CDTPrefUtil.getBool(LanguageSettingsProvidersPage.KEY_NO_SHOW_PROVIDERS);
|
||||
ScannerDiscoveryLegacySupport.setLanguageSettingsProvidersFunctionalityEnabled(project, isEnableProvidersPreference);
|
||||
if (isEnableProvidersPreference) {
|
||||
ConfigurationDataProvider.setDefaultLanguageSettingsProviders(config, cfgDes);
|
||||
} else {
|
||||
if (cfgDes instanceof ILanguageSettingsProvidersKeeper) {
|
||||
((ILanguageSettingsProvidersKeeper) cfgDes).setLanguageSettingProviders(ScannerDiscoveryLegacySupport.getDefaultProvidersLegacy());
|
||||
}
|
||||
}
|
||||
} else {
|
||||
ScannerDiscoveryLegacySupport.setLanguageSettingsProvidersFunctionalityEnabled(project, false);
|
||||
}
|
||||
|
|
|
@ -21,6 +21,7 @@ import org.eclipse.cdt.core.settings.model.ICConfigurationDescription;
|
|||
import org.eclipse.cdt.core.settings.model.ICProjectDescription;
|
||||
import org.eclipse.cdt.core.settings.model.ICProjectDescriptionManager;
|
||||
import org.eclipse.cdt.core.settings.model.extension.CConfigurationData;
|
||||
import org.eclipse.cdt.internal.ui.language.settings.providers.LanguageSettingsProvidersPage;
|
||||
import org.eclipse.cdt.managedbuilder.core.IBuilder;
|
||||
import org.eclipse.cdt.managedbuilder.core.IToolChain;
|
||||
import org.eclipse.cdt.managedbuilder.core.ManagedBuildManager;
|
||||
|
@ -31,6 +32,7 @@ import org.eclipse.cdt.managedbuilder.internal.core.ToolChain;
|
|||
import org.eclipse.cdt.managedbuilder.internal.dataprovider.ConfigurationDataProvider;
|
||||
import org.eclipse.cdt.managedbuilder.internal.ui.Messages;
|
||||
import org.eclipse.cdt.managedbuilder.ui.properties.ManagedBuilderUIPlugin;
|
||||
import org.eclipse.cdt.ui.newui.CDTPrefUtil;
|
||||
import org.eclipse.core.resources.IProject;
|
||||
import org.eclipse.core.resources.IProjectDescription;
|
||||
import org.eclipse.core.resources.IWorkspace;
|
||||
|
@ -73,7 +75,6 @@ public class NewMakeProjFromExisting extends Wizard implements IImportWizard, IN
|
|||
final String locationStr = page.getLocation();
|
||||
final boolean isCPP = page.isCPP();
|
||||
final IToolChain toolChain = page.getToolChain();
|
||||
final boolean isTryingNewSD = page.isTryingNewSD();
|
||||
|
||||
IRunnableWithProgress op = new WorkspaceModifyOperation() {
|
||||
@Override
|
||||
|
@ -118,14 +119,13 @@ public class NewMakeProjFromExisting extends Wizard implements IImportWizard, IN
|
|||
ICConfigurationDescription cfgDes = projDesc.createConfiguration(ManagedBuildManager.CFG_DATA_PROVIDER_ID, data);
|
||||
|
||||
if (cfgDes instanceof ILanguageSettingsProvidersKeeper) {
|
||||
ScannerDiscoveryLegacySupport.setLanguageSettingsProvidersFunctionalityEnabled(project, isTryingNewSD);
|
||||
if (isTryingNewSD) {
|
||||
boolean isEnableProvidersPreference = !CDTPrefUtil.getBool(LanguageSettingsProvidersPage.KEY_NO_SHOW_PROVIDERS);
|
||||
ScannerDiscoveryLegacySupport.setLanguageSettingsProvidersFunctionalityEnabled(project, isEnableProvidersPreference);
|
||||
if (isEnableProvidersPreference) {
|
||||
ConfigurationDataProvider.setDefaultLanguageSettingsProviders(config, cfgDes);
|
||||
} else {
|
||||
if (cfgDes instanceof ILanguageSettingsProvidersKeeper) {
|
||||
((ILanguageSettingsProvidersKeeper) cfgDes).setLanguageSettingProviders(ScannerDiscoveryLegacySupport.getDefaultProvidersLegacy());
|
||||
}
|
||||
}
|
||||
} else {
|
||||
ScannerDiscoveryLegacySupport.setLanguageSettingsProvidersFunctionalityEnabled(project, false);
|
||||
}
|
||||
|
|
|
@ -16,12 +16,9 @@ import java.util.Collections;
|
|||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
import org.eclipse.cdt.internal.ui.language.settings.providers.LanguageSettingsProvidersPage;
|
||||
import org.eclipse.cdt.managedbuilder.core.IToolChain;
|
||||
import org.eclipse.cdt.managedbuilder.core.ManagedBuildManager;
|
||||
import org.eclipse.cdt.managedbuilder.internal.ui.Messages;
|
||||
import org.eclipse.cdt.ui.CUIPlugin;
|
||||
import org.eclipse.cdt.ui.newui.CDTPrefUtil;
|
||||
import org.eclipse.core.resources.IProject;
|
||||
import org.eclipse.core.resources.IResource;
|
||||
import org.eclipse.core.resources.IWorkspaceRoot;
|
||||
|
@ -71,9 +68,6 @@ public class NewMakeProjFromExistingPage extends WizardPage {
|
|||
*/
|
||||
boolean projectNameSetByUser;
|
||||
|
||||
private Button checkBoxTryNewSD;
|
||||
|
||||
|
||||
protected NewMakeProjFromExistingPage() {
|
||||
super(Messages.NewMakeProjFromExistingPage_0);
|
||||
setTitle(Messages.NewMakeProjFromExistingPage_1);
|
||||
|
@ -93,22 +87,6 @@ public class NewMakeProjFromExistingPage extends WizardPage {
|
|||
addSourceSelector(comp);
|
||||
addLanguageSelector(comp);
|
||||
addToolchainSelector(comp);
|
||||
|
||||
checkBoxTryNewSD = new Button(comp, SWT.CHECK);
|
||||
checkBoxTryNewSD.setText(org.eclipse.cdt.internal.ui.newui.Messages.LanguageSettingsProviders_EnableForProject);
|
||||
GridData gd = new GridData(GridData.FILL_HORIZONTAL);
|
||||
gd.horizontalSpan = 2;
|
||||
checkBoxTryNewSD.setLayoutData(gd);
|
||||
|
||||
|
||||
// restore settings from preferences
|
||||
boolean isTryNewSD = true;
|
||||
boolean contains = CUIPlugin.getDefault().getPreferenceStore().contains(LanguageSettingsProvidersPage.KEY_NEWSD);
|
||||
if (contains) {
|
||||
isTryNewSD = CDTPrefUtil.getBool(LanguageSettingsProvidersPage.KEY_NEWSD);
|
||||
}
|
||||
checkBoxTryNewSD.setSelection(isTryNewSD);
|
||||
|
||||
setControl(comp);
|
||||
}
|
||||
|
||||
|
@ -364,11 +342,4 @@ public class NewMakeProjFromExistingPage extends WizardPage {
|
|||
return selection.length != 0 ? tcMap.get(selection[0]) : null;
|
||||
}
|
||||
|
||||
/**
|
||||
* AG FIXME temporary method to be removed before CDT Juno release.
|
||||
* @since 8.1
|
||||
*/
|
||||
public boolean isTryingNewSD() {
|
||||
return checkBoxTryNewSD.getSelection();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -18,6 +18,7 @@ import org.eclipse.cdt.core.settings.model.ICConfigurationDescription;
|
|||
import org.eclipse.cdt.core.settings.model.ICProjectDescription;
|
||||
import org.eclipse.cdt.core.settings.model.ICProjectDescriptionManager;
|
||||
import org.eclipse.cdt.core.settings.model.extension.CConfigurationData;
|
||||
import org.eclipse.cdt.internal.ui.language.settings.providers.LanguageSettingsProvidersPage;
|
||||
import org.eclipse.cdt.managedbuilder.core.IBuilder;
|
||||
import org.eclipse.cdt.managedbuilder.core.IConfiguration;
|
||||
import org.eclipse.cdt.managedbuilder.core.IToolChain;
|
||||
|
@ -28,6 +29,7 @@ import org.eclipse.cdt.managedbuilder.internal.core.ManagedProject;
|
|||
import org.eclipse.cdt.managedbuilder.internal.core.ToolChain;
|
||||
import org.eclipse.cdt.managedbuilder.internal.dataprovider.ConfigurationDataProvider;
|
||||
import org.eclipse.cdt.managedbuilder.internal.ui.Messages;
|
||||
import org.eclipse.cdt.ui.newui.CDTPrefUtil;
|
||||
import org.eclipse.cdt.ui.wizards.CDTMainWizardPage;
|
||||
import org.eclipse.core.resources.IProject;
|
||||
import org.eclipse.core.runtime.CoreException;
|
||||
|
@ -109,20 +111,13 @@ public class STDWizardHandler extends MBSWizardHandler {
|
|||
ICConfigurationDescription cfgDes = des.createConfiguration(ManagedBuildManager.CFG_DATA_PROVIDER_ID, data);
|
||||
|
||||
if (cfgDes instanceof ILanguageSettingsProvidersKeeper) {
|
||||
boolean isTryingNewSD = false;
|
||||
IWizardPage page = getStartingPage();
|
||||
if (page instanceof CDTMainWizardPage) {
|
||||
isTryingNewSD = ((CDTMainWizardPage)page).isTryingNewSD();
|
||||
}
|
||||
|
||||
ScannerDiscoveryLegacySupport.setLanguageSettingsProvidersFunctionalityEnabled(project, isTryingNewSD);
|
||||
if (isTryingNewSD) {
|
||||
boolean isEnableProvidersPreference = !CDTPrefUtil.getBool(LanguageSettingsProvidersPage.KEY_NO_SHOW_PROVIDERS);
|
||||
ScannerDiscoveryLegacySupport.setLanguageSettingsProvidersFunctionalityEnabled(project, isEnableProvidersPreference);
|
||||
if (isEnableProvidersPreference) {
|
||||
ConfigurationDataProvider.setDefaultLanguageSettingsProviders(cfg, cfgDes);
|
||||
} else {
|
||||
if (cfgDes instanceof ILanguageSettingsProvidersKeeper) {
|
||||
((ILanguageSettingsProvidersKeeper) cfgDes).setLanguageSettingProviders(ScannerDiscoveryLegacySupport.getDefaultProvidersLegacy());
|
||||
}
|
||||
}
|
||||
} else {
|
||||
ScannerDiscoveryLegacySupport.setLanguageSettingsProvidersFunctionalityEnabled(project, false);
|
||||
}
|
||||
|
|
|
@ -26,8 +26,6 @@ import org.eclipse.cdt.ui.newui.ICPropertyTab;
|
|||
public class LanguageSettingsProvidersPage extends AbstractPage {
|
||||
/** @since 5.4 */ // temporary key, subject to removal
|
||||
public static final String KEY_NO_SHOW_PROVIDERS = "properties.providers.tab.disable"; //$NON-NLS-1$
|
||||
/** @since 5.4 */ // temporary key, subject to removal
|
||||
public static final String KEY_NEWSD = "wizard.try.new.sd.enable"; //$NON-NLS-1$
|
||||
|
||||
private static boolean isLanguageSettingsProvidersEnabled = false;
|
||||
private static IProject project = null;
|
||||
|
|
|
@ -50,7 +50,6 @@ import org.eclipse.cdt.ui.CUIPlugin;
|
|||
import org.eclipse.cdt.ui.newui.CDTPrefUtil;
|
||||
import org.eclipse.cdt.ui.newui.PageLayout;
|
||||
|
||||
import org.eclipse.cdt.internal.ui.language.settings.providers.LanguageSettingsProvidersPage;
|
||||
import org.eclipse.cdt.internal.ui.newui.Messages;
|
||||
|
||||
public class CDTMainWizardPage extends WizardNewProjectCreationPage implements IWizardItemsListListener {
|
||||
|
@ -68,7 +67,6 @@ import org.eclipse.cdt.internal.ui.newui.Messages;
|
|||
private Tree tree;
|
||||
private Composite right;
|
||||
private Button show_sup;
|
||||
private Button checkBoxTryNewSD;
|
||||
private Label right_label;
|
||||
|
||||
public CWizardHandler h_selected = null;
|
||||
|
@ -156,20 +154,6 @@ import org.eclipse.cdt.internal.ui.newui.Messages;
|
|||
|
||||
// restore settings from preferences
|
||||
show_sup.setSelection(!CDTPrefUtil.getBool(CDTPrefUtil.KEY_NOSUPP));
|
||||
|
||||
checkBoxTryNewSD = new Button(c, SWT.CHECK);
|
||||
checkBoxTryNewSD.setText(Messages.LanguageSettingsProviders_EnableForProject);
|
||||
/* GridData */gd = new GridData(GridData.FILL_HORIZONTAL);
|
||||
gd.horizontalSpan = 2;
|
||||
checkBoxTryNewSD.setLayoutData(gd);
|
||||
|
||||
// restore settings from preferences
|
||||
boolean isTryNewSD = true;
|
||||
boolean contains = CUIPlugin.getDefault().getPreferenceStore().contains(LanguageSettingsProvidersPage.KEY_NEWSD);
|
||||
if (contains) {
|
||||
isTryNewSD = CDTPrefUtil.getBool(LanguageSettingsProvidersPage.KEY_NEWSD);
|
||||
}
|
||||
checkBoxTryNewSD.setSelection(isTryNewSD);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -497,13 +481,5 @@ import org.eclipse.cdt.internal.ui.newui.Messages;
|
|||
public List filterItems(List items) {
|
||||
return items;
|
||||
}
|
||||
|
||||
/**
|
||||
* AG FIXME - remove before CDT Juno release.
|
||||
* @since 5.4
|
||||
*/
|
||||
public boolean isTryingNewSD() {
|
||||
return checkBoxTryNewSD.getSelection();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue