mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-19 06:55:23 +02:00
bug 357442: User-friendlier message about missing toolchain
This commit is contained in:
parent
d643e121a0
commit
b1fc6f69be
3 changed files with 44 additions and 46 deletions
|
@ -13,17 +13,15 @@ package org.eclipse.cdt.managedbuilder.envvar;
|
||||||
import org.eclipse.cdt.managedbuilder.core.IConfiguration;
|
import org.eclipse.cdt.managedbuilder.core.IConfiguration;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
* This interface is to be implemented by the tool-integrator for supplying the configuration-specific
|
||||||
* this interface is to be implemented by the tool-integrator
|
* environment.
|
||||||
* for supplying the configuration-specific environment
|
|
||||||
*
|
*
|
||||||
* @since 3.0
|
* @since 3.0
|
||||||
*/
|
*/
|
||||||
public interface IConfigurationEnvironmentVariableSupplier {
|
public interface IConfigurationEnvironmentVariableSupplier {
|
||||||
/**
|
/**
|
||||||
*
|
* @param variableName - the variable name.
|
||||||
* @param variableName the variable name
|
* @param configuration - configuration.
|
||||||
* @param configuration configuration
|
|
||||||
* @param provider the instance of the environment variable provider to be used for querying the
|
* @param provider the instance of the environment variable provider to be used for querying the
|
||||||
* environment variables from within the supplier. The supplier should use this provider to obtain
|
* environment variables from within the supplier. The supplier should use this provider to obtain
|
||||||
* the already defined environment instead of using the "default" provider returned by the
|
* the already defined environment instead of using the "default" provider returned by the
|
||||||
|
@ -34,16 +32,14 @@ public interface IConfigurationEnvironmentVariableSupplier{
|
||||||
* This is done to avoid infinite loops that could be caused if the supplier calls the provider
|
* This is done to avoid infinite loops that could be caused if the supplier calls the provider
|
||||||
* and the provider in turn calls that supplier again. Also the supplier should not know anything
|
* and the provider in turn calls that supplier again. Also the supplier should not know anything
|
||||||
* about the environment variables defined for the higher levels.
|
* about the environment variables defined for the higher levels.
|
||||||
* @return the reference to the IBuildEnvironmentVariable interface representing
|
* @return The reference to the IBuildEnvironmentVariable interface representing
|
||||||
* the variable of a given name
|
* the variable of a given name or {@code null} if the variable is not defined.
|
||||||
*/
|
*/
|
||||||
IBuildEnvironmentVariable getVariable(String variableName,
|
IBuildEnvironmentVariable getVariable(String variableName, IConfiguration configuration, IEnvironmentVariableProvider provider);
|
||||||
IConfiguration configuration,
|
|
||||||
IEnvironmentVariableProvider provider);
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param configuration configuration
|
* @param configuration - configuration.
|
||||||
* @param provider the instance of the environment variable provider to be used for querying the
|
* @param provider - the instance of the environment variable provider to be used for querying the
|
||||||
* environment variables from within the supplier. The supplier should use this provider to obtain
|
* environment variables from within the supplier. The supplier should use this provider to obtain
|
||||||
* the already defined environment instead of using the "default" provider returned by the
|
* the already defined environment instead of using the "default" provider returned by the
|
||||||
* ManagedBuildManager.getEnvironmentVariableProvider().
|
* ManagedBuildManager.getEnvironmentVariableProvider().
|
||||||
|
@ -53,9 +49,9 @@ public interface IConfigurationEnvironmentVariableSupplier{
|
||||||
* This is done to avoid infinite loops that could be caused if the supplier calls the provider
|
* This is done to avoid infinite loops that could be caused if the supplier calls the provider
|
||||||
* and the provider in turn calls that supplier again. Also the supplier should not know anything
|
* and the provider in turn calls that supplier again. Also the supplier should not know anything
|
||||||
* about the environment variables defined for the higher levels.
|
* about the environment variables defined for the higher levels.
|
||||||
* @return the array of IBuildEnvironmentVariable that represents the environment variables
|
* @return The array of IBuildEnvironmentVariable that represents the environment variables.
|
||||||
|
* If the array contains any {@code null} it will be ignored.
|
||||||
*/
|
*/
|
||||||
IBuildEnvironmentVariable[] getVariables (IConfiguration configuration,
|
IBuildEnvironmentVariable[] getVariables(IConfiguration configuration, IEnvironmentVariableProvider provider);
|
||||||
IEnvironmentVariableProvider provider);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -26,6 +26,7 @@ import org.eclipse.cdt.managedbuilder.core.IFileInfo;
|
||||||
import org.eclipse.cdt.managedbuilder.core.IFolderInfo;
|
import org.eclipse.cdt.managedbuilder.core.IFolderInfo;
|
||||||
import org.eclipse.cdt.managedbuilder.core.IResourceInfo;
|
import org.eclipse.cdt.managedbuilder.core.IResourceInfo;
|
||||||
import org.eclipse.cdt.managedbuilder.core.ITool;
|
import org.eclipse.cdt.managedbuilder.core.ITool;
|
||||||
|
import org.eclipse.cdt.managedbuilder.core.IToolChain;
|
||||||
import org.eclipse.cdt.managedbuilder.core.ManagedBuildManager;
|
import org.eclipse.cdt.managedbuilder.core.ManagedBuildManager;
|
||||||
import org.eclipse.cdt.managedbuilder.core.ManagedBuilderCorePlugin;
|
import org.eclipse.cdt.managedbuilder.core.ManagedBuilderCorePlugin;
|
||||||
import org.eclipse.cdt.managedbuilder.internal.core.Configuration;
|
import org.eclipse.cdt.managedbuilder.internal.core.Configuration;
|
||||||
|
@ -178,8 +179,9 @@ public class BuildConfigurationData extends CConfigurationData {
|
||||||
String msg = null;
|
String msg = null;
|
||||||
if(!fCfg.isSupported()){
|
if(!fCfg.isSupported()){
|
||||||
flags |= CConfigurationStatus.TOOLCHAIN_NOT_SUPPORTED;
|
flags |= CConfigurationStatus.TOOLCHAIN_NOT_SUPPORTED;
|
||||||
msg = DataProviderMessages.getString("BuildConfigurationData.NoConfigurationSupport"); //$NON-NLS-1$
|
IToolChain toolChain = fCfg.getToolChain();
|
||||||
|
String tname = toolChain != null ? toolChain.getName() : ""; //$NON-NLS-1$
|
||||||
|
msg = NLS.bind(DataProviderMessages.getString("BuildConfigurationData.NoToolchainSupport"), tname); //$NON-NLS-1$
|
||||||
} else if (ManagedBuildManager.getExtensionConfiguration(fCfg)==null){
|
} else if (ManagedBuildManager.getExtensionConfiguration(fCfg)==null){
|
||||||
flags |= CConfigurationStatus.SETTINGS_INVALID;
|
flags |= CConfigurationStatus.SETTINGS_INVALID;
|
||||||
msg = NLS.bind(DataProviderMessages.getString("BuildConfigurationData.OrphanedConfiguration"), fCfg.getId()); //$NON-NLS-1$
|
msg = NLS.bind(DataProviderMessages.getString("BuildConfigurationData.OrphanedConfiguration"), fCfg.getId()); //$NON-NLS-1$
|
||||||
|
|
|
@ -21,5 +21,5 @@ ProjectConverter.6=the project conversion failed
|
||||||
ProjectConverter.7=targets conversion
|
ProjectConverter.7=targets conversion
|
||||||
ProjectConverter.8=the project conversion failed due to unknown reason
|
ProjectConverter.8=the project conversion failed due to unknown reason
|
||||||
ProjectConverter.9=the given project is not a valid CDT project
|
ProjectConverter.9=the given project is not a valid CDT project
|
||||||
BuildConfigurationData.NoConfigurationSupport=The configuration support is not installed on the system
|
BuildConfigurationData.NoToolchainSupport=Toolchain "{0}" is not detected. Refer to "C/C++ Development User Guide", "Before you begin" about installing toolchains.
|
||||||
BuildConfigurationData.OrphanedConfiguration=Orphaned configuration. No base extension cfg exists for {0}
|
BuildConfigurationData.OrphanedConfiguration=Orphaned configuration. No base extension cfg exists for {0}
|
||||||
|
|
Loading…
Add table
Reference in a new issue