mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-28 11:25:35 +02:00
Merge remote-tracking branch 'cdt/master' into sd90
This commit is contained in:
commit
e82bdd7f70
404 changed files with 9568 additions and 6100 deletions
|
@ -2,7 +2,7 @@
|
||||||
<feature
|
<feature
|
||||||
id="org.eclipse.cdt.autotools"
|
id="org.eclipse.cdt.autotools"
|
||||||
label="%featureName"
|
label="%featureName"
|
||||||
version="3.0.1.qualifier"
|
version="3.2.0.qualifier"
|
||||||
provider-name="%provider">
|
provider-name="%provider">
|
||||||
|
|
||||||
<description>
|
<description>
|
||||||
|
|
|
@ -7,12 +7,12 @@
|
||||||
<parent>
|
<parent>
|
||||||
<groupId>org.eclipse.cdt</groupId>
|
<groupId>org.eclipse.cdt</groupId>
|
||||||
<artifactId>cdt-parent</artifactId>
|
<artifactId>cdt-parent</artifactId>
|
||||||
<version>8.1.0-SNAPSHOT</version>
|
<version>8.2.0-SNAPSHOT</version>
|
||||||
<relativePath>../../pom.xml</relativePath>
|
<relativePath>../../pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<groupId>org.eclipse.cdt.features</groupId>
|
<groupId>org.eclipse.cdt.features</groupId>
|
||||||
<version>3.0.1-SNAPSHOT</version>
|
<version>3.2.0-SNAPSHOT</version>
|
||||||
<artifactId>org.eclipse.cdt.autotools</artifactId>
|
<artifactId>org.eclipse.cdt.autotools</artifactId>
|
||||||
<packaging>eclipse-feature</packaging>
|
<packaging>eclipse-feature</packaging>
|
||||||
</project>
|
</project>
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
<parent>
|
<parent>
|
||||||
<groupId>org.eclipse.cdt</groupId>
|
<groupId>org.eclipse.cdt</groupId>
|
||||||
<artifactId>cdt-parent</artifactId>
|
<artifactId>cdt-parent</artifactId>
|
||||||
<version>8.1.0-SNAPSHOT</version>
|
<version>8.2.0-SNAPSHOT</version>
|
||||||
<relativePath>../../pom.xml</relativePath>
|
<relativePath>../../pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
<parent>
|
<parent>
|
||||||
<groupId>org.eclipse.cdt</groupId>
|
<groupId>org.eclipse.cdt</groupId>
|
||||||
<artifactId>cdt-parent</artifactId>
|
<artifactId>cdt-parent</artifactId>
|
||||||
<version>8.1.0-SNAPSHOT</version>
|
<version>8.2.0-SNAPSHOT</version>
|
||||||
<relativePath>../../pom.xml</relativePath>
|
<relativePath>../../pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
<feature
|
<feature
|
||||||
id="org.eclipse.cdt.autotools.source"
|
id="org.eclipse.cdt.autotools.source"
|
||||||
label="%featureName"
|
label="%featureName"
|
||||||
version="3.0.1.qualifier"
|
version="3.2.0.qualifier"
|
||||||
provider-name="%provider">
|
provider-name="%provider">
|
||||||
|
|
||||||
<description>
|
<description>
|
||||||
|
|
|
@ -7,12 +7,12 @@
|
||||||
<parent>
|
<parent>
|
||||||
<groupId>org.eclipse.cdt</groupId>
|
<groupId>org.eclipse.cdt</groupId>
|
||||||
<artifactId>cdt-parent</artifactId>
|
<artifactId>cdt-parent</artifactId>
|
||||||
<version>8.1.0-SNAPSHOT</version>
|
<version>8.2.0-SNAPSHOT</version>
|
||||||
<relativePath>../../pom.xml</relativePath>
|
<relativePath>../../pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<groupId>org.eclipse.cdt.features</groupId>
|
<groupId>org.eclipse.cdt.features</groupId>
|
||||||
<version>3.0.1-SNAPSHOT</version>
|
<version>3.2.0-SNAPSHOT</version>
|
||||||
<artifactId>org.eclipse.cdt.autotools.source</artifactId>
|
<artifactId>org.eclipse.cdt.autotools.source</artifactId>
|
||||||
<packaging>eclipse-feature</packaging>
|
<packaging>eclipse-feature</packaging>
|
||||||
</project>
|
</project>
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
<parent>
|
<parent>
|
||||||
<groupId>org.eclipse.cdt</groupId>
|
<groupId>org.eclipse.cdt</groupId>
|
||||||
<artifactId>cdt-parent</artifactId>
|
<artifactId>cdt-parent</artifactId>
|
||||||
<version>8.1.0-SNAPSHOT</version>
|
<version>8.2.0-SNAPSHOT</version>
|
||||||
<relativePath>../../pom.xml</relativePath>
|
<relativePath>../../pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
<parent>
|
<parent>
|
||||||
<groupId>org.eclipse.cdt</groupId>
|
<groupId>org.eclipse.cdt</groupId>
|
||||||
<artifactId>cdt-parent</artifactId>
|
<artifactId>cdt-parent</artifactId>
|
||||||
<version>8.1.0-SNAPSHOT</version>
|
<version>8.2.0-SNAPSHOT</version>
|
||||||
<relativePath>../../pom.xml</relativePath>
|
<relativePath>../../pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
<feature
|
<feature
|
||||||
id="org.eclipse.cdt.gnu.build"
|
id="org.eclipse.cdt.gnu.build"
|
||||||
label="%featureName"
|
label="%featureName"
|
||||||
version="8.1.0.qualifier"
|
version="8.2.0.qualifier"
|
||||||
provider-name="%providerName">
|
provider-name="%providerName">
|
||||||
|
|
||||||
<description>
|
<description>
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
<parent>
|
<parent>
|
||||||
<groupId>org.eclipse.cdt</groupId>
|
<groupId>org.eclipse.cdt</groupId>
|
||||||
<artifactId>cdt-parent</artifactId>
|
<artifactId>cdt-parent</artifactId>
|
||||||
<version>8.1.0-SNAPSHOT</version>
|
<version>8.2.0-SNAPSHOT</version>
|
||||||
<relativePath>../../pom.xml</relativePath>
|
<relativePath>../../pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
<feature
|
<feature
|
||||||
id="org.eclipse.cdt.gnu.build.source"
|
id="org.eclipse.cdt.gnu.build.source"
|
||||||
label="%featureName"
|
label="%featureName"
|
||||||
version="8.1.0.qualifier"
|
version="8.2.0.qualifier"
|
||||||
provider-name="%providerName">
|
provider-name="%providerName">
|
||||||
|
|
||||||
<description>
|
<description>
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
<parent>
|
<parent>
|
||||||
<groupId>org.eclipse.cdt</groupId>
|
<groupId>org.eclipse.cdt</groupId>
|
||||||
<artifactId>cdt-parent</artifactId>
|
<artifactId>cdt-parent</artifactId>
|
||||||
<version>8.1.0-SNAPSHOT</version>
|
<version>8.2.0-SNAPSHOT</version>
|
||||||
<relativePath>../../pom.xml</relativePath>
|
<relativePath>../../pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
<parent>
|
<parent>
|
||||||
<groupId>org.eclipse.cdt</groupId>
|
<groupId>org.eclipse.cdt</groupId>
|
||||||
<artifactId>cdt-parent</artifactId>
|
<artifactId>cdt-parent</artifactId>
|
||||||
<version>8.1.0-SNAPSHOT</version>
|
<version>8.2.0-SNAPSHOT</version>
|
||||||
<relativePath>../../pom.xml</relativePath>
|
<relativePath>../../pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
<parent>
|
<parent>
|
||||||
<groupId>org.eclipse.cdt</groupId>
|
<groupId>org.eclipse.cdt</groupId>
|
||||||
<artifactId>cdt-parent</artifactId>
|
<artifactId>cdt-parent</artifactId>
|
||||||
<version>8.1.0-SNAPSHOT</version>
|
<version>8.2.0-SNAPSHOT</version>
|
||||||
<relativePath>../../pom.xml</relativePath>
|
<relativePath>../../pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
|
|
|
@ -2,7 +2,7 @@ Manifest-Version: 1.0
|
||||||
Bundle-ManifestVersion: 2
|
Bundle-ManifestVersion: 2
|
||||||
Bundle-Name: Tests
|
Bundle-Name: Tests
|
||||||
Bundle-SymbolicName: org.eclipse.cdt.managedbuilder.core.tests; singleton:=true
|
Bundle-SymbolicName: org.eclipse.cdt.managedbuilder.core.tests; singleton:=true
|
||||||
Bundle-Version: 8.1.0.qualifier
|
Bundle-Version: 8.2.0.qualifier
|
||||||
Bundle-Activator: org.eclipse.cdt.managedbuilder.testplugin.CTestPlugin
|
Bundle-Activator: org.eclipse.cdt.managedbuilder.testplugin.CTestPlugin
|
||||||
Bundle-Vendor: Eclipse CDT
|
Bundle-Vendor: Eclipse CDT
|
||||||
Bundle-Localization: plugin
|
Bundle-Localization: plugin
|
||||||
|
|
|
@ -7,11 +7,11 @@
|
||||||
<parent>
|
<parent>
|
||||||
<groupId>org.eclipse.cdt</groupId>
|
<groupId>org.eclipse.cdt</groupId>
|
||||||
<artifactId>cdt-parent</artifactId>
|
<artifactId>cdt-parent</artifactId>
|
||||||
<version>8.1.0-SNAPSHOT</version>
|
<version>8.2.0-SNAPSHOT</version>
|
||||||
<relativePath>../../pom.xml</relativePath>
|
<relativePath>../../pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<version>8.1.0-SNAPSHOT</version>
|
<version>8.2.0-SNAPSHOT</version>
|
||||||
<artifactId>org.eclipse.cdt.managedbuilder.core.tests</artifactId>
|
<artifactId>org.eclipse.cdt.managedbuilder.core.tests</artifactId>
|
||||||
<packaging>eclipse-test-plugin</packaging>
|
<packaging>eclipse-test-plugin</packaging>
|
||||||
|
|
||||||
|
@ -46,7 +46,7 @@
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<artifactId>org.eclipse.cdt.feature.group</artifactId>
|
<artifactId>org.eclipse.cdt.feature.group</artifactId>
|
||||||
<version>8.1.0.${buildQualifier}</version>
|
<version>8.2.0.${buildQualifier}</version>
|
||||||
<type>p2-installable-unit</type>
|
<type>p2-installable-unit</type>
|
||||||
</dependency>
|
</dependency>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
|
|
@ -2,7 +2,7 @@ Manifest-Version: 1.0
|
||||||
Bundle-ManifestVersion: 2
|
Bundle-ManifestVersion: 2
|
||||||
Bundle-Name: %pluginName
|
Bundle-Name: %pluginName
|
||||||
Bundle-SymbolicName: org.eclipse.cdt.managedbuilder.core; singleton:=true
|
Bundle-SymbolicName: org.eclipse.cdt.managedbuilder.core; singleton:=true
|
||||||
Bundle-Version: 8.1.0.qualifier
|
Bundle-Version: 8.2.0.qualifier
|
||||||
Bundle-Activator: org.eclipse.cdt.managedbuilder.core.ManagedBuilderCorePlugin
|
Bundle-Activator: org.eclipse.cdt.managedbuilder.core.ManagedBuilderCorePlugin
|
||||||
Bundle-Vendor: %providerName
|
Bundle-Vendor: %providerName
|
||||||
Bundle-Localization: plugin
|
Bundle-Localization: plugin
|
||||||
|
|
|
@ -7,11 +7,11 @@
|
||||||
<parent>
|
<parent>
|
||||||
<groupId>org.eclipse.cdt</groupId>
|
<groupId>org.eclipse.cdt</groupId>
|
||||||
<artifactId>cdt-parent</artifactId>
|
<artifactId>cdt-parent</artifactId>
|
||||||
<version>8.1.0-SNAPSHOT</version>
|
<version>8.2.0-SNAPSHOT</version>
|
||||||
<relativePath>../../pom.xml</relativePath>
|
<relativePath>../../pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<version>8.1.0-SNAPSHOT</version>
|
<version>8.2.0-SNAPSHOT</version>
|
||||||
<artifactId>org.eclipse.cdt.managedbuilder.core</artifactId>
|
<artifactId>org.eclipse.cdt.managedbuilder.core</artifactId>
|
||||||
<packaging>eclipse-plugin</packaging>
|
<packaging>eclipse-plugin</packaging>
|
||||||
</project>
|
</project>
|
||||||
|
|
|
@ -14,7 +14,6 @@ import org.eclipse.cdt.core.envvar.IEnvironmentVariable;
|
||||||
import org.eclipse.cdt.managedbuilder.core.IConfiguration;
|
import org.eclipse.cdt.managedbuilder.core.IConfiguration;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
|
||||||
* this interface represent the environment variable provider - the main entry-point
|
* this interface represent the environment variable provider - the main entry-point
|
||||||
* to be used for querying the build environment
|
* to be used for querying the build environment
|
||||||
*
|
*
|
||||||
|
@ -23,12 +22,10 @@ import org.eclipse.cdt.managedbuilder.core.IConfiguration;
|
||||||
* @noimplement This interface is not intended to be implemented by clients.
|
* @noimplement This interface is not intended to be implemented by clients.
|
||||||
*/
|
*/
|
||||||
public interface IEnvironmentVariableProvider {
|
public interface IEnvironmentVariableProvider {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
|
||||||
*
|
|
||||||
* @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
|
||||||
|
*
|
||||||
* @param variableName environment variable name
|
* @param variableName environment variable name
|
||||||
* if environment variable names are case insensitive in the current OS,
|
* if environment variable names are case insensitive in the current OS,
|
||||||
* the environment variable provider will query the getVariable method of suppliers always
|
* the environment variable provider will query the getVariable method of suppliers always
|
||||||
|
@ -48,17 +45,27 @@ public interface IEnvironmentVariableProvider{
|
||||||
* 2. IManagedProject to represent the managed project
|
* 2. IManagedProject to represent the managed project
|
||||||
* 3. IWorkspace to represent the workspace
|
* 3. IWorkspace to represent the workspace
|
||||||
* 4. null to represent the system environment passed to eclipse
|
* 4. null to represent the system environment passed to eclipse
|
||||||
|
*
|
||||||
* @deprecated use {@link IEnvironmentVariableProvider#getVariable(String, IConfiguration, boolean)} instead
|
* @deprecated use {@link IEnvironmentVariableProvider#getVariable(String, IConfiguration, boolean)} instead
|
||||||
*/
|
*/
|
||||||
@Deprecated
|
@Deprecated
|
||||||
public IBuildEnvironmentVariable getVariable(
|
public IBuildEnvironmentVariable getVariable(String variableName, Object level, boolean includeParentLevels, boolean resolveMacros);
|
||||||
String variableName, Object level, boolean includeParentLevels, boolean resolveMacros);
|
|
||||||
|
|
||||||
public IEnvironmentVariable getVariable(String variableName,
|
|
||||||
IConfiguration cfg, boolean resolveMacros);
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* Get variable for the given configuration, normally including those defined in project properties
|
||||||
|
* and workspace preferences.
|
||||||
*
|
*
|
||||||
|
* See also {@code CCorePlugin.getDefault().getBuildEnvironmentManager().getVariable(String name, ICConfigurationDescription cfg, boolean resolveMacros)}
|
||||||
|
*
|
||||||
|
* @param variableName - name of the variable (not including $ sign).
|
||||||
|
* @param cfg - configuration or {@code null} for workspace preferences only.
|
||||||
|
* @param resolveMacros - if {@code true} expand macros, {@code false} otherwise.
|
||||||
|
* @return variable defined for the configuration or the workspace.
|
||||||
|
* Returns {@code null} if variable is not defined.
|
||||||
|
*/
|
||||||
|
public IEnvironmentVariable getVariable(String variableName, IConfiguration cfg, boolean resolveMacros);
|
||||||
|
|
||||||
|
/**
|
||||||
* if environment variable names are case insensitive in the current OS,
|
* if environment variable names are case insensitive in the current OS,
|
||||||
* the environment variable provider will remove the duplicates of the variables if their names
|
* the environment variable provider will remove the duplicates of the variables if their names
|
||||||
* differ only by case
|
* differ only by case
|
||||||
|
@ -67,14 +74,22 @@ public interface IEnvironmentVariableProvider{
|
||||||
* @return the array of IBuildEnvironmentVariable that represents the environment variables
|
* @return the array of IBuildEnvironmentVariable that represents the environment variables
|
||||||
*/
|
*/
|
||||||
@Deprecated
|
@Deprecated
|
||||||
public IBuildEnvironmentVariable[] getVariables(
|
public IBuildEnvironmentVariable[] getVariables(Object level, boolean includeParentLevels, boolean resolveMacros);
|
||||||
Object level, boolean includeParentLevels, boolean resolveMacros);
|
|
||||||
|
|
||||||
public IEnvironmentVariable[] getVariables(
|
|
||||||
IConfiguration cfg, boolean resolveMacros);
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* Get variables for the given configuration, normally including those defined in project properties
|
||||||
|
* and workspace preferences.
|
||||||
*
|
*
|
||||||
|
* See also {@code CCorePlugin.getDefault().getBuildEnvironmentManager().getVariables(ICConfigurationDescription cfg, boolean resolveMacros)}
|
||||||
|
*
|
||||||
|
* @param cfg - configuration or {@code null} for workspace preferences only.
|
||||||
|
* @param resolveMacros - if {@code true} expand macros, {@code false} otherwise.
|
||||||
|
* @return array of variables defined for the configuration or the workspace.
|
||||||
|
* Returns an empty array if no variables are defined.
|
||||||
|
*/
|
||||||
|
public IEnvironmentVariable[] getVariables(IConfiguration cfg, boolean resolveMacros);
|
||||||
|
|
||||||
|
/**
|
||||||
* @return the String representing default system delimiter. That is the ":" for Unix-like
|
* @return the String representing default system delimiter. That is the ":" for Unix-like
|
||||||
* systems and the ";" for Win32 systems. This method will be used by the
|
* systems and the ";" for Win32 systems. This method will be used by the
|
||||||
* tool-integrator provided variable supplier e.g. in order to concatenate the list of paths into the
|
* tool-integrator provided variable supplier e.g. in order to concatenate the list of paths into the
|
||||||
|
@ -97,7 +112,8 @@ public interface IEnvironmentVariableProvider{
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* returns the array of String that holds the build paths of the specified type
|
* @return the array of String that holds the build paths of the specified type
|
||||||
|
*
|
||||||
* @param configuration represent the configuration for which the paths were changed
|
* @param configuration represent the configuration for which the paths were changed
|
||||||
* @param buildPathType can be set to one of the IEnvVarBuildPath.BUILDPATH _xxx
|
* @param buildPathType can be set to one of the IEnvVarBuildPath.BUILDPATH _xxx
|
||||||
* (the IEnvVarBuildPath will represent the build environment variables, see also
|
* (the IEnvVarBuildPath will represent the build environment variables, see also
|
||||||
|
@ -107,19 +123,15 @@ public interface IEnvironmentVariableProvider{
|
||||||
String[] getBuildPaths(IConfiguration configuration, int buildPathType);
|
String[] getBuildPaths(IConfiguration configuration, int buildPathType);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
|
||||||
* adds the listener that will return notifications about the include and library paths changes.
|
* adds the listener that will return notifications about the include and library paths changes.
|
||||||
* The ManagedBuildManager will register the change listener and will notify all registered
|
* The ManagedBuildManager will register the change listener and will notify all registered
|
||||||
* Scanned Info Change Listeners about the include paths change.
|
* Scanned Info Change Listeners about the include paths change.
|
||||||
*/
|
*/
|
||||||
void subscribe(
|
void subscribe(IEnvironmentBuildPathsChangeListener listener);
|
||||||
IEnvironmentBuildPathsChangeListener listener);
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
|
||||||
* removes the include and library paths change listener
|
* removes the include and library paths change listener
|
||||||
*/
|
*/
|
||||||
void unsubscribe(
|
void unsubscribe(IEnvironmentBuildPathsChangeListener listener);
|
||||||
IEnvironmentBuildPathsChangeListener listener);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -35,10 +35,8 @@ import org.eclipse.cdt.utils.envvar.EnvVarOperationProcessor;
|
||||||
* build environment functionality to the MBS
|
* build environment functionality to the MBS
|
||||||
*
|
*
|
||||||
* @since 3.0
|
* @since 3.0
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
public class EnvironmentVariableProvider implements
|
public class EnvironmentVariableProvider implements IEnvironmentVariableProvider {
|
||||||
IEnvironmentVariableProvider {
|
|
||||||
// private static final QualifiedName fBuildPathVarProperty = new QualifiedName(ManagedBuilderCorePlugin.getUniqueIdentifier(), "buildPathVar"); //$NON-NLS-1$
|
// private static final QualifiedName fBuildPathVarProperty = new QualifiedName(ManagedBuilderCorePlugin.getUniqueIdentifier(), "buildPathVar"); //$NON-NLS-1$
|
||||||
|
|
||||||
// private static final String DELIMITER_WIN32 = ";"; //$NON-NLS-1$
|
// private static final String DELIMITER_WIN32 = ";"; //$NON-NLS-1$
|
||||||
|
@ -58,7 +56,6 @@ public class EnvironmentVariableProvider implements
|
||||||
* paths from environment variable values
|
* paths from environment variable values
|
||||||
*
|
*
|
||||||
* @since 3.0
|
* @since 3.0
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
static public class DefaultBuildPathResolver implements IBuildPathResolver {
|
static public class DefaultBuildPathResolver implements IBuildPathResolver {
|
||||||
private String fDelimiter;
|
private String fDelimiter;
|
||||||
|
@ -68,9 +65,7 @@ public class EnvironmentVariableProvider implements
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String[] resolveBuildPaths(int pathType, String variableName,
|
public String[] resolveBuildPaths(int pathType, String variableName, String variableValue, IConfiguration configuration) {
|
||||||
String variableValue, IConfiguration configuration) {
|
|
||||||
|
|
||||||
if (fDelimiter == null || "".equals(fDelimiter)) //$NON-NLS-1$
|
if (fDelimiter == null || "".equals(fDelimiter)) //$NON-NLS-1$
|
||||||
return new String[]{variableValue};
|
return new String[]{variableValue};
|
||||||
|
|
||||||
|
@ -92,13 +87,8 @@ public class EnvironmentVariableProvider implements
|
||||||
return fInstance;
|
return fInstance;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* (non-Javadoc)
|
|
||||||
* @see org.eclipse.cdt.managedbuilder.envvar.IEnvironmentVariableProvider#getVariable()
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public IBuildEnvironmentVariable getVariable(String variableName,
|
public IBuildEnvironmentVariable getVariable(String variableName, Object level, boolean includeParentLevels, boolean resolveMacros) {
|
||||||
Object level, boolean includeParentLevels, boolean resolveMacros) {
|
|
||||||
|
|
||||||
if (variableName == null || "".equals(variableName)) //$NON-NLS-1$
|
if (variableName == null || "".equals(variableName)) //$NON-NLS-1$
|
||||||
return null;
|
return null;
|
||||||
|
|
||||||
|
@ -109,13 +99,11 @@ public class EnvironmentVariableProvider implements
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public IEnvironmentVariable getVariable(String variableName,
|
public IEnvironmentVariable getVariable(String variableName, IConfiguration cfg, boolean resolveMacros) {
|
||||||
IConfiguration cfg, boolean resolveMacros){
|
|
||||||
return getVariable(variableName, cfg, resolveMacros, true);
|
return getVariable(variableName, cfg, resolveMacros, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
public IEnvironmentVariable getVariable(String variableName,
|
public IEnvironmentVariable getVariable(String variableName, IConfiguration cfg, boolean resolveMacros, boolean checkBuildPaths) {
|
||||||
IConfiguration cfg, boolean resolveMacros, boolean checkBuildPaths){
|
|
||||||
ICConfigurationDescription des = ManagedBuildManager.getDescriptionForConfiguration(cfg);
|
ICConfigurationDescription des = ManagedBuildManager.getDescriptionForConfiguration(cfg);
|
||||||
if (des != null) {
|
if (des != null) {
|
||||||
IEnvironmentVariable variable = fMngr.getVariable(variableName, des, resolveMacros);
|
IEnvironmentVariable variable = fMngr.getVariable(variableName, des, resolveMacros);
|
||||||
|
@ -171,61 +159,42 @@ public class EnvironmentVariableProvider implements
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
*/
|
|
||||||
/* (non-Javadoc)
|
|
||||||
* @see org.eclipse.cdt.managedbuilder.envvar.IEnvironmentVariableProvider#getVariables()
|
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public IBuildEnvironmentVariable[] getVariables(Object level,
|
public IBuildEnvironmentVariable[] getVariables(Object level, boolean includeParentLevels, boolean resolveMacros) {
|
||||||
boolean includeParentLevels, boolean resolveMacros) {
|
|
||||||
|
|
||||||
if (level instanceof IConfiguration) {
|
if (level instanceof IConfiguration) {
|
||||||
return wrap(getVariables((IConfiguration)level, resolveMacros));
|
return wrap(getVariables((IConfiguration)level, resolveMacros));
|
||||||
}
|
}
|
||||||
return new IBuildEnvironmentVariable[0];
|
return new IBuildEnvironmentVariable[0];
|
||||||
}
|
}
|
||||||
|
|
||||||
/* (non-Javadoc)
|
|
||||||
* @see org.eclipse.cdt.managedbuilder.envvar.IEnvironmentVariableProvider#getDefaultDelimiter()
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public String getDefaultDelimiter() {
|
public String getDefaultDelimiter() {
|
||||||
return fMngr.getDefaultDelimiter();
|
return fMngr.getDefaultDelimiter();
|
||||||
}
|
}
|
||||||
|
|
||||||
/* (non-Javadoc)
|
|
||||||
* @see org.eclipse.cdt.managedbuilder.envvar.IEnvironmentVariableProvider#isVariableCaseSensitive()
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public boolean isVariableCaseSensitive() {
|
public boolean isVariableCaseSensitive() {
|
||||||
return fMngr.isVariableCaseSensitive();
|
return fMngr.isVariableCaseSensitive();
|
||||||
}
|
}
|
||||||
|
|
||||||
/* (non-Javadoc)
|
|
||||||
* @see org.eclipse.cdt.managedbuilder.envvar.IEnvironmentVariableProvider#getSuppliers()
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public IEnvironmentVariableSupplier[] getSuppliers(Object level) {
|
public IEnvironmentVariableSupplier[] getSuppliers(Object level) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* (non-Javadoc)
|
|
||||||
* @see org.eclipse.cdt.managedbuilder.envvar.IEnvironmentVariableProvider#getBuildPaths()
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public String[] getBuildPaths(IConfiguration configuration,
|
public String[] getBuildPaths(IConfiguration configuration, int buildPathType) {
|
||||||
int buildPathType) {
|
|
||||||
ITool tools[] = configuration.getFilteredTools();
|
ITool tools[] = configuration.getFilteredTools();
|
||||||
List<String> list = new ArrayList<String>();
|
List<String> list = new ArrayList<String>();
|
||||||
|
|
||||||
for(int i = 0; i < tools.length; i++){
|
for (ITool tool : tools) {
|
||||||
IEnvVarBuildPath pathDescriptors[] = tools[i].getEnvVarBuildPaths();
|
IEnvVarBuildPath pathDescriptors[] = tool.getEnvVarBuildPaths();
|
||||||
|
|
||||||
if (pathDescriptors == null || pathDescriptors.length == 0)
|
if (pathDescriptors == null || pathDescriptors.length == 0)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
for(int j = 0; j < pathDescriptors.length; j++){
|
for (IEnvVarBuildPath curPathDes : pathDescriptors) {
|
||||||
IEnvVarBuildPath curPathDes = pathDescriptors[j];
|
|
||||||
if (curPathDes.getType() != buildPathType)
|
if (curPathDes.getType() != buildPathType)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
@ -241,9 +210,7 @@ public class EnvironmentVariableProvider implements
|
||||||
pathResolver = new DefaultBuildPathResolver(delimiter);
|
pathResolver = new DefaultBuildPathResolver(delimiter);
|
||||||
}
|
}
|
||||||
|
|
||||||
for(int k = 0; k < vars.length; k++){
|
for (String varName : vars) {
|
||||||
String varName = vars[k];
|
|
||||||
|
|
||||||
IEnvironmentVariable var = getVariable(varName,configuration,true, false);
|
IEnvironmentVariable var = getVariable(varName,configuration,true, false);
|
||||||
if (var == null)
|
if (var == null)
|
||||||
continue;
|
continue;
|
||||||
|
@ -259,8 +226,8 @@ public class EnvironmentVariableProvider implements
|
||||||
return list.toArray(new String[list.size()]);
|
return list.toArray(new String[list.size()]);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/**
|
||||||
* returns a list of registered listeners
|
* @return a list of registered listeners
|
||||||
*/
|
*/
|
||||||
private List<IEnvironmentBuildPathsChangeListener> getListeners() {
|
private List<IEnvironmentBuildPathsChangeListener> getListeners() {
|
||||||
if (fListeners == null)
|
if (fListeners == null)
|
||||||
|
@ -268,7 +235,7 @@ public class EnvironmentVariableProvider implements
|
||||||
return fListeners;
|
return fListeners;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/**
|
||||||
* notifies registered listeners
|
* notifies registered listeners
|
||||||
*/
|
*/
|
||||||
private void notifyListeners(IConfiguration configuration, int buildPathType) {
|
private void notifyListeners(IConfiguration configuration, int buildPathType) {
|
||||||
|
@ -278,9 +245,6 @@ public class EnvironmentVariableProvider implements
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* (non-Javadoc)
|
|
||||||
* @see org.eclipse.cdt.managedbuilder.envvar.IEnvironmentVariableProvider#subscribe()
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public synchronized void subscribe(IEnvironmentBuildPathsChangeListener listener) {
|
public synchronized void subscribe(IEnvironmentBuildPathsChangeListener listener) {
|
||||||
if (listener == null)
|
if (listener == null)
|
||||||
|
@ -292,9 +256,6 @@ public class EnvironmentVariableProvider implements
|
||||||
listeners.add(listener);
|
listeners.add(listener);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* (non-Javadoc)
|
|
||||||
* @see org.eclipse.cdt.managedbuilder.envvar.IEnvironmentVariableProvider#unsubscribe()
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public synchronized void unsubscribe(IEnvironmentBuildPathsChangeListener listener) {
|
public synchronized void unsubscribe(IEnvironmentBuildPathsChangeListener listener) {
|
||||||
if (listener == null)
|
if (listener == null)
|
||||||
|
@ -305,7 +266,7 @@ public class EnvironmentVariableProvider implements
|
||||||
listeners.remove(listener);
|
listeners.remove(listener);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/**
|
||||||
* performs a check of the build path variables for the given configuration
|
* performs a check of the build path variables for the given configuration
|
||||||
* If the build variables are changed, the notification is sent
|
* If the build variables are changed, the notification is sent
|
||||||
*/
|
*/
|
||||||
|
@ -313,7 +274,7 @@ public class EnvironmentVariableProvider implements
|
||||||
checkBuildPathVariables(configuration, getVariables(configuration ,true, false));
|
checkBuildPathVariables(configuration, getVariables(configuration ,true, false));
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/**
|
||||||
* performs a check of the build path variables of the specified type
|
* performs a check of the build path variables of the specified type
|
||||||
* for the given configuration
|
* for the given configuration
|
||||||
* If the build variables are changed, the notification is sent
|
* If the build variables are changed, the notification is sent
|
||||||
|
@ -324,7 +285,7 @@ public class EnvironmentVariableProvider implements
|
||||||
checkBuildPathVariables(configuration,buildPathType,cr);
|
checkBuildPathVariables(configuration,buildPathType,cr);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/**
|
||||||
* performs a check of the build path variables
|
* performs a check of the build path variables
|
||||||
* for the given configuration given the set of the variables
|
* for the given configuration given the set of the variables
|
||||||
* defined for this configuration
|
* defined for this configuration
|
||||||
|
@ -337,7 +298,7 @@ public class EnvironmentVariableProvider implements
|
||||||
checkBuildPathVariables(configuration,IEnvVarBuildPath.BUILDPATH_LIBRARY,cr);
|
checkBuildPathVariables(configuration,IEnvVarBuildPath.BUILDPATH_LIBRARY,cr);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/**
|
||||||
* performs a check of whether the given variable is the build path variable
|
* performs a check of whether the given variable is the build path variable
|
||||||
* and if true checks whether it is changed.
|
* and if true checks whether it is changed.
|
||||||
* In the case of it is changed all other build path variables are checked
|
* In the case of it is changed all other build path variables are checked
|
||||||
|
@ -350,7 +311,7 @@ public class EnvironmentVariableProvider implements
|
||||||
checkBuildPathVariable(configuration, IEnvVarBuildPath.BUILDPATH_LIBRARY, varName, var);
|
checkBuildPathVariable(configuration, IEnvVarBuildPath.BUILDPATH_LIBRARY, varName, var);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/**
|
||||||
* performs a check of whether the given variable is the build path variable
|
* performs a check of whether the given variable is the build path variable
|
||||||
* of the specified type and if true checks whether it is changed.
|
* of the specified type and if true checks whether it is changed.
|
||||||
* In the case of it is changed all other build path variables of that type are checked
|
* In the case of it is changed all other build path variables of that type are checked
|
||||||
|
@ -370,7 +331,7 @@ public class EnvironmentVariableProvider implements
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/**
|
||||||
* performs a check of the build path variables of the specified type
|
* performs a check of the build path variables of the specified type
|
||||||
* for the given configuration given the set of the variables
|
* for the given configuration given the set of the variables
|
||||||
* defined for this configuration.
|
* defined for this configuration.
|
||||||
|
@ -385,7 +346,7 @@ public class EnvironmentVariableProvider implements
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/**
|
||||||
* returns the container of the build variables of the specified type
|
* returns the container of the build variables of the specified type
|
||||||
*/
|
*/
|
||||||
protected StoredBuildPathEnvironmentContainer getStoredBuildPathVariables(int buildPathType) {
|
protected StoredBuildPathEnvironmentContainer getStoredBuildPathVariables(int buildPathType) {
|
||||||
|
@ -394,7 +355,7 @@ public class EnvironmentVariableProvider implements
|
||||||
getStoredIncludeBuildPathVariables();
|
getStoredIncludeBuildPathVariables();
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/**
|
||||||
* returns the container of the Include path variables
|
* returns the container of the Include path variables
|
||||||
*/
|
*/
|
||||||
protected StoredBuildPathEnvironmentContainer getStoredIncludeBuildPathVariables() {
|
protected StoredBuildPathEnvironmentContainer getStoredIncludeBuildPathVariables() {
|
||||||
|
@ -403,7 +364,7 @@ public class EnvironmentVariableProvider implements
|
||||||
return fIncludeStoredBuildPathVariables;
|
return fIncludeStoredBuildPathVariables;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/**
|
||||||
* returns the container of the Library path variables
|
* returns the container of the Library path variables
|
||||||
*/
|
*/
|
||||||
protected StoredBuildPathEnvironmentContainer getStoredLibraryBuildPathVariables() {
|
protected StoredBuildPathEnvironmentContainer getStoredLibraryBuildPathVariables() {
|
||||||
|
|
|
@ -605,6 +605,7 @@ public abstract class AbstractBuiltinSpecsDetector extends AbstractLanguageSetti
|
||||||
* Implementers are expected to add their variables to the end of the list.
|
* Implementers are expected to add their variables to the end of the list.
|
||||||
*
|
*
|
||||||
* @return list of environment variables.
|
* @return list of environment variables.
|
||||||
|
* @since 8.2
|
||||||
*/
|
*/
|
||||||
protected List<IEnvironmentVariable> getEnvironmentVariables() {
|
protected List<IEnvironmentVariable> getEnvironmentVariables() {
|
||||||
IEnvironmentVariableManager mngr = CCorePlugin.getDefault().getBuildEnvironmentManager();
|
IEnvironmentVariableManager mngr = CCorePlugin.getDefault().getBuildEnvironmentManager();
|
||||||
|
|
|
@ -48,6 +48,9 @@ public class GCCBuiltinSpecsDetector extends ToolchainBuiltinSpecsDetector imple
|
||||||
new MacroOptionParser("#define\\s+(\\S*)\\s*(\\S*)", "$1", "$2", ICSettingEntry.BUILTIN | ICSettingEntry.READONLY),
|
new MacroOptionParser("#define\\s+(\\S*)\\s*(\\S*)", "$1", "$2", ICSettingEntry.BUILTIN | ICSettingEntry.READONLY),
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @since 8.2
|
||||||
|
*/
|
||||||
@Override
|
@Override
|
||||||
public String getToolchainId() {
|
public String getToolchainId() {
|
||||||
return GCC_TOOLCHAIN_ID;
|
return GCC_TOOLCHAIN_ID;
|
||||||
|
|
|
@ -50,6 +50,7 @@ public abstract class ToolchainBuiltinSpecsDetector extends AbstractBuiltinSpecs
|
||||||
*
|
*
|
||||||
* Tool-chain id must be supplied for global providers where we don't
|
* Tool-chain id must be supplied for global providers where we don't
|
||||||
* have configuration description to figure that out programmatically.
|
* have configuration description to figure that out programmatically.
|
||||||
|
* @since 8.2
|
||||||
*/
|
*/
|
||||||
public abstract String getToolchainId();
|
public abstract String getToolchainId();
|
||||||
|
|
||||||
|
|
|
@ -2,7 +2,7 @@ Manifest-Version: 1.0
|
||||||
Bundle-ManifestVersion: 2
|
Bundle-ManifestVersion: 2
|
||||||
Bundle-Name: %pluginName
|
Bundle-Name: %pluginName
|
||||||
Bundle-SymbolicName: org.eclipse.cdt.managedbuilder.gnu.ui; singleton:=true
|
Bundle-SymbolicName: org.eclipse.cdt.managedbuilder.gnu.ui; singleton:=true
|
||||||
Bundle-Version: 8.1.0.qualifier
|
Bundle-Version: 8.2.0.qualifier
|
||||||
Bundle-Activator: org.eclipse.cdt.managedbuilder.gnu.ui.GnuUIPlugin
|
Bundle-Activator: org.eclipse.cdt.managedbuilder.gnu.ui.GnuUIPlugin
|
||||||
Bundle-Vendor: %providerName
|
Bundle-Vendor: %providerName
|
||||||
Bundle-Localization: plugin
|
Bundle-Localization: plugin
|
||||||
|
|
|
@ -7,11 +7,11 @@
|
||||||
<parent>
|
<parent>
|
||||||
<groupId>org.eclipse.cdt</groupId>
|
<groupId>org.eclipse.cdt</groupId>
|
||||||
<artifactId>cdt-parent</artifactId>
|
<artifactId>cdt-parent</artifactId>
|
||||||
<version>8.1.0-SNAPSHOT</version>
|
<version>8.2.0-SNAPSHOT</version>
|
||||||
<relativePath>../../pom.xml</relativePath>
|
<relativePath>../../pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<version>8.1.0-SNAPSHOT</version>
|
<version>8.2.0-SNAPSHOT</version>
|
||||||
<artifactId>org.eclipse.cdt.managedbuilder.gnu.ui</artifactId>
|
<artifactId>org.eclipse.cdt.managedbuilder.gnu.ui</artifactId>
|
||||||
<packaging>eclipse-plugin</packaging>
|
<packaging>eclipse-plugin</packaging>
|
||||||
</project>
|
</project>
|
||||||
|
|
|
@ -19,7 +19,9 @@ import java.io.InputStream;
|
||||||
import java.io.InputStreamReader;
|
import java.io.InputStreamReader;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
|
||||||
|
import org.eclipse.cdt.core.CCorePlugin;
|
||||||
import org.eclipse.cdt.core.envvar.IEnvironmentVariable;
|
import org.eclipse.cdt.core.envvar.IEnvironmentVariable;
|
||||||
|
import org.eclipse.cdt.core.settings.model.util.CDataUtil;
|
||||||
import org.eclipse.cdt.managedbuilder.core.IBuildPathResolver;
|
import org.eclipse.cdt.managedbuilder.core.IBuildPathResolver;
|
||||||
import org.eclipse.cdt.managedbuilder.core.IConfiguration;
|
import org.eclipse.cdt.managedbuilder.core.IConfiguration;
|
||||||
import org.eclipse.cdt.managedbuilder.core.ManagedBuildManager;
|
import org.eclipse.cdt.managedbuilder.core.ManagedBuildManager;
|
||||||
|
@ -29,7 +31,6 @@ import org.eclipse.cdt.utils.WindowsRegistry;
|
||||||
import org.eclipse.cdt.utils.spawner.ProcessFactory;
|
import org.eclipse.cdt.utils.spawner.ProcessFactory;
|
||||||
import org.eclipse.core.runtime.IPath;
|
import org.eclipse.core.runtime.IPath;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @noextend This class is not intended to be subclassed by clients.
|
* @noextend This class is not intended to be subclassed by clients.
|
||||||
*/
|
*/
|
||||||
|
@ -58,18 +59,13 @@ public class CygwinPathResolver implements IBuildPathResolver {
|
||||||
private static final String MINGW_SPECIAL = "mingw "; //$NON-NLS-1$
|
private static final String MINGW_SPECIAL = "mingw "; //$NON-NLS-1$
|
||||||
private static final String CYGWIN_SPECIAL = "cygwin "; //$NON-NLS-1$
|
private static final String CYGWIN_SPECIAL = "cygwin "; //$NON-NLS-1$
|
||||||
|
|
||||||
private static boolean checked = false;
|
private static String envPathValueCached = null;
|
||||||
private static String binCygwin = null;
|
private static String binCygwin = null;
|
||||||
private static String rootCygwin = null;
|
private static String rootCygwin = null;
|
||||||
private static String etcCygwin = null;
|
private static String etcCygwin = null;
|
||||||
|
|
||||||
/* (non-Javadoc)
|
|
||||||
* @see org.eclipse.cdt.managedbuilder.core.IBuildPathResolver#resolveBuildPaths(int, java.lang.String, java.lang.String, org.eclipse.cdt.managedbuilder.core.IConfiguration)
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public String[] resolveBuildPaths(int pathType, String variableName,
|
public String[] resolveBuildPaths(int pathType, String variableName, String variableValue, IConfiguration configuration) {
|
||||||
String variableValue, IConfiguration configuration) {
|
|
||||||
|
|
||||||
if(!isWindows()) {
|
if(!isWindows()) {
|
||||||
return variableValue.split(DELIMITER_UNIX);
|
return variableValue.split(DELIMITER_UNIX);
|
||||||
} else if(isMinGW(configuration)) {
|
} else if(isMinGW(configuration)) {
|
||||||
|
@ -92,27 +88,37 @@ public class CygwinPathResolver implements IBuildPathResolver {
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
/*
|
|
||||||
|
/**
|
||||||
* returns "/etc" path in Windows format
|
* returns "/etc" path in Windows format
|
||||||
|
*
|
||||||
|
* If you use this do not cache results to ensure user preferences are accounted for.
|
||||||
|
* Please rely on internal caching.
|
||||||
*/
|
*/
|
||||||
public static String getEtcPath() {
|
public static String getEtcPath() {
|
||||||
if (!checked) findPaths();
|
findPaths();
|
||||||
return etcCygwin;
|
return etcCygwin;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/**
|
||||||
* returns "/usr/bin" path in Windows format
|
* returns "/usr/bin" path in Windows format
|
||||||
|
*
|
||||||
|
* If you use this do not cache results to ensure user preferences are accounted for.
|
||||||
|
* Please rely on internal caching.
|
||||||
*/
|
*/
|
||||||
public static String getBinPath() {
|
public static String getBinPath() {
|
||||||
if (!checked) findPaths();
|
findPaths();
|
||||||
return binCygwin;
|
return binCygwin;
|
||||||
}
|
}
|
||||||
/*
|
|
||||||
* returns Cygwin root ("/") path in Windows format
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* returns Cygwin root ("/") path in Windows format
|
||||||
|
*
|
||||||
|
* If you use this do not cache results to ensure user preferences are accounted for.
|
||||||
|
* Please rely on internal caching.
|
||||||
|
*/
|
||||||
public static String getRootPath() {
|
public static String getRootPath() {
|
||||||
if (!checked) findPaths();
|
findPaths();
|
||||||
return rootCygwin;
|
return rootCygwin;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -140,6 +146,7 @@ public class CygwinPathResolver implements IBuildPathResolver {
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the absolute path of the pattern by
|
* Returns the absolute path of the pattern by
|
||||||
* simply appending the pattern to the root
|
* simply appending the pattern to the root
|
||||||
|
@ -165,11 +172,11 @@ public class CygwinPathResolver implements IBuildPathResolver {
|
||||||
*
|
*
|
||||||
* @return The absolute path to cygwin's root or null if not found
|
* @return The absolute path to cygwin's root or null if not found
|
||||||
*/
|
*/
|
||||||
private static String findRoot() {
|
private static String findRoot(String paths) {
|
||||||
String rootValue = null;
|
String rootValue = null;
|
||||||
|
|
||||||
// 1. Look in PATH values. Look for bin\cygwin1.dll
|
// 1. Look in PATH values. Look for bin\cygwin1.dll
|
||||||
IPath location = PathUtil.findProgramLocation("cygwin1.dll"); //$NON-NLS-1$
|
IPath location = PathUtil.findProgramLocation("cygwin1.dll", paths); //$NON-NLS-1$
|
||||||
if (location!=null) {
|
if (location!=null) {
|
||||||
rootValue = location.removeLastSegments(2).toOSString();
|
rootValue = location.removeLastSegments(2).toOSString();
|
||||||
}
|
}
|
||||||
|
@ -203,16 +210,25 @@ public class CygwinPathResolver implements IBuildPathResolver {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Finds Cygwin's paths and sets corresponding properties
|
* Finds Cygwin's paths and sets corresponding properties.
|
||||||
*/
|
*/
|
||||||
private static synchronized void findPaths() {
|
private static synchronized void findPaths() {
|
||||||
if (checked) return;
|
if (!isWindows()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
IEnvironmentVariable varPath = CCorePlugin.getDefault().getBuildEnvironmentManager().getVariable("PATH", null, true); //$NON-NLS-1$
|
||||||
|
String envPathValue = varPath != null ? varPath.getValue() : null;
|
||||||
|
|
||||||
|
if (CDataUtil.objectsEqual(envPathValue, envPathValueCached)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
etcCygwin = null;
|
etcCygwin = null;
|
||||||
binCygwin = null;
|
binCygwin = null;
|
||||||
rootCygwin = null;
|
rootCygwin = null;
|
||||||
if (!isWindows()) return;
|
|
||||||
|
|
||||||
rootCygwin = findRoot();
|
rootCygwin = findRoot(envPathValue);
|
||||||
|
|
||||||
// 1. Try to find the paths by appending the patterns to the root dir
|
// 1. Try to find the paths by appending the patterns to the root dir
|
||||||
etcCygwin = getValueFromRoot(ETCPATTERN);
|
etcCygwin = getValueFromRoot(ETCPATTERN);
|
||||||
|
@ -226,7 +242,7 @@ public class CygwinPathResolver implements IBuildPathResolver {
|
||||||
if(binCygwin == null)
|
if(binCygwin == null)
|
||||||
binCygwin = readValueFromRegistry(REGISTRY_KEY_MOUNTS + BINPATTERN, PATH_NAME);
|
binCygwin = readValueFromRegistry(REGISTRY_KEY_MOUNTS + BINPATTERN, PATH_NAME);
|
||||||
|
|
||||||
checked = true;
|
envPathValueCached = envPathValue;
|
||||||
}
|
}
|
||||||
|
|
||||||
private static String[] exec(String cmd, IConfiguration cfg) {
|
private static String[] exec(String cmd, IConfiguration cfg) {
|
||||||
|
|
|
@ -16,13 +16,10 @@ import org.eclipse.cdt.managedbuilder.envvar.IConfigurationEnvironmentVariableSu
|
||||||
import org.eclipse.cdt.managedbuilder.envvar.IEnvironmentVariableProvider;
|
import org.eclipse.cdt.managedbuilder.envvar.IEnvironmentVariableProvider;
|
||||||
import org.eclipse.cdt.managedbuilder.internal.envvar.BuildEnvVar;
|
import org.eclipse.cdt.managedbuilder.internal.envvar.BuildEnvVar;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @noextend This class is not intended to be subclassed by clients.
|
* @noextend This class is not intended to be subclassed by clients.
|
||||||
*/
|
*/
|
||||||
public class GnuCygwinConfigurationEnvironmentSupplier implements
|
public class GnuCygwinConfigurationEnvironmentSupplier implements IConfigurationEnvironmentVariableSupplier {
|
||||||
IConfigurationEnvironmentVariableSupplier {
|
|
||||||
|
|
||||||
private static final String PATH = "PATH"; //$NON-NLS-1$
|
private static final String PATH = "PATH"; //$NON-NLS-1$
|
||||||
private static final String DELIMITER_UNIX = ":"; //$NON-NLS-1$
|
private static final String DELIMITER_UNIX = ":"; //$NON-NLS-1$
|
||||||
private static final String PROPERTY_DELIMITER = "path.separator"; //$NON-NLS-1$
|
private static final String PROPERTY_DELIMITER = "path.separator"; //$NON-NLS-1$
|
||||||
|
@ -32,50 +29,46 @@ public class GnuCygwinConfigurationEnvironmentSupplier implements
|
||||||
private static final String LC_ALL = "LC_ALL"; //$NON-NLS-1$
|
private static final String LC_ALL = "LC_ALL"; //$NON-NLS-1$
|
||||||
private static final String LC_MESSAGES = "LC_MESSAGES"; //$NON-NLS-1$
|
private static final String LC_MESSAGES = "LC_MESSAGES"; //$NON-NLS-1$
|
||||||
|
|
||||||
/* (non-Javadoc)
|
|
||||||
* @see org.eclipse.cdt.managedbuilder.envvar.IConfigurationEnvironmentVariableSupplier#getVariable(java.lang.String, org.eclipse.cdt.managedbuilder.core.IConfiguration, org.eclipse.cdt.managedbuilder.envvar.IEnvironmentVariableProvider)
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public IBuildEnvironmentVariable getVariable(String variableName,
|
public IBuildEnvironmentVariable getVariable(String variableName, IConfiguration configuration, IEnvironmentVariableProvider provider) {
|
||||||
IConfiguration configuration, IEnvironmentVariableProvider provider) {
|
if (variableName == null) {
|
||||||
|
|
||||||
if (variableName == null)
|
|
||||||
return null;
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
if (!System.getProperty(PROPERTY_OSNAME).toLowerCase().startsWith("windows ")) //$NON-NLS-1$
|
if (!System.getProperty(PROPERTY_OSNAME).toLowerCase().startsWith("windows ")) { //$NON-NLS-1$
|
||||||
return null;
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
if (variableName.equalsIgnoreCase(PATH)) {
|
if (variableName.equalsIgnoreCase(PATH)) {
|
||||||
String p = CygwinPathResolver.getBinPath();
|
String p = CygwinPathResolver.getBinPath();
|
||||||
if (p != null)
|
if (p != null) {
|
||||||
return new BuildEnvVar(PATH, p.replace('/','\\'), IBuildEnvironmentVariable.ENVVAR_PREPEND, System.getProperty(PROPERTY_DELIMITER, DELIMITER_UNIX));
|
return new BuildEnvVar(PATH, p.replace('/','\\'), IBuildEnvironmentVariable.ENVVAR_PREPEND, System.getProperty(PROPERTY_DELIMITER, DELIMITER_UNIX));
|
||||||
|
}
|
||||||
} else if (variableName.equalsIgnoreCase(LANG)) {
|
} else if (variableName.equalsIgnoreCase(LANG)) {
|
||||||
// Workaround for not being able to select encoding for CDT console -> change codeset to Latin1
|
// Workaround for not being able to select encoding for CDT console -> change codeset to Latin1
|
||||||
String langValue = System.getenv(LANG);
|
String langValue = System.getenv(LANG);
|
||||||
if (langValue == null || langValue.length() == 0)
|
if (langValue == null || langValue.length() == 0) {
|
||||||
langValue = System.getenv(LC_ALL);
|
langValue = System.getenv(LC_ALL);
|
||||||
if (langValue == null || langValue.length() == 0)
|
}
|
||||||
|
if (langValue == null || langValue.length() == 0) {
|
||||||
langValue = System.getenv(LC_MESSAGES);
|
langValue = System.getenv(LC_MESSAGES);
|
||||||
if (langValue != null && langValue.length() > 0)
|
}
|
||||||
|
if (langValue != null && langValue.length() > 0) {
|
||||||
// langValue is [language[_territory][.codeset][@modifier]], i.e. "en_US.UTF-8@dict"
|
// langValue is [language[_territory][.codeset][@modifier]], i.e. "en_US.UTF-8@dict"
|
||||||
// we replace codeset with Latin1 as CDT console garbles UTF
|
// we replace codeset with Latin1 as CDT console garbles UTF
|
||||||
// and ignore modifier which is not used by LANG
|
// and ignore modifier which is not used by LANG
|
||||||
langValue = langValue.replaceFirst("([^.@]*)(\\..*)?(@.*)?", "$1.ISO-8859-1"); //$NON-NLS-1$ //$NON-NLS-2$
|
langValue = langValue.replaceFirst("([^.@]*)(\\..*)?(@.*)?", "$1.ISO-8859-1"); //$NON-NLS-1$ //$NON-NLS-2$
|
||||||
else
|
} else {
|
||||||
langValue = "C.ISO-8859-1"; //$NON-NLS-1$
|
langValue = "C.ISO-8859-1"; //$NON-NLS-1$
|
||||||
|
}
|
||||||
|
|
||||||
return new BuildEnvVar(LANG, langValue);
|
return new BuildEnvVar(LANG, langValue);
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* (non-Javadoc)
|
|
||||||
* @see org.eclipse.cdt.managedbuilder.envvar.IConfigurationEnvironmentVariableSupplier#getVariables(org.eclipse.cdt.managedbuilder.core.IConfiguration, org.eclipse.cdt.managedbuilder.envvar.IEnvironmentVariableProvider)
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public IBuildEnvironmentVariable[] getVariables(
|
public IBuildEnvironmentVariable[] getVariables(IConfiguration configuration, IEnvironmentVariableProvider provider) {
|
||||||
IConfiguration configuration, IEnvironmentVariableProvider provider) {
|
|
||||||
|
|
||||||
IBuildEnvironmentVariable varLang = getVariable(LANG, configuration, provider);
|
IBuildEnvironmentVariable varLang = getVariable(LANG, configuration, provider);
|
||||||
IBuildEnvironmentVariable varPath = getVariable(PATH, configuration, provider);
|
IBuildEnvironmentVariable varPath = getVariable(PATH, configuration, provider);
|
||||||
|
|
||||||
|
|
|
@ -16,6 +16,7 @@ import java.io.FileNotFoundException;
|
||||||
import java.io.FileReader;
|
import java.io.FileReader;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
|
|
||||||
|
import org.eclipse.cdt.core.settings.model.util.CDataUtil;
|
||||||
import org.eclipse.cdt.managedbuilder.core.IManagedIsToolChainSupported;
|
import org.eclipse.cdt.managedbuilder.core.IManagedIsToolChainSupported;
|
||||||
import org.eclipse.cdt.managedbuilder.core.IToolChain;
|
import org.eclipse.cdt.managedbuilder.core.IToolChain;
|
||||||
import org.osgi.framework.Version;
|
import org.osgi.framework.Version;
|
||||||
|
@ -32,32 +33,24 @@ import org.osgi.framework.Version;
|
||||||
*
|
*
|
||||||
* @noextend This class is not intended to be subclassed by clients.
|
* @noextend This class is not intended to be subclassed by clients.
|
||||||
*/
|
*/
|
||||||
public class IsGnuCygwinToolChainSupported implements
|
public class IsGnuCygwinToolChainSupported implements IManagedIsToolChainSupported {
|
||||||
IManagedIsToolChainSupported {
|
private static final String[] CHECKED_NAMES = {"gcc", "binutils", "make"}; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
|
||||||
|
|
||||||
static final String[] CHECKED_NAMES = {"gcc", "binutils", "make"}; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
|
private static String etcCygwinCached = null;
|
||||||
|
private static boolean toolchainIsSupported = false;
|
||||||
|
|
||||||
static boolean suppChecked = false;
|
|
||||||
static boolean toolchainIsSupported = false;
|
|
||||||
|
|
||||||
|
|
||||||
/* (non-Javadoc)
|
|
||||||
* @see org.eclipse.cdt.managedbuilder.core.IManagedIsToolChainSupported#isSupported(org.eclipse.cdt.managedbuilder.core.IToolChain, org.eclipse.core.runtime.PluginVersionIdentifier, java.lang.String)
|
|
||||||
*/
|
|
||||||
/**
|
/**
|
||||||
* @since 8.0
|
* @since 8.0
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public boolean isSupported(IToolChain toolChain, Version version, String instance) {
|
public boolean isSupported(IToolChain toolChain, Version version, String instance) {
|
||||||
|
|
||||||
if (suppChecked) return toolchainIsSupported;
|
|
||||||
|
|
||||||
String etcCygwin = CygwinPathResolver.getEtcPath();
|
String etcCygwin = CygwinPathResolver.getEtcPath();
|
||||||
if (etcCygwin != null) {
|
if (CDataUtil.objectsEqual(etcCygwin, etcCygwinCached)) {
|
||||||
toolchainIsSupported = arePackagesInstalled(etcCygwin);
|
return toolchainIsSupported;
|
||||||
}
|
}
|
||||||
|
|
||||||
suppChecked = true;
|
toolchainIsSupported = etcCygwin != null && arePackagesInstalled(etcCygwin);
|
||||||
|
etcCygwinCached = etcCygwin;
|
||||||
|
|
||||||
return toolchainIsSupported;
|
return toolchainIsSupported;
|
||||||
}
|
}
|
||||||
|
@ -80,7 +73,9 @@ public class IsGnuCygwinToolChainSupported implements
|
||||||
String s;
|
String s;
|
||||||
while ((s = data.readLine()) != null ) {
|
while ((s = data.readLine()) != null ) {
|
||||||
for (int j = 0; j < CHECKED_NAMES.length; j++) {
|
for (int j = 0; j < CHECKED_NAMES.length; j++) {
|
||||||
if (s.startsWith(CHECKED_NAMES[j])) {found[j] = true;}
|
if (s.startsWith(CHECKED_NAMES[j])) {
|
||||||
|
found[j] = true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
arePackagesInstalled = true;
|
arePackagesInstalled = true;
|
||||||
|
|
|
@ -11,6 +11,9 @@
|
||||||
|
|
||||||
package org.eclipse.cdt.managedbuilder.gnu.mingw;
|
package org.eclipse.cdt.managedbuilder.gnu.mingw;
|
||||||
|
|
||||||
|
import org.eclipse.cdt.core.CCorePlugin;
|
||||||
|
import org.eclipse.cdt.core.envvar.IEnvironmentVariable;
|
||||||
|
import org.eclipse.cdt.core.settings.model.util.CDataUtil;
|
||||||
import org.eclipse.cdt.managedbuilder.core.IConfiguration;
|
import org.eclipse.cdt.managedbuilder.core.IConfiguration;
|
||||||
import org.eclipse.cdt.managedbuilder.envvar.IBuildEnvironmentVariable;
|
import org.eclipse.cdt.managedbuilder.envvar.IBuildEnvironmentVariable;
|
||||||
import org.eclipse.cdt.managedbuilder.envvar.IConfigurationEnvironmentVariableSupplier;
|
import org.eclipse.cdt.managedbuilder.envvar.IConfigurationEnvironmentVariableSupplier;
|
||||||
|
@ -25,13 +28,16 @@ import org.eclipse.core.runtime.Platform;
|
||||||
*
|
*
|
||||||
* @noextend This class is not intended to be subclassed by clients.
|
* @noextend This class is not intended to be subclassed by clients.
|
||||||
*/
|
*/
|
||||||
public class MingwEnvironmentVariableSupplier implements
|
public class MingwEnvironmentVariableSupplier implements IConfigurationEnvironmentVariableSupplier {
|
||||||
IConfigurationEnvironmentVariableSupplier {
|
private static final String ENV_PATH = "PATH"; //$NON-NLS-1$
|
||||||
|
|
||||||
private static boolean checked = false;
|
private static String envPathValueCached = null;
|
||||||
|
private static String envMingwHomeValueCached = null;
|
||||||
private static IPath binDir = null;
|
private static IPath binDir = null;
|
||||||
|
private static IPath msysBinDir = null;
|
||||||
|
|
||||||
private static class MingwBuildEnvironmentVariable implements IBuildEnvironmentVariable {
|
private static class MingwBuildEnvironmentVariable implements IBuildEnvironmentVariable {
|
||||||
|
private static final String PATH_SEPARATOR = ";"; //$NON-NLS-1$
|
||||||
private final String name;
|
private final String name;
|
||||||
private final String value;
|
private final String value;
|
||||||
private final int operation;
|
private final int operation;
|
||||||
|
@ -59,94 +65,131 @@ public class MingwEnvironmentVariableSupplier implements
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getDelimiter() {
|
public String getDelimiter() {
|
||||||
return ";"; //$NON-NLS-1$
|
return PATH_SEPARATOR;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private IBuildEnvironmentVariable path;
|
/**
|
||||||
|
* @return location of $MINGW_HOME/bin folder on the file-system.
|
||||||
|
*
|
||||||
|
* If you use this do not cache results to ensure user preferences are accounted for.
|
||||||
|
* Please rely on internal caching.
|
||||||
|
*/
|
||||||
public static IPath getBinDir() {
|
public static IPath getBinDir() {
|
||||||
if (!checked) {
|
locateMingw();
|
||||||
binDir = findBinDir();
|
|
||||||
checked = true;
|
|
||||||
}
|
|
||||||
return binDir;
|
return binDir;
|
||||||
}
|
}
|
||||||
|
|
||||||
private static IPath findBinDir() {
|
/**
|
||||||
// Try in MinGW home
|
* @return location of $MINGW_HOME/msys/bin folder on the file-system.
|
||||||
String mingwHome = System.getenv("MINGW_HOME"); //$NON-NLS-1$
|
*
|
||||||
IPath mingwBinDir = new Path(mingwHome + "\\bin"); //$NON-NLS-1$
|
* If you use this do not cache results to ensure user preferences are accounted for.
|
||||||
if (mingwBinDir.toFile().isDirectory())
|
* Please rely on internal caching.
|
||||||
|
*/
|
||||||
|
public static IPath getMsysBinDir() {
|
||||||
|
locateMingw();
|
||||||
|
return msysBinDir;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Locate MinGW directories. The results are judicially cached so it is reasonably cheap to call.
|
||||||
|
* The reason to call it each time is to check if user changed environment in preferences.
|
||||||
|
*/
|
||||||
|
private static void locateMingw() {
|
||||||
|
IEnvironmentVariable varPath = CCorePlugin.getDefault().getBuildEnvironmentManager().getVariable(ENV_PATH, null, true);
|
||||||
|
String envPathValue = varPath != null ? varPath.getValue() : null;
|
||||||
|
IEnvironmentVariable varMingwHome = CCorePlugin.getDefault().getBuildEnvironmentManager().getVariable("MINGW_HOME", null, true); //$NON-NLS-1$
|
||||||
|
String envMingwHomeValue = varMingwHome != null ? varMingwHome.getValue() : null;
|
||||||
|
|
||||||
|
if (CDataUtil.objectsEqual(envPathValue, envPathValueCached) && CDataUtil.objectsEqual(envMingwHomeValue, envMingwHomeValueCached)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
envPathValueCached = envPathValue;
|
||||||
|
envMingwHomeValueCached = envMingwHomeValue;
|
||||||
|
|
||||||
|
binDir = locateBinDir();
|
||||||
|
msysBinDir = locateMsysBinDir(binDir);
|
||||||
|
}
|
||||||
|
|
||||||
|
private static IPath locateBinDir() {
|
||||||
|
// Check $MINGW_HOME
|
||||||
|
IPath mingwBinDir = new Path(envMingwHomeValueCached + "\\bin"); //$NON-NLS-1$
|
||||||
|
if (mingwBinDir.toFile().isDirectory()) {
|
||||||
return mingwBinDir;
|
return mingwBinDir;
|
||||||
|
}
|
||||||
|
|
||||||
// Try the mingw directory in the platform install directory
|
// Try the mingw directory in the platform install directory
|
||||||
// CDT distributions like Wascana may distribute MinGW like that
|
// CDT distributions like Wascana may distribute MinGW like that
|
||||||
IPath installPath = new Path(Platform.getInstallLocation().getURL().getFile());
|
IPath installPath = new Path(Platform.getInstallLocation().getURL().getFile());
|
||||||
mingwBinDir = installPath.append("mingw\\bin"); //$NON-NLS-1$
|
mingwBinDir = installPath.append("mingw\\bin"); //$NON-NLS-1$
|
||||||
if (mingwBinDir.toFile().isDirectory())
|
if (mingwBinDir.toFile().isDirectory()) {
|
||||||
return mingwBinDir;
|
return mingwBinDir;
|
||||||
|
}
|
||||||
|
|
||||||
// Look in PATH values. Look for mingw32-gcc.exe
|
// Look in PATH values. Look for mingw32-gcc.exe
|
||||||
// TODO: Since this dir is already in the PATH, why are we adding it here?
|
// TODO: Since this dir is already in the PATH, why are we adding it here?
|
||||||
// This is really only to support isToolchainAvail. Must be a better way.
|
// This is really only to support isToolchainAvail. Must be a better way.
|
||||||
IPath gccLoc = PathUtil.findProgramLocation("mingw32-gcc.exe"); //$NON-NLS-1$
|
// AG: Because otherwise the toolchain won't be shown in the list of "supported" toolchains in UI
|
||||||
if (gccLoc != null)
|
// when MinGW installed in custom location even if it is in the PATH
|
||||||
|
IPath gccLoc = PathUtil.findProgramLocation("mingw32-gcc.exe", envPathValueCached); //$NON-NLS-1$
|
||||||
|
if (gccLoc != null) {
|
||||||
return gccLoc.removeLastSegments(1);
|
return gccLoc.removeLastSegments(1);
|
||||||
|
}
|
||||||
|
|
||||||
// Try the default MinGW install dir
|
// Try the default MinGW install dir
|
||||||
mingwBinDir = new Path("C:\\MinGW\\bin"); //$NON-NLS-1$
|
mingwBinDir = new Path("C:\\MinGW\\bin"); //$NON-NLS-1$
|
||||||
if (mingwBinDir.toFile().isDirectory())
|
if (mingwBinDir.toFile().isDirectory()) {
|
||||||
return mingwBinDir;
|
return mingwBinDir;
|
||||||
|
}
|
||||||
|
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static IPath getMsysBinDir() {
|
private static IPath locateMsysBinDir(IPath binPath) {
|
||||||
|
if (binPath != null) {
|
||||||
// Just look in the install location parent dir
|
// Just look in the install location parent dir
|
||||||
IPath installPath = new Path(Platform.getInstallLocation().getURL().getFile());
|
IPath installPath = new Path(Platform.getInstallLocation().getURL().getFile());
|
||||||
IPath msysBinPath = installPath.append("msys\\bin"); //$NON-NLS-1$
|
IPath msysBinPath = installPath.append("msys\\bin"); //$NON-NLS-1$
|
||||||
if (msysBinPath.toFile().isDirectory())
|
if (msysBinPath.toFile().isDirectory()) {
|
||||||
return msysBinPath;
|
return msysBinPath;
|
||||||
|
}
|
||||||
|
|
||||||
String mingwHome = System.getenv("MINGW_HOME"); //$NON-NLS-1$
|
if (envMingwHomeValueCached != null) {
|
||||||
if (mingwHome != null) {
|
msysBinPath = new Path(envMingwHomeValueCached + "\\msys\\1.0\\bin"); //$NON-NLS-1$
|
||||||
msysBinPath = new Path(mingwHome + "\\msys\\1.0\\bin"); //$NON-NLS-1$
|
if (msysBinPath.toFile().isDirectory()) {
|
||||||
if (msysBinPath.toFile().isDirectory())
|
|
||||||
return msysBinPath;
|
return msysBinPath;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Try the new MinGW msys bin dir
|
// Try the new MinGW msys bin dir
|
||||||
msysBinPath = new Path("C:\\MinGW\\msys\\1.0\\bin"); //$NON-NLS-1$
|
msysBinPath = new Path("C:\\MinGW\\msys\\1.0\\bin"); //$NON-NLS-1$
|
||||||
if (msysBinPath.toFile().isDirectory())
|
if (msysBinPath.toFile().isDirectory()) {
|
||||||
return msysBinPath;
|
return msysBinPath;
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
public MingwEnvironmentVariableSupplier() {
|
|
||||||
IPath binPath = getBinDir();
|
|
||||||
if (binPath != null) {
|
|
||||||
String pathStr = binPath.toOSString();
|
|
||||||
IPath msysBinPath = getMsysBinDir();
|
|
||||||
if (msysBinPath != null)
|
|
||||||
pathStr += ';' + msysBinPath.toOSString();
|
|
||||||
|
|
||||||
path = new MingwBuildEnvironmentVariable("PATH", pathStr, IBuildEnvironmentVariable.ENVVAR_PREPEND); //$NON-NLS-1$
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public IBuildEnvironmentVariable getVariable(String variableName,
|
|
||||||
IConfiguration configuration, IEnvironmentVariableProvider provider) {
|
|
||||||
if (path != null && variableName.equals(path.getName()))
|
|
||||||
return path;
|
|
||||||
else
|
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public IBuildEnvironmentVariable[] getVariables(
|
public IBuildEnvironmentVariable getVariable(String variableName, IConfiguration configuration, IEnvironmentVariableProvider provider) {
|
||||||
IConfiguration configuration, IEnvironmentVariableProvider provider) {
|
if (variableName.equals(ENV_PATH)) {
|
||||||
|
locateMingw();
|
||||||
|
if (binDir != null) {
|
||||||
|
String pathStr = binDir.toOSString();
|
||||||
|
if (msysBinDir != null) {
|
||||||
|
pathStr += MingwBuildEnvironmentVariable.PATH_SEPARATOR + msysBinDir.toOSString();
|
||||||
|
}
|
||||||
|
return new MingwBuildEnvironmentVariable(ENV_PATH, pathStr, IBuildEnvironmentVariable.ENVVAR_PREPEND);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public IBuildEnvironmentVariable[] getVariables(IConfiguration configuration, IEnvironmentVariableProvider provider) {
|
||||||
|
IBuildEnvironmentVariable path = getVariable(ENV_PATH, configuration, provider);
|
||||||
return path != null
|
return path != null
|
||||||
? new IBuildEnvironmentVariable[] { path }
|
? new IBuildEnvironmentVariable[] { path }
|
||||||
: new IBuildEnvironmentVariable[0];
|
: new IBuildEnvironmentVariable[0];
|
||||||
|
|
|
@ -21,17 +21,10 @@ import org.osgi.framework.Version;
|
||||||
* @noextend This class is not intended to be subclassed by clients.
|
* @noextend This class is not intended to be subclassed by clients.
|
||||||
*/
|
*/
|
||||||
public class MingwIsToolChainSupported implements IManagedIsToolChainSupported {
|
public class MingwIsToolChainSupported implements IManagedIsToolChainSupported {
|
||||||
|
|
||||||
private final boolean supported;
|
|
||||||
|
|
||||||
public MingwIsToolChainSupported() {
|
|
||||||
// Only supported if we can find the mingw bin dir to run the compiler
|
|
||||||
supported = MingwEnvironmentVariableSupplier.getBinDir() != null;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean isSupported(IToolChain toolChain, Version version, String instance) {
|
public boolean isSupported(IToolChain toolChain, Version version, String instance) {
|
||||||
return supported;
|
// Only supported if we can find the mingw bin dir to run the compiler
|
||||||
|
return MingwEnvironmentVariableSupplier.getBinDir() != null;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,7 +2,7 @@ Manifest-Version: 1.0
|
||||||
Bundle-ManifestVersion: 2
|
Bundle-ManifestVersion: 2
|
||||||
Bundle-Name: Managed Build UI Tests Plug-in
|
Bundle-Name: Managed Build UI Tests Plug-in
|
||||||
Bundle-SymbolicName: org.eclipse.cdt.managedbuilder.ui.tests; singleton:=true
|
Bundle-SymbolicName: org.eclipse.cdt.managedbuilder.ui.tests; singleton:=true
|
||||||
Bundle-Version: 8.1.0.qualifier
|
Bundle-Version: 8.2.0.qualifier
|
||||||
Bundle-Activator: org.eclipse.cdt.managedbuilder.ui.tests.testplugin.TestsPlugin
|
Bundle-Activator: org.eclipse.cdt.managedbuilder.ui.tests.testplugin.TestsPlugin
|
||||||
Bundle-Vendor: Eclipse CDT
|
Bundle-Vendor: Eclipse CDT
|
||||||
Bundle-Localization: plugin
|
Bundle-Localization: plugin
|
||||||
|
|
|
@ -7,11 +7,11 @@
|
||||||
<parent>
|
<parent>
|
||||||
<groupId>org.eclipse.cdt</groupId>
|
<groupId>org.eclipse.cdt</groupId>
|
||||||
<artifactId>cdt-parent</artifactId>
|
<artifactId>cdt-parent</artifactId>
|
||||||
<version>8.1.0-SNAPSHOT</version>
|
<version>8.2.0-SNAPSHOT</version>
|
||||||
<relativePath>../../pom.xml</relativePath>
|
<relativePath>../../pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<version>8.1.0-SNAPSHOT</version>
|
<version>8.2.0-SNAPSHOT</version>
|
||||||
<artifactId>org.eclipse.cdt.managedbuilder.ui.tests</artifactId>
|
<artifactId>org.eclipse.cdt.managedbuilder.ui.tests</artifactId>
|
||||||
<packaging>eclipse-test-plugin</packaging>
|
<packaging>eclipse-test-plugin</packaging>
|
||||||
|
|
||||||
|
|
|
@ -2,7 +2,7 @@ Manifest-Version: 1.0
|
||||||
Bundle-ManifestVersion: 2
|
Bundle-ManifestVersion: 2
|
||||||
Bundle-Name: %pluginName
|
Bundle-Name: %pluginName
|
||||||
Bundle-SymbolicName: org.eclipse.cdt.managedbuilder.ui; singleton:=true
|
Bundle-SymbolicName: org.eclipse.cdt.managedbuilder.ui; singleton:=true
|
||||||
Bundle-Version: 8.1.0.qualifier
|
Bundle-Version: 8.2.0.qualifier
|
||||||
Bundle-Activator: org.eclipse.cdt.managedbuilder.ui.properties.ManagedBuilderUIPlugin
|
Bundle-Activator: org.eclipse.cdt.managedbuilder.ui.properties.ManagedBuilderUIPlugin
|
||||||
Bundle-Vendor: %providerName
|
Bundle-Vendor: %providerName
|
||||||
Bundle-Localization: plugin
|
Bundle-Localization: plugin
|
||||||
|
|
|
@ -7,11 +7,11 @@
|
||||||
<parent>
|
<parent>
|
||||||
<groupId>org.eclipse.cdt</groupId>
|
<groupId>org.eclipse.cdt</groupId>
|
||||||
<artifactId>cdt-parent</artifactId>
|
<artifactId>cdt-parent</artifactId>
|
||||||
<version>8.1.0-SNAPSHOT</version>
|
<version>8.2.0-SNAPSHOT</version>
|
||||||
<relativePath>../../pom.xml</relativePath>
|
<relativePath>../../pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<version>8.1.0-SNAPSHOT</version>
|
<version>8.2.0-SNAPSHOT</version>
|
||||||
<artifactId>org.eclipse.cdt.managedbuilder.ui</artifactId>
|
<artifactId>org.eclipse.cdt.managedbuilder.ui</artifactId>
|
||||||
<packaging>eclipse-plugin</packaging>
|
<packaging>eclipse-plugin</packaging>
|
||||||
</project>
|
</project>
|
||||||
|
|
|
@ -89,8 +89,6 @@ import org.eclipse.swt.widgets.Listener;
|
||||||
import org.eclipse.swt.widgets.Shell;
|
import org.eclipse.swt.widgets.Shell;
|
||||||
import org.eclipse.swt.widgets.Text;
|
import org.eclipse.swt.widgets.Text;
|
||||||
import org.eclipse.ui.PlatformUI;
|
import org.eclipse.ui.PlatformUI;
|
||||||
import org.osgi.framework.Bundle;
|
|
||||||
|
|
||||||
import org.eclipse.ui.dialogs.FilteredTree;
|
import org.eclipse.ui.dialogs.FilteredTree;
|
||||||
import org.eclipse.ui.dialogs.PatternFilter;
|
import org.eclipse.ui.dialogs.PatternFilter;
|
||||||
|
|
||||||
|
@ -522,27 +520,19 @@ public class BuildOptionSettingsUI extends AbstractToolSettingUI {
|
||||||
*/
|
*/
|
||||||
private class CustomFieldEditorDescriptor
|
private class CustomFieldEditorDescriptor
|
||||||
{
|
{
|
||||||
private final String editorClassName;
|
private final IConfigurationElement element;
|
||||||
private final String bundleName;
|
|
||||||
|
|
||||||
CustomFieldEditorDescriptor(String editorClassName, String bundleName) {
|
public CustomFieldEditorDescriptor(IConfigurationElement providerElement) {
|
||||||
this.editorClassName = editorClassName;
|
this.element = providerElement;
|
||||||
this.bundleName = bundleName;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
FieldEditor createEditor() {
|
FieldEditor createEditor() {
|
||||||
try {
|
try {
|
||||||
Bundle bundle = Platform.getBundle(this.bundleName);
|
Object editor = element.createExecutableExtension("class"); //$NON-NLS-1$
|
||||||
if(bundle != null) {
|
|
||||||
Class<?> editorClass = bundle.loadClass(this.editorClassName);
|
|
||||||
if(editorClass != null) {
|
|
||||||
Object editor = editorClass.newInstance();
|
|
||||||
if(editor instanceof FieldEditor && editor instanceof ICustomBuildOptionEditor) {
|
if(editor instanceof FieldEditor && editor instanceof ICustomBuildOptionEditor) {
|
||||||
return (FieldEditor)editor;
|
return (FieldEditor)editor;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
|
||||||
catch(Exception x) {
|
catch(Exception x) {
|
||||||
ManagedBuilderUIPlugin.log(x);
|
ManagedBuilderUIPlugin.log(x);
|
||||||
}
|
}
|
||||||
|
@ -567,11 +557,8 @@ public class BuildOptionSettingsUI extends AbstractToolSettingUI {
|
||||||
for(IExtension e : ep.getExtensions()) {
|
for(IExtension e : ep.getExtensions()) {
|
||||||
for(IConfigurationElement providerElement : e.getConfigurationElements()) {
|
for(IConfigurationElement providerElement : e.getConfigurationElements()) {
|
||||||
String editorId = providerElement.getAttribute("id"); //$NON-NLS-1$
|
String editorId = providerElement.getAttribute("id"); //$NON-NLS-1$
|
||||||
String editorClassName = providerElement.getAttribute("class"); //$NON-NLS-1$
|
|
||||||
|
|
||||||
String bundleName = providerElement.getContributor().getName();
|
this.customFieldEditorDescriptorIndex.put(editorId, new CustomFieldEditorDescriptor(providerElement));
|
||||||
|
|
||||||
this.customFieldEditorDescriptorIndex.put(editorId, new CustomFieldEditorDescriptor(editorClassName, bundleName));
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
<parent>
|
<parent>
|
||||||
<groupId>org.eclipse.cdt</groupId>
|
<groupId>org.eclipse.cdt</groupId>
|
||||||
<artifactId>cdt-parent</artifactId>
|
<artifactId>cdt-parent</artifactId>
|
||||||
<version>8.1.0-SNAPSHOT</version>
|
<version>8.2.0-SNAPSHOT</version>
|
||||||
<relativePath>../../pom.xml</relativePath>
|
<relativePath>../../pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
|
|
|
@ -2,7 +2,7 @@ Manifest-Version: 1.0
|
||||||
Bundle-ManifestVersion: 2
|
Bundle-ManifestVersion: 2
|
||||||
Bundle-Name: %Bundle-Name
|
Bundle-Name: %Bundle-Name
|
||||||
Bundle-SymbolicName: org.eclipse.cdt.codan.checkers.ui;singleton:=true
|
Bundle-SymbolicName: org.eclipse.cdt.codan.checkers.ui;singleton:=true
|
||||||
Bundle-Version: 1.1.0.qualifier
|
Bundle-Version: 3.2.0.qualifier
|
||||||
Bundle-Activator: org.eclipse.cdt.codan.internal.checkers.ui.CheckersUiActivator
|
Bundle-Activator: org.eclipse.cdt.codan.internal.checkers.ui.CheckersUiActivator
|
||||||
Require-Bundle: org.eclipse.ui,
|
Require-Bundle: org.eclipse.ui,
|
||||||
org.eclipse.core.runtime,
|
org.eclipse.core.runtime,
|
||||||
|
|
|
@ -7,11 +7,11 @@
|
||||||
<parent>
|
<parent>
|
||||||
<groupId>org.eclipse.cdt</groupId>
|
<groupId>org.eclipse.cdt</groupId>
|
||||||
<artifactId>cdt-parent</artifactId>
|
<artifactId>cdt-parent</artifactId>
|
||||||
<version>8.1.0-SNAPSHOT</version>
|
<version>8.2.0-SNAPSHOT</version>
|
||||||
<relativePath>../../pom.xml</relativePath>
|
<relativePath>../../pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<version>1.1.0-SNAPSHOT</version>
|
<version>3.2.0-SNAPSHOT</version>
|
||||||
<artifactId>org.eclipse.cdt.codan.checkers.ui</artifactId>
|
<artifactId>org.eclipse.cdt.codan.checkers.ui</artifactId>
|
||||||
<packaging>eclipse-plugin</packaging>
|
<packaging>eclipse-plugin</packaging>
|
||||||
</project>
|
</project>
|
||||||
|
|
|
@ -2,7 +2,7 @@ Manifest-Version: 1.0
|
||||||
Bundle-ManifestVersion: 2
|
Bundle-ManifestVersion: 2
|
||||||
Bundle-Name: %Bundle-Name
|
Bundle-Name: %Bundle-Name
|
||||||
Bundle-SymbolicName: org.eclipse.cdt.codan.checkers;singleton:=true
|
Bundle-SymbolicName: org.eclipse.cdt.codan.checkers;singleton:=true
|
||||||
Bundle-Version: 1.1.0.qualifier
|
Bundle-Version: 3.2.0.qualifier
|
||||||
Bundle-Activator: org.eclipse.cdt.codan.checkers.CodanCheckersActivator
|
Bundle-Activator: org.eclipse.cdt.codan.checkers.CodanCheckersActivator
|
||||||
Require-Bundle: org.eclipse.core.runtime,
|
Require-Bundle: org.eclipse.core.runtime,
|
||||||
org.eclipse.core.resources,
|
org.eclipse.core.resources,
|
||||||
|
|
|
@ -7,11 +7,11 @@
|
||||||
<parent>
|
<parent>
|
||||||
<groupId>org.eclipse.cdt</groupId>
|
<groupId>org.eclipse.cdt</groupId>
|
||||||
<artifactId>cdt-parent</artifactId>
|
<artifactId>cdt-parent</artifactId>
|
||||||
<version>8.1.0-SNAPSHOT</version>
|
<version>8.2.0-SNAPSHOT</version>
|
||||||
<relativePath>../../pom.xml</relativePath>
|
<relativePath>../../pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<version>1.1.0-SNAPSHOT</version>
|
<version>3.2.0-SNAPSHOT</version>
|
||||||
<artifactId>org.eclipse.cdt.codan.checkers</artifactId>
|
<artifactId>org.eclipse.cdt.codan.checkers</artifactId>
|
||||||
<packaging>eclipse-plugin</packaging>
|
<packaging>eclipse-plugin</packaging>
|
||||||
</project>
|
</project>
|
||||||
|
|
|
@ -248,6 +248,8 @@ public class ClassMembersInitializationChecker extends AbstractIndexAstChecker {
|
||||||
private ICPPConstructor getConstructor(IASTDeclaration decl) {
|
private ICPPConstructor getConstructor(IASTDeclaration decl) {
|
||||||
if (decl instanceof ICPPASTFunctionDefinition) {
|
if (decl instanceof ICPPASTFunctionDefinition) {
|
||||||
ICPPASTFunctionDefinition functionDefinition = (ICPPASTFunctionDefinition) decl;
|
ICPPASTFunctionDefinition functionDefinition = (ICPPASTFunctionDefinition) decl;
|
||||||
|
if (functionDefinition.isDeleted())
|
||||||
|
return null;
|
||||||
IBinding binding = functionDefinition.getDeclarator().getName().resolveBinding();
|
IBinding binding = functionDefinition.getDeclarator().getName().resolveBinding();
|
||||||
if (binding instanceof ICPPConstructor) {
|
if (binding instanceof ICPPConstructor) {
|
||||||
ICPPConstructor constructor = (ICPPConstructor) binding;
|
ICPPConstructor constructor = (ICPPConstructor) binding;
|
||||||
|
|
|
@ -2,7 +2,7 @@ Manifest-Version: 1.0
|
||||||
Bundle-ManifestVersion: 2
|
Bundle-ManifestVersion: 2
|
||||||
Bundle-Name: %Bundle-Name
|
Bundle-Name: %Bundle-Name
|
||||||
Bundle-SymbolicName: org.eclipse.cdt.codan.core.cxx;singleton:=true
|
Bundle-SymbolicName: org.eclipse.cdt.codan.core.cxx;singleton:=true
|
||||||
Bundle-Version: 1.1.0.qualifier
|
Bundle-Version: 3.2.0.qualifier
|
||||||
Bundle-Activator: org.eclipse.cdt.codan.core.cxx.Activator
|
Bundle-Activator: org.eclipse.cdt.codan.core.cxx.Activator
|
||||||
Require-Bundle: org.eclipse.core.runtime,
|
Require-Bundle: org.eclipse.core.runtime,
|
||||||
org.eclipse.cdt.core,
|
org.eclipse.cdt.core,
|
||||||
|
|
|
@ -7,11 +7,11 @@
|
||||||
<parent>
|
<parent>
|
||||||
<groupId>org.eclipse.cdt</groupId>
|
<groupId>org.eclipse.cdt</groupId>
|
||||||
<artifactId>cdt-parent</artifactId>
|
<artifactId>cdt-parent</artifactId>
|
||||||
<version>8.1.0-SNAPSHOT</version>
|
<version>8.2.0-SNAPSHOT</version>
|
||||||
<relativePath>../../pom.xml</relativePath>
|
<relativePath>../../pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<version>1.1.0-SNAPSHOT</version>
|
<version>3.2.0-SNAPSHOT</version>
|
||||||
<artifactId>org.eclipse.cdt.codan.core.cxx</artifactId>
|
<artifactId>org.eclipse.cdt.codan.core.cxx</artifactId>
|
||||||
<packaging>eclipse-plugin</packaging>
|
<packaging>eclipse-plugin</packaging>
|
||||||
</project>
|
</project>
|
||||||
|
|
|
@ -2,7 +2,7 @@ Manifest-Version: 1.0
|
||||||
Bundle-ManifestVersion: 2
|
Bundle-ManifestVersion: 2
|
||||||
Bundle-Name: %Bundle-Name
|
Bundle-Name: %Bundle-Name
|
||||||
Bundle-SymbolicName: org.eclipse.cdt.codan.core.test
|
Bundle-SymbolicName: org.eclipse.cdt.codan.core.test
|
||||||
Bundle-Version: 1.1.0.qualifier
|
Bundle-Version: 3.2.0.qualifier
|
||||||
Bundle-Activator: org.eclipse.cdt.codan.core.test.CodanCoreTestActivator
|
Bundle-Activator: org.eclipse.cdt.codan.core.test.CodanCoreTestActivator
|
||||||
Require-Bundle: org.eclipse.core.runtime,
|
Require-Bundle: org.eclipse.core.runtime,
|
||||||
org.eclipse.cdt.codan.checkers;bundle-version="1.0.0",
|
org.eclipse.cdt.codan.checkers;bundle-version="1.0.0",
|
||||||
|
|
|
@ -7,11 +7,11 @@
|
||||||
<parent>
|
<parent>
|
||||||
<groupId>org.eclipse.cdt</groupId>
|
<groupId>org.eclipse.cdt</groupId>
|
||||||
<artifactId>cdt-parent</artifactId>
|
<artifactId>cdt-parent</artifactId>
|
||||||
<version>8.1.0-SNAPSHOT</version>
|
<version>8.2.0-SNAPSHOT</version>
|
||||||
<relativePath>../../pom.xml</relativePath>
|
<relativePath>../../pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<version>1.1.0-SNAPSHOT</version>
|
<version>3.2.0-SNAPSHOT</version>
|
||||||
<artifactId>org.eclipse.cdt.codan.core.test</artifactId>
|
<artifactId>org.eclipse.cdt.codan.core.test</artifactId>
|
||||||
<packaging>eclipse-test-plugin</packaging>
|
<packaging>eclipse-test-plugin</packaging>
|
||||||
|
|
||||||
|
|
|
@ -314,6 +314,16 @@ public class ClassMembersInitializationCheckerTest extends CheckerTestCase {
|
||||||
checkNoErrors();
|
checkNoErrors();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// class C {
|
||||||
|
// public:
|
||||||
|
// C(const C& c) = delete;
|
||||||
|
// int i1, i2;
|
||||||
|
// };
|
||||||
|
public void testNoErrorsOnDeletedConstructor() {
|
||||||
|
loadCodeAndRun(getAboveComment());
|
||||||
|
checkNoErrors();
|
||||||
|
}
|
||||||
|
|
||||||
// void func(int & a) { a = 0; }
|
// void func(int & a) { a = 0; }
|
||||||
// class C {
|
// class C {
|
||||||
// C() { func(i); } // No warnings.
|
// C() { func(i); } // No warnings.
|
||||||
|
|
|
@ -2,7 +2,7 @@ Manifest-Version: 1.0
|
||||||
Bundle-ManifestVersion: 2
|
Bundle-ManifestVersion: 2
|
||||||
Bundle-Name: %Bundle-Name
|
Bundle-Name: %Bundle-Name
|
||||||
Bundle-SymbolicName: org.eclipse.cdt.codan.core;singleton:=true
|
Bundle-SymbolicName: org.eclipse.cdt.codan.core;singleton:=true
|
||||||
Bundle-Version: 2.1.0.qualifier
|
Bundle-Version: 3.2.0.qualifier
|
||||||
Bundle-Activator: org.eclipse.cdt.codan.core.CodanCorePlugin
|
Bundle-Activator: org.eclipse.cdt.codan.core.CodanCorePlugin
|
||||||
Bundle-Vendor: %Bundle-Vendor
|
Bundle-Vendor: %Bundle-Vendor
|
||||||
Require-Bundle: org.eclipse.core.runtime,
|
Require-Bundle: org.eclipse.core.runtime,
|
||||||
|
|
|
@ -7,11 +7,11 @@
|
||||||
<parent>
|
<parent>
|
||||||
<groupId>org.eclipse.cdt</groupId>
|
<groupId>org.eclipse.cdt</groupId>
|
||||||
<artifactId>cdt-parent</artifactId>
|
<artifactId>cdt-parent</artifactId>
|
||||||
<version>8.1.0-SNAPSHOT</version>
|
<version>8.2.0-SNAPSHOT</version>
|
||||||
<relativePath>../../pom.xml</relativePath>
|
<relativePath>../../pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<version>2.1.0-SNAPSHOT</version>
|
<version>3.2.0-SNAPSHOT</version>
|
||||||
<artifactId>org.eclipse.cdt.codan.core</artifactId>
|
<artifactId>org.eclipse.cdt.codan.core</artifactId>
|
||||||
<packaging>eclipse-plugin</packaging>
|
<packaging>eclipse-plugin</packaging>
|
||||||
</project>
|
</project>
|
||||||
|
|
|
@ -2,7 +2,7 @@ Manifest-Version: 1.0
|
||||||
Bundle-ManifestVersion: 2
|
Bundle-ManifestVersion: 2
|
||||||
Bundle-Name: %Bundle-Name
|
Bundle-Name: %Bundle-Name
|
||||||
Bundle-SymbolicName: org.eclipse.cdt.codan.examples;singleton:=true
|
Bundle-SymbolicName: org.eclipse.cdt.codan.examples;singleton:=true
|
||||||
Bundle-Version: 1.1.0.qualifier
|
Bundle-Version: 3.2.0.qualifier
|
||||||
Bundle-Activator: org.eclipse.cdt.codan.examples.Activator
|
Bundle-Activator: org.eclipse.cdt.codan.examples.Activator
|
||||||
Bundle-Vendor: %Bundle-Vendor
|
Bundle-Vendor: %Bundle-Vendor
|
||||||
Require-Bundle: org.eclipse.core.runtime,
|
Require-Bundle: org.eclipse.core.runtime,
|
||||||
|
|
|
@ -2,7 +2,7 @@ Manifest-Version: 1.0
|
||||||
Bundle-ManifestVersion: 2
|
Bundle-ManifestVersion: 2
|
||||||
Bundle-Name: Control Flow Graph
|
Bundle-Name: Control Flow Graph
|
||||||
Bundle-SymbolicName: org.eclipse.cdt.codan.ui.cfgview;singleton:=true
|
Bundle-SymbolicName: org.eclipse.cdt.codan.ui.cfgview;singleton:=true
|
||||||
Bundle-Version: 1.0.0.qualifier
|
Bundle-Version: 3.2.0.qualifier
|
||||||
Bundle-Activator: org.eclipse.cdt.codan.ui.cfgview.ControlFlowGraphPlugin
|
Bundle-Activator: org.eclipse.cdt.codan.ui.cfgview.ControlFlowGraphPlugin
|
||||||
Bundle-Vendor: Eclipse CDT
|
Bundle-Vendor: Eclipse CDT
|
||||||
Require-Bundle: org.eclipse.ui,
|
Require-Bundle: org.eclipse.ui,
|
||||||
|
|
|
@ -2,7 +2,7 @@ Manifest-Version: 1.0
|
||||||
Bundle-ManifestVersion: 2
|
Bundle-ManifestVersion: 2
|
||||||
Bundle-Name: %Bundle-Name
|
Bundle-Name: %Bundle-Name
|
||||||
Bundle-SymbolicName: org.eclipse.cdt.codan.ui.cxx;singleton:=true
|
Bundle-SymbolicName: org.eclipse.cdt.codan.ui.cxx;singleton:=true
|
||||||
Bundle-Version: 3.0.0.qualifier
|
Bundle-Version: 3.2.0.qualifier
|
||||||
Bundle-Activator: org.eclipse.cdt.codan.internal.ui.cxx.Activator
|
Bundle-Activator: org.eclipse.cdt.codan.internal.ui.cxx.Activator
|
||||||
Bundle-Vendor: %Bundle-Vendor
|
Bundle-Vendor: %Bundle-Vendor
|
||||||
Require-Bundle: org.eclipse.ui,
|
Require-Bundle: org.eclipse.ui,
|
||||||
|
|
|
@ -7,11 +7,11 @@
|
||||||
<parent>
|
<parent>
|
||||||
<groupId>org.eclipse.cdt</groupId>
|
<groupId>org.eclipse.cdt</groupId>
|
||||||
<artifactId>cdt-parent</artifactId>
|
<artifactId>cdt-parent</artifactId>
|
||||||
<version>8.1.0-SNAPSHOT</version>
|
<version>8.2.0-SNAPSHOT</version>
|
||||||
<relativePath>../../pom.xml</relativePath>
|
<relativePath>../../pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<version>3.0.0-SNAPSHOT</version>
|
<version>3.2.0-SNAPSHOT</version>
|
||||||
<artifactId>org.eclipse.cdt.codan.ui.cxx</artifactId>
|
<artifactId>org.eclipse.cdt.codan.ui.cxx</artifactId>
|
||||||
<packaging>eclipse-plugin</packaging>
|
<packaging>eclipse-plugin</packaging>
|
||||||
</project>
|
</project>
|
||||||
|
|
|
@ -2,7 +2,7 @@ Manifest-Version: 1.0
|
||||||
Bundle-ManifestVersion: 2
|
Bundle-ManifestVersion: 2
|
||||||
Bundle-Name: %Bundle-Name
|
Bundle-Name: %Bundle-Name
|
||||||
Bundle-SymbolicName: org.eclipse.cdt.codan.ui; singleton:=true
|
Bundle-SymbolicName: org.eclipse.cdt.codan.ui; singleton:=true
|
||||||
Bundle-Version: 2.1.0.qualifier
|
Bundle-Version: 3.2.0.qualifier
|
||||||
Bundle-Activator: org.eclipse.cdt.codan.internal.ui.CodanUIActivator
|
Bundle-Activator: org.eclipse.cdt.codan.internal.ui.CodanUIActivator
|
||||||
Bundle-Vendor: %Bundle-Vendor
|
Bundle-Vendor: %Bundle-Vendor
|
||||||
Require-Bundle: org.eclipse.ui,
|
Require-Bundle: org.eclipse.ui,
|
||||||
|
|
|
@ -7,11 +7,11 @@
|
||||||
<parent>
|
<parent>
|
||||||
<groupId>org.eclipse.cdt</groupId>
|
<groupId>org.eclipse.cdt</groupId>
|
||||||
<artifactId>cdt-parent</artifactId>
|
<artifactId>cdt-parent</artifactId>
|
||||||
<version>8.1.0-SNAPSHOT</version>
|
<version>8.2.0-SNAPSHOT</version>
|
||||||
<relativePath>../../pom.xml</relativePath>
|
<relativePath>../../pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<version>2.1.0-SNAPSHOT</version>
|
<version>3.2.0-SNAPSHOT</version>
|
||||||
<artifactId>org.eclipse.cdt.codan.ui</artifactId>
|
<artifactId>org.eclipse.cdt.codan.ui</artifactId>
|
||||||
<packaging>eclipse-plugin</packaging>
|
<packaging>eclipse-plugin</packaging>
|
||||||
</project>
|
</project>
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
<parent>
|
<parent>
|
||||||
<groupId>org.eclipse.cdt</groupId>
|
<groupId>org.eclipse.cdt</groupId>
|
||||||
<artifactId>cdt-parent</artifactId>
|
<artifactId>cdt-parent</artifactId>
|
||||||
<version>8.1.0-SNAPSHOT</version>
|
<version>8.2.0-SNAPSHOT</version>
|
||||||
<relativePath>../../pom.xml</relativePath>
|
<relativePath>../../pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
<parent>
|
<parent>
|
||||||
<groupId>org.eclipse.cdt</groupId>
|
<groupId>org.eclipse.cdt</groupId>
|
||||||
<artifactId>cdt-parent</artifactId>
|
<artifactId>cdt-parent</artifactId>
|
||||||
<version>8.1.0-SNAPSHOT</version>
|
<version>8.2.0-SNAPSHOT</version>
|
||||||
<relativePath>../../pom.xml</relativePath>
|
<relativePath>../../pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
<parent>
|
<parent>
|
||||||
<groupId>org.eclipse.cdt</groupId>
|
<groupId>org.eclipse.cdt</groupId>
|
||||||
<artifactId>cdt-parent</artifactId>
|
<artifactId>cdt-parent</artifactId>
|
||||||
<version>8.1.0-SNAPSHOT</version>
|
<version>8.2.0-SNAPSHOT</version>
|
||||||
<relativePath>../../pom.xml</relativePath>
|
<relativePath>../../pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
<parent>
|
<parent>
|
||||||
<groupId>org.eclipse.cdt</groupId>
|
<groupId>org.eclipse.cdt</groupId>
|
||||||
<artifactId>cdt-parent</artifactId>
|
<artifactId>cdt-parent</artifactId>
|
||||||
<version>8.1.0-SNAPSHOT</version>
|
<version>8.2.0-SNAPSHOT</version>
|
||||||
<relativePath>../../pom.xml</relativePath>
|
<relativePath>../../pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
<parent>
|
<parent>
|
||||||
<groupId>org.eclipse.cdt</groupId>
|
<groupId>org.eclipse.cdt</groupId>
|
||||||
<artifactId>cdt-parent</artifactId>
|
<artifactId>cdt-parent</artifactId>
|
||||||
<version>8.1.0-SNAPSHOT</version>
|
<version>8.2.0-SNAPSHOT</version>
|
||||||
<relativePath>../../pom.xml</relativePath>
|
<relativePath>../../pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
<parent>
|
<parent>
|
||||||
<groupId>org.eclipse.cdt</groupId>
|
<groupId>org.eclipse.cdt</groupId>
|
||||||
<artifactId>cdt-parent</artifactId>
|
<artifactId>cdt-parent</artifactId>
|
||||||
<version>8.1.0-SNAPSHOT</version>
|
<version>8.2.0-SNAPSHOT</version>
|
||||||
<relativePath>../../pom.xml</relativePath>
|
<relativePath>../../pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
<parent>
|
<parent>
|
||||||
<groupId>org.eclipse.cdt</groupId>
|
<groupId>org.eclipse.cdt</groupId>
|
||||||
<artifactId>cdt-parent</artifactId>
|
<artifactId>cdt-parent</artifactId>
|
||||||
<version>8.1.0-SNAPSHOT</version>
|
<version>8.2.0-SNAPSHOT</version>
|
||||||
<relativePath>../../pom.xml</relativePath>
|
<relativePath>../../pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
<parent>
|
<parent>
|
||||||
<groupId>org.eclipse.cdt</groupId>
|
<groupId>org.eclipse.cdt</groupId>
|
||||||
<artifactId>cdt-parent</artifactId>
|
<artifactId>cdt-parent</artifactId>
|
||||||
<version>8.1.0-SNAPSHOT</version>
|
<version>8.2.0-SNAPSHOT</version>
|
||||||
<relativePath>../../pom.xml</relativePath>
|
<relativePath>../../pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
<parent>
|
<parent>
|
||||||
<groupId>org.eclipse.cdt</groupId>
|
<groupId>org.eclipse.cdt</groupId>
|
||||||
<artifactId>cdt-parent</artifactId>
|
<artifactId>cdt-parent</artifactId>
|
||||||
<version>8.1.0-SNAPSHOT</version>
|
<version>8.2.0-SNAPSHOT</version>
|
||||||
<relativePath>../../pom.xml</relativePath>
|
<relativePath>../../pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,96 @@
|
||||||
|
/*******************************************************************************
|
||||||
|
* Copyright (c) 2012 Veaceslav Bacu (Freescale Semiconductor Inc.) and others.
|
||||||
|
* All rights reserved. This program and the accompanying materials
|
||||||
|
* are made available under the terms of the Eclipse Public License v1.0
|
||||||
|
* which accompanies this distribution, and is available at
|
||||||
|
* http://www.eclipse.org/legal/epl-v10.html
|
||||||
|
*
|
||||||
|
* Contributors:
|
||||||
|
* Veaceslav Bacu (Freescale Semiconductor Inc.) - initial API and implementation (bug 348884)
|
||||||
|
*
|
||||||
|
*******************************************************************************/
|
||||||
|
|
||||||
|
package org.eclipse.cdt.utils;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import junit.framework.Test;
|
||||||
|
import junit.framework.TestCase;
|
||||||
|
import junit.framework.TestSuite;
|
||||||
|
|
||||||
|
import org.eclipse.cdt.core.CCorePlugin;
|
||||||
|
import org.eclipse.cdt.core.cdtvariables.ICdtVariable;
|
||||||
|
import org.eclipse.cdt.core.cdtvariables.IUserVarSupplier;
|
||||||
|
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.ResourceHelper;
|
||||||
|
import org.eclipse.cdt.internal.core.cdtvariables.StorableCdtVariable;
|
||||||
|
import org.eclipse.core.resources.IProject;
|
||||||
|
|
||||||
|
public class StorableCdtVariablesTest extends TestCase {
|
||||||
|
|
||||||
|
public static Test suite() {
|
||||||
|
return new TestSuite(StorableCdtVariablesTest.class);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void tearDown() throws Exception {
|
||||||
|
ResourceHelper.cleanUp();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Unit test for bug 348884
|
||||||
|
*/
|
||||||
|
public void testSetMacros() throws Exception {
|
||||||
|
IProject project = ResourceHelper.createCDTProjectWithConfig("projectWithUserVars"); //$NON-NLS-1$
|
||||||
|
|
||||||
|
ICProjectDescription prjDesc = CoreModel.getDefault().getProjectDescription(project);
|
||||||
|
ICConfigurationDescription desc = prjDesc.getActiveConfiguration();
|
||||||
|
|
||||||
|
StorableCdtVariable varA1 = new StorableCdtVariable("A1", ICdtVariable.VALUE_TEXT, "a1"); //$NON-NLS-1$ //$NON-NLS-2$
|
||||||
|
StorableCdtVariable varA2 = new StorableCdtVariable("A2", ICdtVariable.VALUE_TEXT, "a2"); //$NON-NLS-1$ //$NON-NLS-2$
|
||||||
|
StorableCdtVariable varA3 = new StorableCdtVariable("A3", ICdtVariable.VALUE_TEXT, "a3"); //$NON-NLS-1$ //$NON-NLS-2$
|
||||||
|
StorableCdtVariable varA4 = new StorableCdtVariable("A4", ICdtVariable.VALUE_TEXT, "a4"); //$NON-NLS-1$ //$NON-NLS-2$
|
||||||
|
StorableCdtVariable varA5 = new StorableCdtVariable("A5", ICdtVariable.VALUE_TEXT, "a5"); //$NON-NLS-1$ //$NON-NLS-2$
|
||||||
|
|
||||||
|
IUserVarSupplier supplier = CCorePlugin.getUserVarSupplier();
|
||||||
|
|
||||||
|
try{
|
||||||
|
supplier.setMacros(new ICdtVariable[]{varA1, varA2, varA3, varA4}, desc);
|
||||||
|
}catch(Throwable e){
|
||||||
|
fail(e.toString());
|
||||||
|
}
|
||||||
|
{
|
||||||
|
ICdtVariable[] vars = supplier.getMacros(desc);
|
||||||
|
List<String> macroStrings = new ArrayList<String>();
|
||||||
|
for (ICdtVariable var : vars) {
|
||||||
|
macroStrings.add(var.getName() + '=' + var.getStringValue());
|
||||||
|
}
|
||||||
|
assertTrue(macroStrings.contains(varA1.getName() + '=' + varA1.getStringValue()));
|
||||||
|
assertTrue(macroStrings.contains(varA2.getName() + '=' + varA2.getStringValue()));
|
||||||
|
assertTrue(macroStrings.contains(varA3.getName() + '=' + varA3.getStringValue()));
|
||||||
|
assertTrue(macroStrings.contains(varA4.getName() + '=' + varA4.getStringValue()));
|
||||||
|
assertEquals(4, macroStrings.size());
|
||||||
|
}
|
||||||
|
|
||||||
|
try{
|
||||||
|
supplier.setMacros(new ICdtVariable[]{varA1, varA2, varA5}, desc);
|
||||||
|
}catch(Exception e){
|
||||||
|
fail(e.toString());
|
||||||
|
}
|
||||||
|
{
|
||||||
|
ICdtVariable[] vars = supplier.getMacros(desc);
|
||||||
|
List<String> macroStrings = new ArrayList<String>();
|
||||||
|
for (ICdtVariable var : vars) {
|
||||||
|
macroStrings.add(var.getName() + '=' + var.getStringValue());
|
||||||
|
}
|
||||||
|
assertTrue(macroStrings.contains(varA1.getName() + '=' + varA1.getStringValue()));
|
||||||
|
assertTrue(macroStrings.contains(varA2.getName() + '=' + varA2.getStringValue()));
|
||||||
|
assertTrue(macroStrings.contains(varA5.getName() + '=' + varA5.getStringValue()));
|
||||||
|
assertEquals(3, macroStrings.size());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -1,5 +1,5 @@
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
* Copyright (c) 2004, 2010 IBM Corporation and others.
|
* Copyright (c) 2004, 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
|
||||||
|
@ -514,9 +514,13 @@ public class AST2BaseTest extends BaseTestCase {
|
||||||
protected boolean isCPP;
|
protected boolean isCPP;
|
||||||
|
|
||||||
public BindingAssertionHelper(String contents, boolean isCPP) throws ParserException {
|
public BindingAssertionHelper(String contents, boolean isCPP) throws ParserException {
|
||||||
|
this(contents, isCPP ? ParserLanguage.CPP : ParserLanguage.C);
|
||||||
|
}
|
||||||
|
|
||||||
|
public BindingAssertionHelper(String contents, ParserLanguage lang) throws ParserException {
|
||||||
this.contents= contents;
|
this.contents= contents;
|
||||||
this.isCPP= isCPP;
|
this.isCPP= lang.isCPP();
|
||||||
this.tu= parse(contents, isCPP ? ParserLanguage.CPP : ParserLanguage.C, true, false);
|
this.tu= parse(contents, lang, true, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
public IASTTranslationUnit getTranslationUnit() {
|
public IASTTranslationUnit getTranslationUnit() {
|
||||||
|
|
|
@ -4706,8 +4706,9 @@ public class AST2CPPTests extends AST2BaseTest {
|
||||||
}
|
}
|
||||||
|
|
||||||
// template<typename T>
|
// template<typename T>
|
||||||
// class basic_string {
|
// struct basic_string {
|
||||||
// basic_string& operator+=(const T* s);
|
// basic_string& operator+=(const T* s);
|
||||||
|
// basic_string& append(const T* s);
|
||||||
// };
|
// };
|
||||||
//
|
//
|
||||||
// template<typename T>
|
// template<typename T>
|
||||||
|
@ -4721,8 +4722,9 @@ public class AST2CPPTests extends AST2BaseTest {
|
||||||
// void test(const string& s) {
|
// void test(const string& s) {
|
||||||
// auto s1 = "" + s + "";
|
// auto s1 = "" + s + "";
|
||||||
// auto s2 = s1 += "";
|
// auto s2 = s1 += "";
|
||||||
|
// auto s3 = s2.append("foo");
|
||||||
// }
|
// }
|
||||||
public void testTypedefPreservation_380498() throws Exception {
|
public void testTypedefPreservation_380498_1() throws Exception {
|
||||||
BindingAssertionHelper ba= getAssertionHelper();
|
BindingAssertionHelper ba= getAssertionHelper();
|
||||||
ICPPVariable s1 = ba.assertNonProblem("s1", ICPPVariable.class);
|
ICPPVariable s1 = ba.assertNonProblem("s1", ICPPVariable.class);
|
||||||
assertTrue(s1.getType() instanceof ITypedef);
|
assertTrue(s1.getType() instanceof ITypedef);
|
||||||
|
@ -4730,6 +4732,25 @@ public class AST2CPPTests extends AST2BaseTest {
|
||||||
ICPPVariable s2 = ba.assertNonProblem("s2", ICPPVariable.class);
|
ICPPVariable s2 = ba.assertNonProblem("s2", ICPPVariable.class);
|
||||||
assertTrue(s2.getType() instanceof ITypedef);
|
assertTrue(s2.getType() instanceof ITypedef);
|
||||||
assertEquals("string", ((ITypedef) s2.getType()).getName());
|
assertEquals("string", ((ITypedef) s2.getType()).getName());
|
||||||
|
ICPPVariable s3 = ba.assertNonProblem("s3", ICPPVariable.class);
|
||||||
|
assertTrue(s3.getType() instanceof ITypedef);
|
||||||
|
assertEquals("string", ((ITypedef) s3.getType()).getName());
|
||||||
|
}
|
||||||
|
|
||||||
|
// template <typename T>
|
||||||
|
// struct vector {
|
||||||
|
// typedef T* const_iterator;
|
||||||
|
// const_iterator begin() const;
|
||||||
|
// };
|
||||||
|
//
|
||||||
|
// void test(const vector<int>& v) {
|
||||||
|
// auto it = v.begin();
|
||||||
|
// }
|
||||||
|
public void testTypedefPreservation_380498_2() throws Exception {
|
||||||
|
BindingAssertionHelper ba= getAssertionHelper();
|
||||||
|
ICPPVariable it = ba.assertNonProblem("it =", "it", ICPPVariable.class);
|
||||||
|
assertTrue(it.getType() instanceof ITypedef);
|
||||||
|
assertEquals("vector<int>::const_iterator", ASTTypeUtil.getType(it.getType(), false));
|
||||||
}
|
}
|
||||||
|
|
||||||
// int f() {
|
// int f() {
|
||||||
|
|
|
@ -5256,7 +5256,7 @@ public class AST2TemplateTests extends AST2BaseTest {
|
||||||
// void test() {
|
// void test() {
|
||||||
// P(C());
|
// P(C());
|
||||||
// }
|
// }
|
||||||
public void _testFunctionInstanceAsTemplateArg_Bug334472() throws Exception {
|
public void testFunctionInstanceAsTemplateArg_Bug334472() throws Exception {
|
||||||
parseAndCheckBindings();
|
parseAndCheckBindings();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
* Copyright (c) 2004, 2011 IBM Corporation and others.
|
* Copyright (c) 2004, 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
|
||||||
|
@ -4866,9 +4866,8 @@ public class AST2Tests extends AST2BaseTest {
|
||||||
// myUnionPointer->bar=4;
|
// myUnionPointer->bar=4;
|
||||||
// }
|
// }
|
||||||
public void testBug228504_nonExistingMembers() throws Exception {
|
public void testBug228504_nonExistingMembers() throws Exception {
|
||||||
boolean[] isCpps= {true, false};
|
for (ParserLanguage lang: ParserLanguage.values()) {
|
||||||
for (boolean isCpp : isCpps) {
|
BindingAssertionHelper ba= new BindingAssertionHelper(getAboveComment(), lang);
|
||||||
BindingAssertionHelper ba= new BindingAssertionHelper(getAboveComment(), isCpp);
|
|
||||||
for (int i= 1; i < 5; i++) {
|
for (int i= 1; i < 5; i++) {
|
||||||
ba.assertNonProblem("foo=" + i, 3);
|
ba.assertNonProblem("foo=" + i, 3);
|
||||||
ba.assertProblem("bar=" + i, 3);
|
ba.assertProblem("bar=" + i, 3);
|
||||||
|
@ -4912,10 +4911,9 @@ public class AST2Tests extends AST2BaseTest {
|
||||||
// function1(); // ref
|
// function1(); // ref
|
||||||
// }
|
// }
|
||||||
public void testOutOfOrderResolution_Bug232300() throws Exception {
|
public void testOutOfOrderResolution_Bug232300() throws Exception {
|
||||||
final boolean[] isCpps= {false, true};
|
|
||||||
String code= getAboveComment();
|
String code= getAboveComment();
|
||||||
for (boolean isCpp : isCpps) {
|
for (ParserLanguage lang: ParserLanguage.values()) {
|
||||||
BindingAssertionHelper ba= new BindingAssertionHelper(code, isCpp);
|
BindingAssertionHelper ba= new BindingAssertionHelper(code, lang);
|
||||||
IBinding b1= ba.assertNonProblem("function1(); // decl", 9);
|
IBinding b1= ba.assertNonProblem("function1(); // decl", 9);
|
||||||
IBinding b2= ba.assertNonProblem("function1() {", 9);
|
IBinding b2= ba.assertNonProblem("function1() {", 9);
|
||||||
IBinding b3= ba.assertNonProblem("function1(); // ref", 9);
|
IBinding b3= ba.assertNonProblem("function1(); // ref", 9);
|
||||||
|
@ -4927,10 +4925,9 @@ public class AST2Tests extends AST2BaseTest {
|
||||||
// #define foo __typeof__((int*)0 - (int*)0)
|
// #define foo __typeof__((int*)0 - (int*)0)
|
||||||
// typedef foo ptrdiff_t;
|
// typedef foo ptrdiff_t;
|
||||||
public void testRedefinePtrdiff_Bug230895() throws Exception {
|
public void testRedefinePtrdiff_Bug230895() throws Exception {
|
||||||
final boolean[] isCpps= {false, true};
|
|
||||||
String code= getAboveComment();
|
String code= getAboveComment();
|
||||||
for (boolean isCpp : isCpps) {
|
for (ParserLanguage lang: ParserLanguage.values()) {
|
||||||
BindingAssertionHelper ba= new BindingAssertionHelper(code, isCpp);
|
BindingAssertionHelper ba= new BindingAssertionHelper(code, lang);
|
||||||
IBinding b1= ba.assertNonProblem("ptrdiff_t", 9);
|
IBinding b1= ba.assertNonProblem("ptrdiff_t", 9);
|
||||||
assertInstance(b1, ITypedef.class);
|
assertInstance(b1, ITypedef.class);
|
||||||
ITypedef td= (ITypedef) b1;
|
ITypedef td= (ITypedef) b1;
|
||||||
|
@ -4944,10 +4941,9 @@ public class AST2Tests extends AST2BaseTest {
|
||||||
// struct S;
|
// struct S;
|
||||||
// typedef struct S S; // td
|
// typedef struct S S; // td
|
||||||
public void testRedefineStructInScopeThatIsFullyResolved() throws Exception {
|
public void testRedefineStructInScopeThatIsFullyResolved() throws Exception {
|
||||||
final boolean[] isCpps= {false, true};
|
|
||||||
String code= getAboveComment();
|
String code= getAboveComment();
|
||||||
for (boolean isCpp : isCpps) {
|
for (ParserLanguage lang: ParserLanguage.values()) {
|
||||||
BindingAssertionHelper ba= new BindingAssertionHelper(code, isCpp);
|
BindingAssertionHelper ba= new BindingAssertionHelper(code, lang);
|
||||||
ba.assertNonProblem("a; // ref", 1);
|
ba.assertNonProblem("a; // ref", 1);
|
||||||
// now scope is fully resolved
|
// now scope is fully resolved
|
||||||
ICompositeType ct= ba.assertNonProblem("S;", 1, ICompositeType.class);
|
ICompositeType ct= ba.assertNonProblem("S;", 1, ICompositeType.class);
|
||||||
|
@ -4972,10 +4968,9 @@ public class AST2Tests extends AST2BaseTest {
|
||||||
// VOID func(VOID) {
|
// VOID func(VOID) {
|
||||||
// }
|
// }
|
||||||
public void testTypedefVoid_Bug221567() throws Exception {
|
public void testTypedefVoid_Bug221567() throws Exception {
|
||||||
final boolean[] isCpps= { false, true };
|
|
||||||
String code= getAboveComment();
|
String code= getAboveComment();
|
||||||
for (boolean isCpp : isCpps) {
|
for (ParserLanguage lang: ParserLanguage.values()) {
|
||||||
BindingAssertionHelper ba= new BindingAssertionHelper(code, isCpp);
|
BindingAssertionHelper ba= new BindingAssertionHelper(code, lang);
|
||||||
ITypedef td= ba.assertNonProblem("VOID;", 4, ITypedef.class);
|
ITypedef td= ba.assertNonProblem("VOID;", 4, ITypedef.class);
|
||||||
IBinding ref= ba.assertNonProblem("VOID)", 4);
|
IBinding ref= ba.assertNonProblem("VOID)", 4);
|
||||||
assertSame(td, ref);
|
assertSame(td, ref);
|
||||||
|
@ -5021,9 +5016,8 @@ public class AST2Tests extends AST2BaseTest {
|
||||||
// int f5(int *(tint[10]));
|
// int f5(int *(tint[10]));
|
||||||
public void testParamWithFunctionType_Bug84242() throws Exception {
|
public void testParamWithFunctionType_Bug84242() throws Exception {
|
||||||
final String comment= getAboveComment();
|
final String comment= getAboveComment();
|
||||||
final boolean[] isCpps= {false, true};
|
for (ParserLanguage lang: ParserLanguage.values()) {
|
||||||
for (boolean isCpp : isCpps) {
|
BindingAssertionHelper ba= new BindingAssertionHelper(comment, lang);
|
||||||
BindingAssertionHelper ba= new BindingAssertionHelper(comment, isCpp);
|
|
||||||
|
|
||||||
IFunction f= ba.assertNonProblem("f1", 2, IFunction.class);
|
IFunction f= ba.assertNonProblem("f1", 2, IFunction.class);
|
||||||
isTypeEqual(f.getType(), "int (int (*)(int))");
|
isTypeEqual(f.getType(), "int (int (*)(int))");
|
||||||
|
@ -5055,9 +5049,8 @@ public class AST2Tests extends AST2BaseTest {
|
||||||
// int (*f1 (int par))[5];
|
// int (*f1 (int par))[5];
|
||||||
public void testFunctionReturningPtrToArray_Bug216609() throws Exception {
|
public void testFunctionReturningPtrToArray_Bug216609() throws Exception {
|
||||||
final String comment= getAboveComment();
|
final String comment= getAboveComment();
|
||||||
final boolean[] isCpps= {false, true};
|
for (ParserLanguage lang: ParserLanguage.values()) {
|
||||||
for (boolean isCpp : isCpps) {
|
BindingAssertionHelper ba= new BindingAssertionHelper(getAboveComment(), lang);
|
||||||
BindingAssertionHelper ba= new BindingAssertionHelper(getAboveComment(), isCpp);
|
|
||||||
|
|
||||||
IFunction f= ba.assertNonProblem("f1", 2, IFunction.class);
|
IFunction f= ba.assertNonProblem("f1", 2, IFunction.class);
|
||||||
isTypeEqual(f.getType(), "int (* (int))[5]");
|
isTypeEqual(f.getType(), "int (* (int))[5]");
|
||||||
|
@ -5077,7 +5070,6 @@ public class AST2Tests extends AST2BaseTest {
|
||||||
// void ((f4)());
|
// void ((f4)());
|
||||||
public void testNestedFunctionDeclarators() throws Exception {
|
public void testNestedFunctionDeclarators() throws Exception {
|
||||||
final String comment= getAboveComment();
|
final String comment= getAboveComment();
|
||||||
final boolean[] isCpps= {false, true};
|
|
||||||
for (ParserLanguage lang: ParserLanguage.values()) {
|
for (ParserLanguage lang: ParserLanguage.values()) {
|
||||||
IASTTranslationUnit tu= parseAndCheckBindings(comment, lang);
|
IASTTranslationUnit tu= parseAndCheckBindings(comment, lang);
|
||||||
IASTFunctionDefinition fdef= getDeclaration(tu, 0);
|
IASTFunctionDefinition fdef= getDeclaration(tu, 0);
|
||||||
|
@ -5133,8 +5125,8 @@ public class AST2Tests extends AST2BaseTest {
|
||||||
public void testLocalVariableResolution_Bug235831() throws Exception {
|
public void testLocalVariableResolution_Bug235831() throws Exception {
|
||||||
final String comment= getAboveComment();
|
final String comment= getAboveComment();
|
||||||
final boolean[] isCpps= {false, true};
|
final boolean[] isCpps= {false, true};
|
||||||
for (boolean isCpp : isCpps) {
|
for (ParserLanguage lang: ParserLanguage.values()) {
|
||||||
BindingAssertionHelper ba= new BindingAssertionHelper(comment, isCpp);
|
BindingAssertionHelper ba= new BindingAssertionHelper(comment, lang);
|
||||||
|
|
||||||
ba.assertNonProblem("b; a", 1, IVariable.class); // fill cache of inner block
|
ba.assertNonProblem("b; a", 1, IVariable.class); // fill cache of inner block
|
||||||
IVariable v3= ba.assertNonProblem("a; }", 1, IVariable.class);
|
IVariable v3= ba.assertNonProblem("a; }", 1, IVariable.class);
|
||||||
|
@ -5148,9 +5140,8 @@ public class AST2Tests extends AST2BaseTest {
|
||||||
// int foo(int (*ptr) (int, int));
|
// int foo(int (*ptr) (int, int));
|
||||||
public void testComplexParameterBinding_Bug214482() throws Exception {
|
public void testComplexParameterBinding_Bug214482() throws Exception {
|
||||||
final String comment= getAboveComment();
|
final String comment= getAboveComment();
|
||||||
final boolean[] isCpps= {false, true};
|
for (ParserLanguage lang: ParserLanguage.values()) {
|
||||||
for (boolean isCpp : isCpps) {
|
BindingAssertionHelper ba= new BindingAssertionHelper(comment, lang);
|
||||||
BindingAssertionHelper ba= new BindingAssertionHelper(comment, isCpp);
|
|
||||||
IParameter p= ba.assertNonProblem("ptr", 3, IParameter.class);
|
IParameter p= ba.assertNonProblem("ptr", 3, IParameter.class);
|
||||||
assertEquals("ptr", p.getName());
|
assertEquals("ptr", p.getName());
|
||||||
}
|
}
|
||||||
|
@ -5519,8 +5510,8 @@ public class AST2Tests extends AST2BaseTest {
|
||||||
// }
|
// }
|
||||||
public void testAnonymousUnionMember() throws Exception {
|
public void testAnonymousUnionMember() throws Exception {
|
||||||
final boolean[] isCpps= {false, true};
|
final boolean[] isCpps= {false, true};
|
||||||
for (boolean isCpp : isCpps) {
|
for (ParserLanguage lang: ParserLanguage.values()) {
|
||||||
BindingAssertionHelper bh= new BindingAssertionHelper(getAboveComment(), isCpp);
|
BindingAssertionHelper bh= new BindingAssertionHelper(getAboveComment(), lang);
|
||||||
bh.assertNonProblem("a1=", 2);
|
bh.assertNonProblem("a1=", 2);
|
||||||
bh.assertProblem("a2=", 2);
|
bh.assertProblem("a2=", 2);
|
||||||
bh.assertNonProblem("a3=", 2);
|
bh.assertNonProblem("a3=", 2);
|
||||||
|
@ -5794,9 +5785,8 @@ public class AST2Tests extends AST2BaseTest {
|
||||||
// enum X {e0, e4=4, e5, e2=2, e3};
|
// enum X {e0, e4=4, e5, e2=2, e3};
|
||||||
public void testValues() throws Exception {
|
public void testValues() throws Exception {
|
||||||
final String code= getAboveComment();
|
final String code= getAboveComment();
|
||||||
boolean isCpp= false;
|
for (ParserLanguage lang: ParserLanguage.values()) {
|
||||||
do {
|
BindingAssertionHelper bh= new BindingAssertionHelper(code, lang);
|
||||||
BindingAssertionHelper bh= new BindingAssertionHelper(code, false);
|
|
||||||
IVariable v= (IVariable) bh.assertNonProblem("a=", 1);
|
IVariable v= (IVariable) bh.assertNonProblem("a=", 1);
|
||||||
checkValue(v.getInitialValue(), -4);
|
checkValue(v.getInitialValue(), -4);
|
||||||
v= (IVariable) bh.assertNonProblem("b=", 1);
|
v= (IVariable) bh.assertNonProblem("b=", 1);
|
||||||
|
@ -5814,8 +5804,7 @@ public class AST2Tests extends AST2BaseTest {
|
||||||
checkValue(e.getValue(), 4);
|
checkValue(e.getValue(), 4);
|
||||||
e= (IEnumerator) bh.assertNonProblem("e5", 2);
|
e= (IEnumerator) bh.assertNonProblem("e5", 2);
|
||||||
checkValue(e.getValue(), 5);
|
checkValue(e.getValue(), 5);
|
||||||
isCpp= !isCpp;
|
}
|
||||||
} while (isCpp);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void checkValue(IValue initialValue, int i) {
|
private void checkValue(IValue initialValue, int i) {
|
||||||
|
@ -6088,11 +6077,10 @@ public class AST2Tests extends AST2BaseTest {
|
||||||
// size_t x = a + 5;
|
// size_t x = a + 5;
|
||||||
// size_t y = 2 + a;
|
// size_t y = 2 + a;
|
||||||
// size_t y = a * 2;
|
// size_t y = a * 2;
|
||||||
public void testTypeOfExpressionWithTypedef_380498() throws Exception {
|
public void testTypeOfExpressionWithTypedef_380498_1() throws Exception {
|
||||||
final boolean[] isCpps= { false, true };
|
|
||||||
String code= getAboveComment();
|
String code= getAboveComment();
|
||||||
for (boolean isCpp : isCpps) {
|
for (ParserLanguage lang: ParserLanguage.values()) {
|
||||||
BindingAssertionHelper ba= new BindingAssertionHelper(code, isCpp);
|
BindingAssertionHelper ba= new BindingAssertionHelper(code, lang);
|
||||||
IASTExpression exp = ba.assertNode("a + 5", IASTExpression.class);
|
IASTExpression exp = ba.assertNode("a + 5", IASTExpression.class);
|
||||||
assertTrue(exp.getExpressionType() instanceof ITypedef);
|
assertTrue(exp.getExpressionType() instanceof ITypedef);
|
||||||
assertEquals("size_t", ((ITypedef) exp.getExpressionType()).getName());
|
assertEquals("size_t", ((ITypedef) exp.getExpressionType()).getName());
|
||||||
|
@ -6105,6 +6093,21 @@ public class AST2Tests extends AST2BaseTest {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// typedef void* VoidPtr;
|
||||||
|
// typedef VoidPtr (*Func)();
|
||||||
|
//
|
||||||
|
// void test(Func f) {
|
||||||
|
// f();
|
||||||
|
// }
|
||||||
|
public void testTypeOfExpressionWithTypedef_380498_2() throws Exception {
|
||||||
|
String code= getAboveComment();
|
||||||
|
for (ParserLanguage lang: ParserLanguage.values()) {
|
||||||
|
BindingAssertionHelper ba= new BindingAssertionHelper(code, lang);
|
||||||
|
IASTExpression exp = ba.assertNode("f()", IASTExpression.class);
|
||||||
|
assertTrue(exp.getExpressionType() instanceof ITypedef);
|
||||||
|
assertEquals("VoidPtr", ((ITypedef) exp.getExpressionType()).getName());
|
||||||
|
}
|
||||||
|
}
|
||||||
// typedef int TInt;
|
// typedef int TInt;
|
||||||
// int a= TInt; //ref
|
// int a= TInt; //ref
|
||||||
public void testTypeAsExpressionIsProblem_261175() throws Exception {
|
public void testTypeAsExpressionIsProblem_261175() throws Exception {
|
||||||
|
|
|
@ -17,6 +17,7 @@ import junit.framework.TestSuite;
|
||||||
|
|
||||||
import org.eclipse.cdt.core.dom.ast.ASTTypeUtil;
|
import org.eclipse.cdt.core.dom.ast.ASTTypeUtil;
|
||||||
import org.eclipse.cdt.core.dom.ast.IASTExpression;
|
import org.eclipse.cdt.core.dom.ast.IASTExpression;
|
||||||
|
import org.eclipse.cdt.core.dom.ast.IASTName;
|
||||||
import org.eclipse.cdt.core.dom.ast.IBasicType;
|
import org.eclipse.cdt.core.dom.ast.IBasicType;
|
||||||
import org.eclipse.cdt.core.dom.ast.IBasicType.Kind;
|
import org.eclipse.cdt.core.dom.ast.IBasicType.Kind;
|
||||||
import org.eclipse.cdt.core.dom.ast.IBinding;
|
import org.eclipse.cdt.core.dom.ast.IBinding;
|
||||||
|
@ -1544,19 +1545,19 @@ public class IndexCPPTemplateResolutionTest extends IndexBindingResolutionTestBa
|
||||||
|
|
||||||
// CT<int> v1;
|
// CT<int> v1;
|
||||||
public void testUniqueInstance_Bug241641() throws Exception {
|
public void testUniqueInstance_Bug241641() throws Exception {
|
||||||
|
IASTName name= findName("v1", 2);
|
||||||
ICPPVariable v1= getBindingFromASTName("v1", 2, ICPPVariable.class);
|
ICPPVariable v1= getBindingFromASTName("v1", 2, ICPPVariable.class);
|
||||||
ICPPVariable v2= getBindingFromASTName("v1", 2, ICPPVariable.class);
|
|
||||||
|
|
||||||
IType t1= v1.getType();
|
IType t1= v1.getType();
|
||||||
assertInstance(t1, ICPPTemplateInstance.class);
|
assertInstance(t1, ICPPTemplateInstance.class);
|
||||||
|
|
||||||
ICPPTemplateInstance inst= (ICPPTemplateInstance) t1;
|
ICPPTemplateInstance inst= (ICPPTemplateInstance) t1;
|
||||||
final ICPPClassTemplate tmplDef = (ICPPClassTemplate) inst.getTemplateDefinition();
|
final ICPPClassTemplate tmplDef = (ICPPClassTemplate) inst.getTemplateDefinition();
|
||||||
IBinding inst2= CPPTemplates.instantiate(tmplDef, inst.getTemplateArguments());
|
IBinding inst2= CPPTemplates.instantiate(tmplDef, inst.getTemplateArguments(), name);
|
||||||
assertSame(inst, inst2);
|
assertSame(inst, inst2);
|
||||||
|
|
||||||
IBinding charInst1= CPPTemplates.instantiate(tmplDef, new ICPPTemplateArgument[] {new CPPTemplateArgument(new CPPBasicType(Kind.eChar, 0))});
|
IBinding charInst1= CPPTemplates.instantiate(tmplDef, new ICPPTemplateArgument[] {new CPPTemplateArgument(new CPPBasicType(Kind.eChar, 0))}, name);
|
||||||
IBinding charInst2= CPPTemplates.instantiate(tmplDef, new ICPPTemplateArgument[] {new CPPTemplateArgument(new CPPBasicType(Kind.eChar, 0))});
|
IBinding charInst2= CPPTemplates.instantiate(tmplDef, new ICPPTemplateArgument[] {new CPPTemplateArgument(new CPPBasicType(Kind.eChar, 0))}, name);
|
||||||
assertSame(charInst1, charInst2);
|
assertSame(charInst1, charInst2);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
<parent>
|
<parent>
|
||||||
<groupId>org.eclipse.cdt</groupId>
|
<groupId>org.eclipse.cdt</groupId>
|
||||||
<artifactId>cdt-parent</artifactId>
|
<artifactId>cdt-parent</artifactId>
|
||||||
<version>8.1.0-SNAPSHOT</version>
|
<version>8.2.0-SNAPSHOT</version>
|
||||||
<relativePath>../../pom.xml</relativePath>
|
<relativePath>../../pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
|
@ -45,7 +45,7 @@
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<artifactId>org.eclipse.cdt.feature.group</artifactId>
|
<artifactId>org.eclipse.cdt.feature.group</artifactId>
|
||||||
<version>8.1.0.${buildQualifier}</version>
|
<version>8.2.0.${buildQualifier}</version>
|
||||||
<type>p2-installable-unit</type>
|
<type>p2-installable-unit</type>
|
||||||
</dependency>
|
</dependency>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
|
|
@ -6,6 +6,10 @@ int Hallo;
|
||||||
//%CPP
|
//%CPP
|
||||||
int TestClass::Hallo;
|
int TestClass::Hallo;
|
||||||
|
|
||||||
|
//!FullyQualifiedName
|
||||||
|
//%CPP
|
||||||
|
int ::name;
|
||||||
|
|
||||||
//!OperatorName
|
//!OperatorName
|
||||||
//%CPP
|
//%CPP
|
||||||
class Foo
|
class Foo
|
||||||
|
|
|
@ -2978,6 +2978,7 @@ class test
|
||||||
|
|
||||||
//=
|
//=
|
||||||
=>leading
|
=>leading
|
||||||
|
#ifndef TEST_H_ = //TEST
|
||||||
=>trailing
|
=>trailing
|
||||||
=>freestanding
|
=>freestanding
|
||||||
|
|
||||||
|
@ -2999,6 +3000,9 @@ class test
|
||||||
|
|
||||||
//=
|
//=
|
||||||
=>leading
|
=>leading
|
||||||
|
#ifndef TEST_H_ = /*
|
||||||
|
* Licence information...
|
||||||
|
*/
|
||||||
=>trailing
|
=>trailing
|
||||||
=>freestanding
|
=>freestanding
|
||||||
|
|
||||||
|
@ -3021,6 +3025,9 @@ class test
|
||||||
|
|
||||||
//=
|
//=
|
||||||
=>leading
|
=>leading
|
||||||
|
#ifndef TEST_H_ = /*
|
||||||
|
* Licence information...
|
||||||
|
*/
|
||||||
class test
|
class test
|
||||||
{
|
{
|
||||||
}; = //test
|
}; = //test
|
||||||
|
@ -3054,7 +3061,11 @@ private:
|
||||||
|
|
||||||
//=
|
//=
|
||||||
=>leading
|
=>leading
|
||||||
|
#ifndef HIDEMETHOD_H_ = /*
|
||||||
|
* HideMethod.h
|
||||||
|
*/
|
||||||
=>trailing
|
=>trailing
|
||||||
|
#endif = /* HIDEMETHOD_H_ */
|
||||||
=>freestanding
|
=>freestanding
|
||||||
|
|
||||||
//!CommentRecognition Bug 233438
|
//!CommentRecognition Bug 233438
|
||||||
|
@ -3077,6 +3088,7 @@ private:
|
||||||
//=
|
//=
|
||||||
=>leading
|
=>leading
|
||||||
=>trailing
|
=>trailing
|
||||||
|
#endif = /* HIDEMETHOD_H_ */
|
||||||
=>freestanding
|
=>freestanding
|
||||||
|
|
||||||
//@test.cpp
|
//@test.cpp
|
||||||
|
@ -3122,6 +3134,7 @@ private:
|
||||||
//=
|
//=
|
||||||
=>leading
|
=>leading
|
||||||
=>trailing
|
=>trailing
|
||||||
|
#endif = /* HIDEMETHOD_H_ */
|
||||||
=>freestanding
|
=>freestanding
|
||||||
|
|
||||||
//@test.cpp
|
//@test.cpp
|
||||||
|
@ -3145,4 +3158,44 @@ int HideMethod::methode2(){
|
||||||
=>trailing
|
=>trailing
|
||||||
i++; = //comment
|
i++; = //comment
|
||||||
=>freestanding
|
=>freestanding
|
||||||
|
//!CommentRecognition preprocessor directives comment recognition
|
||||||
|
//#org.eclipse.cdt.core.parser.tests.rewrite.comenthandler.CommentHandlingTest
|
||||||
|
//@main.cpp
|
||||||
|
//c1
|
||||||
|
int i;//c2
|
||||||
|
//inc1
|
||||||
|
|
||||||
|
//inc2
|
||||||
|
|
||||||
|
#include "foo.h" /*inc3*/ /*inc4*/
|
||||||
|
//main
|
||||||
|
int main() {
|
||||||
|
return 0;
|
||||||
|
//block1
|
||||||
|
}
|
||||||
|
//ifdef1
|
||||||
|
#ifdef X //ifdef2
|
||||||
|
//=
|
||||||
|
=>leading
|
||||||
|
int i; = //c1
|
||||||
|
#include "foo.h" = //inc1 , //inc2
|
||||||
|
int main() {
|
||||||
|
return 0;
|
||||||
|
//block1
|
||||||
|
} = //main
|
||||||
|
#ifdef X = //ifdef1
|
||||||
|
=>trailing
|
||||||
|
int i; = //c2
|
||||||
|
#include "foo.h" = /*inc3*/ , /*inc4*/
|
||||||
|
#ifdef X = //ifdef2
|
||||||
|
=>freestanding
|
||||||
|
{
|
||||||
|
return 0;
|
||||||
|
//block1
|
||||||
|
} = //block1
|
||||||
|
//@foo.h
|
||||||
|
void foo();
|
||||||
|
//=
|
||||||
|
=>leading
|
||||||
|
=>trailing
|
||||||
|
=>freestanding
|
|
@ -36,6 +36,7 @@ import org.eclipse.cdt.utils.ByteUtilsTest;
|
||||||
import org.eclipse.cdt.utils.CdtVariableResolverTest;
|
import org.eclipse.cdt.utils.CdtVariableResolverTest;
|
||||||
import org.eclipse.cdt.utils.CommandLineUtilTest;
|
import org.eclipse.cdt.utils.CommandLineUtilTest;
|
||||||
import org.eclipse.cdt.utils.FindProgramLocationTest;
|
import org.eclipse.cdt.utils.FindProgramLocationTest;
|
||||||
|
import org.eclipse.cdt.utils.StorableCdtVariablesTest;
|
||||||
import org.eclipse.cdt.utils.WeakHashSetTest;
|
import org.eclipse.cdt.utils.WeakHashSetTest;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -76,6 +77,7 @@ public class AutomatedIntegrationSuite extends TestSuite {
|
||||||
suite.addTest(AllLanguageTests.suite());
|
suite.addTest(AllLanguageTests.suite());
|
||||||
suite.addTest(RewriteTests.suite());
|
suite.addTest(RewriteTests.suite());
|
||||||
suite.addTest(CdtVariableResolverTest.suite());
|
suite.addTest(CdtVariableResolverTest.suite());
|
||||||
|
suite.addTest(StorableCdtVariablesTest.suite());
|
||||||
suite.addTest(CommandLineUtilTest.suite());
|
suite.addTest(CommandLineUtilTest.suite());
|
||||||
suite.addTest(WeakHashSetTest.suite());
|
suite.addTest(WeakHashSetTest.suite());
|
||||||
suite.addTest(FindProgramLocationTest.suite());
|
suite.addTest(FindProgramLocationTest.suite());
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
<parent>
|
<parent>
|
||||||
<groupId>org.eclipse.cdt</groupId>
|
<groupId>org.eclipse.cdt</groupId>
|
||||||
<artifactId>cdt-parent</artifactId>
|
<artifactId>cdt-parent</artifactId>
|
||||||
<version>8.1.0-SNAPSHOT</version>
|
<version>8.2.0-SNAPSHOT</version>
|
||||||
<relativePath>../../pom.xml</relativePath>
|
<relativePath>../../pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
<parent>
|
<parent>
|
||||||
<groupId>org.eclipse.cdt</groupId>
|
<groupId>org.eclipse.cdt</groupId>
|
||||||
<artifactId>cdt-parent</artifactId>
|
<artifactId>cdt-parent</artifactId>
|
||||||
<version>8.1.0-SNAPSHOT</version>
|
<version>8.2.0-SNAPSHOT</version>
|
||||||
<relativePath>../../pom.xml</relativePath>
|
<relativePath>../../pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
<parent>
|
<parent>
|
||||||
<groupId>org.eclipse.cdt</groupId>
|
<groupId>org.eclipse.cdt</groupId>
|
||||||
<artifactId>cdt-parent</artifactId>
|
<artifactId>cdt-parent</artifactId>
|
||||||
<version>8.1.0-SNAPSHOT</version>
|
<version>8.2.0-SNAPSHOT</version>
|
||||||
<relativePath>../../pom.xml</relativePath>
|
<relativePath>../../pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
|
|
|
@ -1,153 +0,0 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?><component id="org.eclipse.cdt.core" version="2">
|
|
||||||
<resource path="model/org/eclipse/cdt/core/settings/model/ICDescriptionDelta.java" type="org.eclipse.cdt.core.settings.model.ICDescriptionDelta">
|
|
||||||
<filter comment="Temporary filter to ignore added API restictions for interfaces that should be internal to begin with" id="403853384">
|
|
||||||
<message_arguments>
|
|
||||||
<message_argument value="org.eclipse.cdt.core.settings.model.ICDescriptionDelta"/>
|
|
||||||
</message_arguments>
|
|
||||||
</filter>
|
|
||||||
</resource>
|
|
||||||
<resource path="model/org/eclipse/cdt/core/settings/model/ICSettingEntry.java" type="org.eclipse.cdt.core.settings.model.ICSettingEntry">
|
|
||||||
<filter comment="Temporary filter to ignore added API restictions for interfaces that should be internal to begin with" id="403853384">
|
|
||||||
<message_arguments>
|
|
||||||
<message_argument value="org.eclipse.cdt.core.settings.model.ICSettingEntry"/>
|
|
||||||
</message_arguments>
|
|
||||||
</filter>
|
|
||||||
</resource>
|
|
||||||
<resource path="parser/org/eclipse/cdt/core/dom/ast/IASTCopyLocation.java" type="org.eclipse.cdt.core.dom.ast.IASTCopyLocation">
|
|
||||||
<filter id="403853384">
|
|
||||||
<message_arguments>
|
|
||||||
<message_argument value="org.eclipse.cdt.core.dom.ast.IASTCopyLocation"/>
|
|
||||||
</message_arguments>
|
|
||||||
</filter>
|
|
||||||
<filter id="406052990">
|
|
||||||
<message_arguments>
|
|
||||||
<message_argument value="org.eclipse.cdt.core.dom.ast.IASTCopyLocation"/>
|
|
||||||
<message_argument value="getOriginalNode()"/>
|
|
||||||
</message_arguments>
|
|
||||||
</filter>
|
|
||||||
</resource>
|
|
||||||
<resource path="parser/org/eclipse/cdt/core/parser/util/ArrayUtil.java" type="org.eclipse.cdt.core.parser.util.ArrayUtil">
|
|
||||||
<filter id="420679712">
|
|
||||||
<message_arguments>
|
|
||||||
<message_argument value="org.eclipse.cdt.core.parser.util.ArrayUtil.addAll(Class<?>, Object[], Object[])"/>
|
|
||||||
<message_argument value="T"/>
|
|
||||||
</message_arguments>
|
|
||||||
</filter>
|
|
||||||
<filter id="420679712">
|
|
||||||
<message_arguments>
|
|
||||||
<message_argument value="org.eclipse.cdt.core.parser.util.ArrayUtil.append(Class<?>, Object[], Object)"/>
|
|
||||||
<message_argument value="T"/>
|
|
||||||
</message_arguments>
|
|
||||||
</filter>
|
|
||||||
<filter id="420679712">
|
|
||||||
<message_arguments>
|
|
||||||
<message_argument value="org.eclipse.cdt.core.parser.util.ArrayUtil.prepend(Class<?>, Object[], Object)"/>
|
|
||||||
<message_argument value="T"/>
|
|
||||||
</message_arguments>
|
|
||||||
</filter>
|
|
||||||
<filter id="420679712">
|
|
||||||
<message_arguments>
|
|
||||||
<message_argument value="org.eclipse.cdt.core.parser.util.ArrayUtil.removeNulls(Class<?>, Object[])"/>
|
|
||||||
<message_argument value="T"/>
|
|
||||||
</message_arguments>
|
|
||||||
</filter>
|
|
||||||
<filter id="420679712">
|
|
||||||
<message_arguments>
|
|
||||||
<message_argument value="org.eclipse.cdt.core.parser.util.ArrayUtil.trim(Class<?>, Object[])"/>
|
|
||||||
<message_argument value="T"/>
|
|
||||||
</message_arguments>
|
|
||||||
</filter>
|
|
||||||
<filter id="420679712">
|
|
||||||
<message_arguments>
|
|
||||||
<message_argument value="org.eclipse.cdt.core.parser.util.ArrayUtil.trim(Class<?>, Object[], boolean)"/>
|
|
||||||
<message_argument value="T"/>
|
|
||||||
</message_arguments>
|
|
||||||
</filter>
|
|
||||||
</resource>
|
|
||||||
<resource path="src/org/eclipse/cdt/core/resources/RefreshScopeManager.java" type="org.eclipse.cdt.core.resources.RefreshScopeManager">
|
|
||||||
<filter id="338792546">
|
|
||||||
<message_arguments>
|
|
||||||
<message_argument value="org.eclipse.cdt.core.resources.RefreshScopeManager"/>
|
|
||||||
<message_argument value="addExclusion(IResource, RefreshExclusion)"/>
|
|
||||||
</message_arguments>
|
|
||||||
</filter>
|
|
||||||
<filter id="338792546">
|
|
||||||
<message_arguments>
|
|
||||||
<message_argument value="org.eclipse.cdt.core.resources.RefreshScopeManager"/>
|
|
||||||
<message_argument value="addResourceToRefresh(IProject, IResource)"/>
|
|
||||||
</message_arguments>
|
|
||||||
</filter>
|
|
||||||
<filter id="338792546">
|
|
||||||
<message_arguments>
|
|
||||||
<message_argument value="org.eclipse.cdt.core.resources.RefreshScopeManager"/>
|
|
||||||
<message_argument value="clearAllExclusions()"/>
|
|
||||||
</message_arguments>
|
|
||||||
</filter>
|
|
||||||
<filter id="338792546">
|
|
||||||
<message_arguments>
|
|
||||||
<message_argument value="org.eclipse.cdt.core.resources.RefreshScopeManager"/>
|
|
||||||
<message_argument value="clearAllResourcesToRefresh()"/>
|
|
||||||
</message_arguments>
|
|
||||||
</filter>
|
|
||||||
<filter id="338792546">
|
|
||||||
<message_arguments>
|
|
||||||
<message_argument value="org.eclipse.cdt.core.resources.RefreshScopeManager"/>
|
|
||||||
<message_argument value="clearExclusions(IResource)"/>
|
|
||||||
</message_arguments>
|
|
||||||
</filter>
|
|
||||||
<filter id="338792546">
|
|
||||||
<message_arguments>
|
|
||||||
<message_argument value="org.eclipse.cdt.core.resources.RefreshScopeManager"/>
|
|
||||||
<message_argument value="clearExclusionsForProject(IProject)"/>
|
|
||||||
</message_arguments>
|
|
||||||
</filter>
|
|
||||||
<filter id="338792546">
|
|
||||||
<message_arguments>
|
|
||||||
<message_argument value="org.eclipse.cdt.core.resources.RefreshScopeManager"/>
|
|
||||||
<message_argument value="deleteResourceToRefresh(IProject, IResource)"/>
|
|
||||||
</message_arguments>
|
|
||||||
</filter>
|
|
||||||
<filter id="338792546">
|
|
||||||
<message_arguments>
|
|
||||||
<message_argument value="org.eclipse.cdt.core.resources.RefreshScopeManager"/>
|
|
||||||
<message_argument value="getExclusions(IResource)"/>
|
|
||||||
</message_arguments>
|
|
||||||
</filter>
|
|
||||||
<filter id="338792546">
|
|
||||||
<message_arguments>
|
|
||||||
<message_argument value="org.eclipse.cdt.core.resources.RefreshScopeManager"/>
|
|
||||||
<message_argument value="getRefreshSchedulingRule(IProject)"/>
|
|
||||||
</message_arguments>
|
|
||||||
</filter>
|
|
||||||
<filter id="338792546">
|
|
||||||
<message_arguments>
|
|
||||||
<message_argument value="org.eclipse.cdt.core.resources.RefreshScopeManager"/>
|
|
||||||
<message_argument value="getResourcesToRefresh(IProject)"/>
|
|
||||||
</message_arguments>
|
|
||||||
</filter>
|
|
||||||
<filter id="338792546">
|
|
||||||
<message_arguments>
|
|
||||||
<message_argument value="org.eclipse.cdt.core.resources.RefreshScopeManager"/>
|
|
||||||
<message_argument value="removeExclusion(IResource, RefreshExclusion)"/>
|
|
||||||
</message_arguments>
|
|
||||||
</filter>
|
|
||||||
<filter id="338792546">
|
|
||||||
<message_arguments>
|
|
||||||
<message_argument value="org.eclipse.cdt.core.resources.RefreshScopeManager"/>
|
|
||||||
<message_argument value="setExclusions(IResource, List<RefreshExclusion>)"/>
|
|
||||||
</message_arguments>
|
|
||||||
</filter>
|
|
||||||
<filter id="338792546">
|
|
||||||
<message_arguments>
|
|
||||||
<message_argument value="org.eclipse.cdt.core.resources.RefreshScopeManager"/>
|
|
||||||
<message_argument value="setResourcesToRefresh(IProject, List<IResource>)"/>
|
|
||||||
</message_arguments>
|
|
||||||
</filter>
|
|
||||||
<filter comment="routines no longer needed for RefreshScopeManager" id="338792546">
|
|
||||||
<message_arguments>
|
|
||||||
<message_argument value="org.eclipse.cdt.core.resources.RefreshScopeManager"/>
|
|
||||||
<message_argument value="shouldResourceBeRefreshed(IResource)"/>
|
|
||||||
</message_arguments>
|
|
||||||
</filter>
|
|
||||||
</resource>
|
|
||||||
</component>
|
|
|
@ -2,7 +2,7 @@ Manifest-Version: 1.0
|
||||||
Bundle-ManifestVersion: 2
|
Bundle-ManifestVersion: 2
|
||||||
Bundle-Name: %pluginName
|
Bundle-Name: %pluginName
|
||||||
Bundle-SymbolicName: org.eclipse.cdt.core; singleton:=true
|
Bundle-SymbolicName: org.eclipse.cdt.core; singleton:=true
|
||||||
Bundle-Version: 5.4.0.qualifier
|
Bundle-Version: 5.5.0.qualifier
|
||||||
Bundle-Activator: org.eclipse.cdt.core.CCorePlugin
|
Bundle-Activator: org.eclipse.cdt.core.CCorePlugin
|
||||||
Bundle-Vendor: %providerName
|
Bundle-Vendor: %providerName
|
||||||
Bundle-Localization: plugin
|
Bundle-Localization: plugin
|
||||||
|
|
|
@ -17,7 +17,6 @@ import org.eclipse.cdt.core.model.ICElement;
|
||||||
import org.eclipse.cdt.core.parser.ast.ASTAccessVisibility;
|
import org.eclipse.cdt.core.parser.ast.ASTAccessVisibility;
|
||||||
|
|
||||||
public class FieldHandle extends CElementHandle implements org.eclipse.cdt.core.model.IField {
|
public class FieldHandle extends CElementHandle implements org.eclipse.cdt.core.model.IField {
|
||||||
|
|
||||||
private ASTAccessVisibility fVisibility;
|
private ASTAccessVisibility fVisibility;
|
||||||
private String fTypeName;
|
private String fTypeName;
|
||||||
private boolean fIsStatic;
|
private boolean fIsStatic;
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
* Copyright (c) 2005, 2010 IBM Corporation and others.
|
* Copyright (c) 2005, 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
|
||||||
|
@ -8,6 +8,7 @@
|
||||||
* Contributors:
|
* Contributors:
|
||||||
* Rational Software - initial implementation
|
* Rational Software - initial implementation
|
||||||
* Markus Schorn (Wind River Systems)
|
* Markus Schorn (Wind River Systems)
|
||||||
|
* Sergey Prigogin (Google)
|
||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
package org.eclipse.cdt.core.dom.ast;
|
package org.eclipse.cdt.core.dom.ast;
|
||||||
|
|
||||||
|
@ -350,7 +351,8 @@ public class ASTTypeUtil {
|
||||||
result.append(Keywords.ENUM);
|
result.append(Keywords.ENUM);
|
||||||
result.append(SPACE);
|
result.append(SPACE);
|
||||||
}
|
}
|
||||||
appendCppName((ICPPBinding) type, normalize, normalize, result);
|
boolean qualify = normalize || (type instanceof ITypedef && type instanceof ICPPSpecialization);
|
||||||
|
appendCppName((ICPPBinding) type, normalize, qualify, result);
|
||||||
} else if (type instanceof ICompositeType) {
|
} else if (type instanceof ICompositeType) {
|
||||||
// 101114 fix, do not display class, and for consistency don't display struct/union as well
|
// 101114 fix, do not display class, and for consistency don't display struct/union as well
|
||||||
appendNameCheckAnonymous((ICompositeType) type, result);
|
appendNameCheckAnonymous((ICompositeType) type, result);
|
||||||
|
@ -469,13 +471,13 @@ public class ASTTypeUtil {
|
||||||
public static void appendType(IType type, boolean normalize, StringBuilder result) {
|
public static void appendType(IType type, boolean normalize, StringBuilder result) {
|
||||||
IType[] types = new IType[DEAULT_ITYPE_SIZE];
|
IType[] types = new IType[DEAULT_ITYPE_SIZE];
|
||||||
|
|
||||||
// push all of the types onto the stack
|
// Push all of the types onto the stack
|
||||||
int i = 0;
|
int i = 0;
|
||||||
IQualifierType cvq= null;
|
IQualifierType cvq= null;
|
||||||
ICPPReferenceType ref= null;
|
ICPPReferenceType ref= null;
|
||||||
while (type != null && ++i < 100) {
|
while (type != null && ++i < 100) {
|
||||||
if (type instanceof ITypedef) {
|
if (type instanceof ITypedef) {
|
||||||
if (normalize || type instanceof ICPPSpecialization) {
|
if (normalize) {
|
||||||
// Skip the typedef and proceed with its target type.
|
// Skip the typedef and proceed with its target type.
|
||||||
} else {
|
} else {
|
||||||
// Output reference, qualifier and typedef, then stop.
|
// Output reference, qualifier and typedef, then stop.
|
||||||
|
@ -608,7 +610,6 @@ public class ASTTypeUtil {
|
||||||
IBinding binding = declarator.getName().resolveBinding();
|
IBinding binding = declarator.getName().resolveBinding();
|
||||||
IType type = null;
|
IType type = null;
|
||||||
|
|
||||||
try {
|
|
||||||
if (binding instanceof IEnumerator) {
|
if (binding instanceof IEnumerator) {
|
||||||
type = ((IEnumerator)binding).getType();
|
type = ((IEnumerator)binding).getType();
|
||||||
} else if (binding instanceof IFunction) {
|
} else if (binding instanceof IFunction) {
|
||||||
|
@ -618,9 +619,6 @@ public class ASTTypeUtil {
|
||||||
} else if (binding instanceof IVariable) {
|
} else if (binding instanceof IVariable) {
|
||||||
type = ((IVariable)binding).getType();
|
type = ((IVariable)binding).getType();
|
||||||
}
|
}
|
||||||
} catch (DOMException e) {
|
|
||||||
return EMPTY_STRING;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (type != null) {
|
if (type != null) {
|
||||||
return getType(type);
|
return getType(type);
|
||||||
|
|
|
@ -142,7 +142,8 @@ public interface IASTUnaryExpression extends IASTExpression {
|
||||||
* <code>OPERAND</code> represents the relationship between an <code>IASTUnaryExpression</code> and
|
* <code>OPERAND</code> represents the relationship between an <code>IASTUnaryExpression</code> and
|
||||||
* it's nested <code>IASTExpression</code>.
|
* it's nested <code>IASTExpression</code>.
|
||||||
*/
|
*/
|
||||||
public static final ASTNodeProperty OPERAND = new ASTNodeProperty("IASTUnaryExpression.OPERAND - IASTExpression (operand) for IASTUnaryExpression"); //$NON-NLS-1$
|
public static final ASTNodeProperty OPERAND =
|
||||||
|
new ASTNodeProperty("IASTUnaryExpression.OPERAND - IASTExpression (operand) for IASTUnaryExpression"); //$NON-NLS-1$
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the operand.
|
* Get the operand.
|
||||||
|
|
|
@ -23,7 +23,7 @@ public interface IEnumerator extends IBinding {
|
||||||
*
|
*
|
||||||
* @return the type of the enumeration
|
* @return the type of the enumeration
|
||||||
*/
|
*/
|
||||||
public IType getType() throws DOMException;
|
public IType getType();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the value assigned to this enumerator.
|
* Returns the value assigned to this enumerator.
|
||||||
|
|
|
@ -13,6 +13,7 @@
|
||||||
package org.eclipse.cdt.core.dom.ast;
|
package org.eclipse.cdt.core.dom.ast;
|
||||||
|
|
||||||
import org.eclipse.cdt.core.dom.IName;
|
import org.eclipse.cdt.core.dom.IName;
|
||||||
|
import org.eclipse.cdt.core.index.IIndex;
|
||||||
import org.eclipse.cdt.core.index.IIndexFileSet;
|
import org.eclipse.cdt.core.index.IIndexFileSet;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -87,34 +88,106 @@ public interface IScope {
|
||||||
public IBinding getBinding(IASTName name, boolean resolve, IIndexFileSet acceptLocalBindings);
|
public IBinding getBinding(IASTName name, boolean resolve, IIndexFileSet acceptLocalBindings);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the bindings in this scope that the given name or prefix could resolve to. Could
|
* @deprecated Use {@link #getBindings(ScopeLookupData)} instead
|
||||||
* return null if there is no matching bindings in this scope, if the bindings have not
|
|
||||||
* yet been cached in this scope, or if resolve == false and the appropriate bindings
|
|
||||||
* have not yet been resolved.
|
|
||||||
*
|
|
||||||
* @param name
|
|
||||||
* @param resolve :
|
|
||||||
* whether or not to resolve the matching bindings if they have not
|
|
||||||
* been so already.
|
|
||||||
* @param prefixLookup whether the lookup is for a full name or a prefix
|
|
||||||
* @return : the bindings in this scope that match the name or prefix, or null
|
|
||||||
*/
|
*/
|
||||||
|
@Deprecated
|
||||||
public IBinding[] getBindings(IASTName name, boolean resolve, boolean prefixLookup);
|
public IBinding[] getBindings(IASTName name, boolean resolve, boolean prefixLookup);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @deprecated Use {@link #getBindings(ScopeLookupData)} instead
|
||||||
|
*/
|
||||||
|
@Deprecated
|
||||||
|
public IBinding[] getBindings(IASTName name, boolean resolve, boolean prefixLookup, IIndexFileSet acceptLocalBindings);
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @since 5.5
|
||||||
|
* @noextend This class is not intended to be subclassed by clients.
|
||||||
|
*/
|
||||||
|
public static class ScopeLookupData {
|
||||||
|
private char[] fLookupKey;
|
||||||
|
private final IASTNode fLookupPoint;
|
||||||
|
private final IASTTranslationUnit fTu;
|
||||||
|
private final boolean fLookupPointIsName;
|
||||||
|
private boolean fResolve= true;
|
||||||
|
private boolean fPrefixLookup= false;
|
||||||
|
private boolean fIgnorePointOfDeclaration= false;
|
||||||
|
|
||||||
|
public ScopeLookupData(IASTName name, boolean resolve, boolean prefixLookup) {
|
||||||
|
if (name == null)
|
||||||
|
throw new IllegalArgumentException();
|
||||||
|
fLookupPoint = name;
|
||||||
|
fLookupPointIsName= true;
|
||||||
|
fLookupKey= name.getLookupKey();
|
||||||
|
fResolve = resolve;
|
||||||
|
fPrefixLookup = prefixLookup;
|
||||||
|
fTu= name.getTranslationUnit();
|
||||||
|
}
|
||||||
|
|
||||||
|
public ScopeLookupData(char[] name, IASTNode point) {
|
||||||
|
// To support IScope.find(...) the lookup point may be null.
|
||||||
|
fLookupPoint= point;
|
||||||
|
fLookupPointIsName= false;
|
||||||
|
fLookupKey= name;
|
||||||
|
fIgnorePointOfDeclaration= true;
|
||||||
|
if (fLookupPoint == null) {
|
||||||
|
fTu= null;
|
||||||
|
fIgnorePointOfDeclaration= true;
|
||||||
|
} else {
|
||||||
|
fTu= fLookupPoint.getTranslationUnit();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setPrefixLookup(boolean prefixLookup) {
|
||||||
|
fPrefixLookup = prefixLookup;
|
||||||
|
}
|
||||||
|
public void setResolve(boolean resolve) {
|
||||||
|
fResolve = resolve;
|
||||||
|
}
|
||||||
|
public void setIgnorePointOfDeclaration(boolean ignorePointOfDeclaration) {
|
||||||
|
fIgnorePointOfDeclaration = ignorePointOfDeclaration;
|
||||||
|
}
|
||||||
|
public void setLookupKey(char[] key) {
|
||||||
|
fLookupKey= key;
|
||||||
|
}
|
||||||
|
public char[] getLookupKey() {
|
||||||
|
return fLookupKey;
|
||||||
|
}
|
||||||
|
public IASTNode getLookupPoint() {
|
||||||
|
return fLookupPoint;
|
||||||
|
}
|
||||||
|
public boolean isResolve() {
|
||||||
|
return fResolve;
|
||||||
|
}
|
||||||
|
public boolean isPrefixLookup() {
|
||||||
|
return fPrefixLookup;
|
||||||
|
}
|
||||||
|
public boolean isIgnorePointOfDeclaration() {
|
||||||
|
return fIgnorePointOfDeclaration;
|
||||||
|
}
|
||||||
|
public IIndexFileSet getIncludedFiles() {
|
||||||
|
return fTu == null ? IIndexFileSet.EMPTY : fTu.getIndexFileSet();
|
||||||
|
}
|
||||||
|
public IIndex getIndex() {
|
||||||
|
return fTu == null ? null : fTu.getIndex();
|
||||||
|
}
|
||||||
|
public IASTName getLookupName() {
|
||||||
|
return fLookupPointIsName ? (IASTName) fLookupPoint : null;
|
||||||
|
}
|
||||||
|
public IASTTranslationUnit getTranslationUnit() {
|
||||||
|
return fTu;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the bindings in this scope that the given name or prefix could resolve to. Could
|
* Get the bindings in this scope that the given name or prefix could resolve to. Could
|
||||||
* return null if there is no matching bindings in this scope, if the bindings have not
|
* return null if there is no matching bindings in this scope, if the bindings have not
|
||||||
* yet been cached in this scope, or if resolve == false and the appropriate bindings
|
* yet been cached in this scope, or if resolve == false and the appropriate bindings
|
||||||
* have not yet been resolved.
|
* have not yet been resolved.
|
||||||
*
|
*
|
||||||
* @param name
|
|
||||||
* @param resolve :
|
|
||||||
* whether or not to resolve the matching bindings if they have not
|
|
||||||
* been so already.
|
|
||||||
* @param prefixLookup whether the lookup is for a full name or a prefix
|
|
||||||
* @param acceptLocalBindings a set of files for which to accept local bindings.
|
|
||||||
* @return : the bindings in this scope that match the name or prefix, or null
|
* @return : the bindings in this scope that match the name or prefix, or null
|
||||||
|
* @since 5.5
|
||||||
*/
|
*/
|
||||||
public IBinding[] getBindings(IASTName name, boolean resolve, boolean prefixLookup, IIndexFileSet acceptLocalBindings);
|
public IBinding[] getBindings(ScopeLookupData lookup);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -19,7 +19,7 @@ import org.eclipse.cdt.core.dom.ast.IASTImplicitNameOwner;
|
||||||
* @noextend This interface is not intended to be extended by clients.
|
* @noextend This interface is not intended to be extended by clients.
|
||||||
* @noimplement This interface is not intended to be implemented by clients.
|
* @noimplement This interface is not intended to be implemented by clients.
|
||||||
*/
|
*/
|
||||||
public interface ICPPASTArraySubscriptExpression extends IASTArraySubscriptExpression, IASTImplicitNameOwner {
|
public interface ICPPASTArraySubscriptExpression extends IASTArraySubscriptExpression, ICPPASTExpression, IASTImplicitNameOwner {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public ICPPASTArraySubscriptExpression copy();
|
public ICPPASTArraySubscriptExpression copy();
|
||||||
|
@ -29,4 +29,16 @@ public interface ICPPASTArraySubscriptExpression extends IASTArraySubscriptExpre
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public ICPPASTArraySubscriptExpression copy(CopyStyle style);
|
public ICPPASTArraySubscriptExpression copy(CopyStyle style);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @since 5.5
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public ICPPASTExpression getArrayExpression();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @since 5.5
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public ICPPASTInitializerClause getArgument();
|
||||||
}
|
}
|
||||||
|
|
|
@ -21,7 +21,7 @@ import org.eclipse.cdt.core.dom.ast.IASTImplicitNameOwner;
|
||||||
* @noextend This interface is not intended to be extended by clients.
|
* @noextend This interface is not intended to be extended by clients.
|
||||||
* @noimplement This interface is not intended to be implemented by clients.
|
* @noimplement This interface is not intended to be implemented by clients.
|
||||||
*/
|
*/
|
||||||
public interface ICPPASTBinaryExpression extends IASTBinaryExpression, IASTImplicitNameOwner {
|
public interface ICPPASTBinaryExpression extends IASTBinaryExpression, ICPPASTExpression, IASTImplicitNameOwner {
|
||||||
/**
|
/**
|
||||||
* <code>op_pmdot</code> pointer-to-member field dereference.
|
* <code>op_pmdot</code> pointer-to-member field dereference.
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -18,7 +18,7 @@ import org.eclipse.cdt.core.dom.ast.IASTCastExpression;
|
||||||
* @noextend This interface is not intended to be extended by clients.
|
* @noextend This interface is not intended to be extended by clients.
|
||||||
* @noimplement This interface is not intended to be implemented by clients.
|
* @noimplement This interface is not intended to be implemented by clients.
|
||||||
*/
|
*/
|
||||||
public interface ICPPASTCastExpression extends IASTCastExpression {
|
public interface ICPPASTCastExpression extends IASTCastExpression, ICPPASTExpression {
|
||||||
/**
|
/**
|
||||||
* <code>op_dynamic_cast</code> is used for dynamic_cast<>'s.
|
* <code>op_dynamic_cast</code> is used for dynamic_cast<>'s.
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -21,7 +21,7 @@ import org.eclipse.cdt.core.dom.ast.IASTImplicitNameOwner;
|
||||||
* @noextend This interface is not intended to be extended by clients.
|
* @noextend This interface is not intended to be extended by clients.
|
||||||
* @noimplement This interface is not intended to be implemented by clients.
|
* @noimplement This interface is not intended to be implemented by clients.
|
||||||
*/
|
*/
|
||||||
public interface ICPPASTDeleteExpression extends IASTExpression, IASTImplicitNameOwner {
|
public interface ICPPASTDeleteExpression extends ICPPASTExpression, IASTImplicitNameOwner {
|
||||||
/**
|
/**
|
||||||
* <code>OPERAND</code> is the expression representing the pointer being
|
* <code>OPERAND</code> is the expression representing the pointer being
|
||||||
* deleted.
|
* deleted.
|
||||||
|
|
|
@ -0,0 +1,24 @@
|
||||||
|
/*******************************************************************************
|
||||||
|
* Copyright (c) 2012 Wind River Systems, Inc. and others.
|
||||||
|
* All rights reserved. This program and the accompanying materials
|
||||||
|
* are made available under the terms of the Eclipse Public License v1.0
|
||||||
|
* which accompanies this distribution, and is available at
|
||||||
|
* http://www.eclipse.org/legal/epl-v10.html
|
||||||
|
*
|
||||||
|
* Contributors:
|
||||||
|
* Markus Schorn - initial API and implementation
|
||||||
|
*******************************************************************************/
|
||||||
|
|
||||||
|
package org.eclipse.cdt.core.dom.ast.cpp;
|
||||||
|
|
||||||
|
import org.eclipse.cdt.core.dom.ast.IASTExpression;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Interface for c++ expressions.
|
||||||
|
* @noextend This interface is not intended to be extended by clients.
|
||||||
|
* @noimplement This interface is not intended to be implemented by clients.
|
||||||
|
* @since 5.5
|
||||||
|
*/
|
||||||
|
public interface ICPPASTExpression extends IASTExpression, ICPPASTInitializerClause {
|
||||||
|
|
||||||
|
}
|
|
@ -19,7 +19,7 @@ import org.eclipse.cdt.core.dom.ast.IASTImplicitNameOwner;
|
||||||
* @noextend This interface is not intended to be extended by clients.
|
* @noextend This interface is not intended to be extended by clients.
|
||||||
* @noimplement This interface is not intended to be implemented by clients.
|
* @noimplement This interface is not intended to be implemented by clients.
|
||||||
*/
|
*/
|
||||||
public interface ICPPASTExpressionList extends IASTExpressionList, IASTImplicitNameOwner {
|
public interface ICPPASTExpressionList extends IASTExpressionList, ICPPASTExpression, IASTImplicitNameOwner {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public ICPPASTExpressionList copy();
|
public ICPPASTExpressionList copy();
|
||||||
|
|
|
@ -22,7 +22,7 @@ import org.eclipse.cdt.core.dom.ast.IType;
|
||||||
* @noextend This interface is not intended to be extended by clients.
|
* @noextend This interface is not intended to be extended by clients.
|
||||||
* @noimplement This interface is not intended to be implemented by clients.
|
* @noimplement This interface is not intended to be implemented by clients.
|
||||||
*/
|
*/
|
||||||
public interface ICPPASTFieldReference extends IASTFieldReference, IASTImplicitNameOwner {
|
public interface ICPPASTFieldReference extends IASTFieldReference, ICPPASTExpression, IASTImplicitNameOwner {
|
||||||
/**
|
/**
|
||||||
* Was template keyword used?
|
* Was template keyword used?
|
||||||
*/
|
*/
|
||||||
|
@ -52,4 +52,10 @@ public interface ICPPASTFieldReference extends IASTFieldReference, IASTImplicitN
|
||||||
* @since 5.4
|
* @since 5.4
|
||||||
*/
|
*/
|
||||||
public IType getFieldOwnerType();
|
public IType getFieldOwnerType();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @since 5.5
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public ICPPASTExpression getFieldOwner();
|
||||||
}
|
}
|
||||||
|
|
|
@ -19,7 +19,7 @@ import org.eclipse.cdt.core.dom.ast.IASTImplicitNameOwner;
|
||||||
* @noextend This interface is not intended to be extended by clients.
|
* @noextend This interface is not intended to be extended by clients.
|
||||||
* @noimplement This interface is not intended to be implemented by clients.
|
* @noimplement This interface is not intended to be implemented by clients.
|
||||||
*/
|
*/
|
||||||
public interface ICPPASTFunctionCallExpression extends IASTFunctionCallExpression, IASTImplicitNameOwner {
|
public interface ICPPASTFunctionCallExpression extends IASTFunctionCallExpression, ICPPASTExpression, IASTImplicitNameOwner {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
ICPPASTFunctionCallExpression copy();
|
ICPPASTFunctionCallExpression copy();
|
||||||
|
|
|
@ -0,0 +1,30 @@
|
||||||
|
/*******************************************************************************
|
||||||
|
* Copyright (c) 2012 Wind River Systems, Inc. and others.
|
||||||
|
* All rights reserved. This program and the accompanying materials
|
||||||
|
* are made available under the terms of the Eclipse Public License v1.0
|
||||||
|
* which accompanies this distribution, and is available at
|
||||||
|
* http://www.eclipse.org/legal/epl-v10.html
|
||||||
|
*
|
||||||
|
* Contributors:
|
||||||
|
* Markus Schorn - initial API and implementation
|
||||||
|
*******************************************************************************/
|
||||||
|
|
||||||
|
package org.eclipse.cdt.core.dom.ast.cpp;
|
||||||
|
|
||||||
|
import org.eclipse.cdt.core.dom.ast.IASTInitializerClause;
|
||||||
|
import org.eclipse.cdt.internal.core.dom.parser.cpp.ICPPEvaluation;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* C++ specific initializer clause
|
||||||
|
* @noextend This interface is not intended to be extended by clients.
|
||||||
|
* @noimplement This interface is not intended to be implemented by clients.
|
||||||
|
* @since 5.5
|
||||||
|
*/
|
||||||
|
public interface ICPPASTInitializerClause extends IASTInitializerClause {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns the evaluation object for this expression.
|
||||||
|
* @noreference This method is not intended to be referenced by clients.
|
||||||
|
*/
|
||||||
|
ICPPEvaluation getEvaluation();
|
||||||
|
}
|
|
@ -19,7 +19,7 @@ import org.eclipse.cdt.core.dom.ast.IASTInitializerList;
|
||||||
* @noextend This interface is not intended to be extended by clients.
|
* @noextend This interface is not intended to be extended by clients.
|
||||||
* @noimplement This interface is not intended to be implemented by clients.
|
* @noimplement This interface is not intended to be implemented by clients.
|
||||||
*/
|
*/
|
||||||
public interface ICPPASTInitializerList extends IASTInitializerList, ICPPASTPackExpandable {
|
public interface ICPPASTInitializerList extends IASTInitializerList, ICPPASTInitializerClause, ICPPASTPackExpandable {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
ICPPASTInitializerList copy();
|
ICPPASTInitializerList copy();
|
||||||
|
|
|
@ -12,7 +12,6 @@ package org.eclipse.cdt.core.dom.ast.cpp;
|
||||||
|
|
||||||
import org.eclipse.cdt.core.dom.ast.ASTNodeProperty;
|
import org.eclipse.cdt.core.dom.ast.ASTNodeProperty;
|
||||||
import org.eclipse.cdt.core.dom.ast.IASTCompoundStatement;
|
import org.eclipse.cdt.core.dom.ast.IASTCompoundStatement;
|
||||||
import org.eclipse.cdt.core.dom.ast.IASTExpression;
|
|
||||||
import org.eclipse.cdt.core.dom.ast.IASTImplicitName;
|
import org.eclipse.cdt.core.dom.ast.IASTImplicitName;
|
||||||
import org.eclipse.cdt.core.dom.ast.IASTImplicitNameOwner;
|
import org.eclipse.cdt.core.dom.ast.IASTImplicitNameOwner;
|
||||||
|
|
||||||
|
@ -23,7 +22,7 @@ import org.eclipse.cdt.core.dom.ast.IASTImplicitNameOwner;
|
||||||
* @noextend This interface is not intended to be extended by clients.
|
* @noextend This interface is not intended to be extended by clients.
|
||||||
* @noimplement This interface is not intended to be implemented by clients.
|
* @noimplement This interface is not intended to be implemented by clients.
|
||||||
*/
|
*/
|
||||||
public interface ICPPASTLambdaExpression extends IASTExpression, IASTImplicitNameOwner {
|
public interface ICPPASTLambdaExpression extends ICPPASTExpression, IASTImplicitNameOwner {
|
||||||
ASTNodeProperty CAPTURE = new ASTNodeProperty("ICPPASTLambdaExpression - CAPTURE [ICPPASTCapture]"); //$NON-NLS-1$
|
ASTNodeProperty CAPTURE = new ASTNodeProperty("ICPPASTLambdaExpression - CAPTURE [ICPPASTCapture]"); //$NON-NLS-1$
|
||||||
ASTNodeProperty DECLARATOR = new ASTNodeProperty("ICPPASTLambdaExpression - DECLARATOR [ICPPASTFunctionDeclarator]"); //$NON-NLS-1$
|
ASTNodeProperty DECLARATOR = new ASTNodeProperty("ICPPASTLambdaExpression - DECLARATOR [ICPPASTFunctionDeclarator]"); //$NON-NLS-1$
|
||||||
ASTNodeProperty BODY = new ASTNodeProperty("ICPPASTLambdaExpression - BODY [IASTCompoundStatement]"); //$NON-NLS-1$
|
ASTNodeProperty BODY = new ASTNodeProperty("ICPPASTLambdaExpression - BODY [IASTCompoundStatement]"); //$NON-NLS-1$
|
||||||
|
|
|
@ -18,7 +18,7 @@ import org.eclipse.cdt.core.dom.ast.IASTLiteralExpression;
|
||||||
* @noextend This interface is not intended to be extended by clients.
|
* @noextend This interface is not intended to be extended by clients.
|
||||||
* @noimplement This interface is not intended to be implemented by clients.
|
* @noimplement This interface is not intended to be implemented by clients.
|
||||||
*/
|
*/
|
||||||
public interface ICPPASTLiteralExpression extends IASTLiteralExpression {
|
public interface ICPPASTLiteralExpression extends IASTLiteralExpression, ICPPASTExpression {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <code>lk_this</code> represents the 'this' keyword.
|
* <code>lk_this</code> represents the 'this' keyword.
|
||||||
|
|
|
@ -25,7 +25,7 @@ import org.eclipse.cdt.core.dom.ast.IASTTypeId;
|
||||||
* @noextend This interface is not intended to be extended by clients.
|
* @noextend This interface is not intended to be extended by clients.
|
||||||
* @noimplement This interface is not intended to be implemented by clients.
|
* @noimplement This interface is not intended to be implemented by clients.
|
||||||
*/
|
*/
|
||||||
public interface ICPPASTNewExpression extends IASTExpression, IASTImplicitNameOwner {
|
public interface ICPPASTNewExpression extends ICPPASTExpression, IASTImplicitNameOwner {
|
||||||
public static final ASTNodeProperty NEW_PLACEMENT = new ASTNodeProperty(
|
public static final ASTNodeProperty NEW_PLACEMENT = new ASTNodeProperty(
|
||||||
"ICPPASTNewExpression.NEW_PLACEMENT [IASTExpression]"); //$NON-NLS-1$
|
"ICPPASTNewExpression.NEW_PLACEMENT [IASTExpression]"); //$NON-NLS-1$
|
||||||
|
|
||||||
|
|
|
@ -21,7 +21,7 @@ import org.eclipse.cdt.core.dom.ast.IASTExpression;
|
||||||
* @noimplement This interface is not intended to be implemented by clients.
|
* @noimplement This interface is not intended to be implemented by clients.
|
||||||
* @since 5.2
|
* @since 5.2
|
||||||
*/
|
*/
|
||||||
public interface ICPPASTPackExpansionExpression extends IASTExpression {
|
public interface ICPPASTPackExpansionExpression extends ICPPASTExpression {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Represents the relationship between a pack-expansion and its pattern.
|
* Represents the relationship between a pack-expansion and its pattern.
|
||||||
|
|
|
@ -25,7 +25,7 @@ import org.eclipse.cdt.core.dom.ast.IASTInitializer;
|
||||||
* @noextend This interface is not intended to be extended by clients.
|
* @noextend This interface is not intended to be extended by clients.
|
||||||
* @noimplement This interface is not intended to be implemented by clients.
|
* @noimplement This interface is not intended to be implemented by clients.
|
||||||
*/
|
*/
|
||||||
public interface ICPPASTSimpleTypeConstructorExpression extends IASTExpression {
|
public interface ICPPASTSimpleTypeConstructorExpression extends ICPPASTExpression {
|
||||||
/**
|
/**
|
||||||
* @since 5.2
|
* @since 5.2
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -17,7 +17,7 @@ import org.eclipse.cdt.core.dom.ast.IASTTypeIdExpression;
|
||||||
* @noextend This interface is not intended to be extended by clients.
|
* @noextend This interface is not intended to be extended by clients.
|
||||||
* @noimplement This interface is not intended to be implemented by clients.
|
* @noimplement This interface is not intended to be implemented by clients.
|
||||||
*/
|
*/
|
||||||
public interface ICPPASTTypeIdExpression extends IASTTypeIdExpression {
|
public interface ICPPASTTypeIdExpression extends IASTTypeIdExpression, ICPPASTExpression {
|
||||||
|
|
||||||
public static final int op_typeid = IASTTypeIdExpression.op_typeid;
|
public static final int op_typeid = IASTTypeIdExpression.op_typeid;
|
||||||
|
|
||||||
|
|
|
@ -19,7 +19,7 @@ import org.eclipse.cdt.core.dom.ast.IASTUnaryExpression;
|
||||||
* @noextend This interface is not intended to be extended by clients.
|
* @noextend This interface is not intended to be extended by clients.
|
||||||
* @noimplement This interface is not intended to be implemented by clients.
|
* @noimplement This interface is not intended to be implemented by clients.
|
||||||
*/
|
*/
|
||||||
public interface ICPPASTUnaryExpression extends IASTUnaryExpression, IASTImplicitNameOwner {
|
public interface ICPPASTUnaryExpression extends IASTUnaryExpression, ICPPASTExpression, IASTImplicitNameOwner {
|
||||||
/**
|
/**
|
||||||
* <code>op_throw</code> throw exp
|
* <code>op_throw</code> throw exp
|
||||||
*/
|
*/
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Reference in a new issue