mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-29 19:45:01 +02:00
Merge branch 'cdt_8_0' of ssh://rarohrba@git.eclipse.org/gitroot/cdt/org.eclipse.cdt.git into cdt_8_0
This commit is contained in:
commit
decd827478
62 changed files with 405 additions and 213 deletions
|
@ -11,6 +11,6 @@
|
||||||
<relativePath>../../pom.xml</relativePath>
|
<relativePath>../../pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<artifactId>org.eclipse.cdt.gnu.build-feature</artifactId>
|
<artifactId>org.eclipse.cdt.gnu.build</artifactId>
|
||||||
<packaging>eclipse-feature</packaging>
|
<packaging>eclipse-feature</packaging>
|
||||||
</project>
|
</project>
|
||||||
|
|
17
build/org.eclipse.cdt.gnu.build.source-feature/.project
Normal file
17
build/org.eclipse.cdt.gnu.build.source-feature/.project
Normal file
|
@ -0,0 +1,17 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<projectDescription>
|
||||||
|
<name>org.eclipse.cdt.gnu.build.source-feature</name>
|
||||||
|
<comment></comment>
|
||||||
|
<projects>
|
||||||
|
</projects>
|
||||||
|
<buildSpec>
|
||||||
|
<buildCommand>
|
||||||
|
<name>org.eclipse.pde.FeatureBuilder</name>
|
||||||
|
<arguments>
|
||||||
|
</arguments>
|
||||||
|
</buildCommand>
|
||||||
|
</buildSpec>
|
||||||
|
<natures>
|
||||||
|
<nature>org.eclipse.pde.FeatureNature</nature>
|
||||||
|
</natures>
|
||||||
|
</projectDescription>
|
|
@ -11,6 +11,6 @@
|
||||||
<relativePath>../../pom.xml</relativePath>
|
<relativePath>../../pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<artifactId>org.eclipse.cdt.gnu.build.source-feature</artifactId>
|
<artifactId>org.eclipse.cdt.gnu.build.source</artifactId>
|
||||||
<packaging>eclipse-feature</packaging>
|
<packaging>eclipse-feature</packaging>
|
||||||
</project>
|
</project>
|
||||||
|
|
|
@ -52,7 +52,7 @@ problem.name.FormatString = Format String Vulnerability
|
||||||
checker.name.AssignmentToItself = Assignment to itself
|
checker.name.AssignmentToItself = Assignment to itself
|
||||||
problem.messagePattern.AssignmentToItself = Assignment to itself ''{0}''
|
problem.messagePattern.AssignmentToItself = Assignment to itself ''{0}''
|
||||||
problem.name.AssignmentToItself = Assignment to itself
|
problem.name.AssignmentToItself = Assignment to itself
|
||||||
problem.description.AssignmentToItself = Finds expression where left and right side of the assignment is the same, i.e. 'var = var'
|
problem.description.AssignmentToItself = Finds expression where left and right sides of the assignment are the same, i.e. 'var = var'
|
||||||
checker.name.ReturnStyle = Return with parenthesis
|
checker.name.ReturnStyle = Return with parenthesis
|
||||||
problem.name.ReturnStyle = Return with parenthesis
|
problem.name.ReturnStyle = Return with parenthesis
|
||||||
problem.messagePattern.ReturnStyle = Return statement has invalid style. Return value should be surrounded by parenthesis
|
problem.messagePattern.ReturnStyle = Return statement has invalid style. Return value should be surrounded by parenthesis
|
||||||
|
@ -60,10 +60,10 @@ problem.description.ReturnStyle = Checks for return statements that do no return
|
||||||
checker.name.SuspiciousSemicolon = Suspicious semicolon
|
checker.name.SuspiciousSemicolon = Suspicious semicolon
|
||||||
problem.name.SuspiciousSemicolon = Suspicious semicolon
|
problem.name.SuspiciousSemicolon = Suspicious semicolon
|
||||||
problem.messagePattern.SuspiciousSemicolon = Suspicious semicolon
|
problem.messagePattern.SuspiciousSemicolon = Suspicious semicolon
|
||||||
problem.description.SuspiciousSemicolon = A semicolon is used as a null statement in a condition. For example, 'if(expression);'
|
problem.description.SuspiciousSemicolon = A semicolon is used as a null statement in a condition. For example, 'if (expression);'
|
||||||
checker.name.CaseBreak = No break at end of case
|
checker.name.CaseBreak = No break at end of case
|
||||||
problem.description.CaseBreak = Looks for "case" statements which end without a "break" statement
|
problem.description.CaseBreak = Looks for "case" statements which end without a "break" statement
|
||||||
problem.messagePattern.CaseBreak = No break at the end of this case
|
problem.messagePattern.CaseBreak = No break at the end of case
|
||||||
binding.checker.name = Problem Binding Checker
|
binding.checker.name = Problem Binding Checker
|
||||||
problem.description.G = Name resolution problem found by the indexer
|
problem.description.G = Name resolution problem found by the indexer
|
||||||
problem.messagePattern.G = Symbol ''{0}'' could not be resolved
|
problem.messagePattern.G = Symbol ''{0}'' could not be resolved
|
||||||
|
|
|
@ -7,6 +7,7 @@
|
||||||
*
|
*
|
||||||
* Contributors:
|
* Contributors:
|
||||||
* Anton Gorenkov - initial implementation
|
* Anton Gorenkov - initial implementation
|
||||||
|
* Sergey Prigogin (Google)
|
||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
package org.eclipse.cdt.codan.internal.checkers;
|
package org.eclipse.cdt.codan.internal.checkers;
|
||||||
|
|
||||||
|
@ -30,6 +31,7 @@ import org.eclipse.cdt.core.dom.ast.IASTParameterDeclaration;
|
||||||
import org.eclipse.cdt.core.dom.ast.IASTSimpleDeclaration;
|
import org.eclipse.cdt.core.dom.ast.IASTSimpleDeclaration;
|
||||||
import org.eclipse.cdt.core.dom.ast.IASTTranslationUnit;
|
import org.eclipse.cdt.core.dom.ast.IASTTranslationUnit;
|
||||||
import org.eclipse.cdt.core.dom.ast.IBinding;
|
import org.eclipse.cdt.core.dom.ast.IBinding;
|
||||||
|
import org.eclipse.cdt.core.dom.ast.IProblemBinding;
|
||||||
import org.eclipse.cdt.core.dom.ast.IType;
|
import org.eclipse.cdt.core.dom.ast.IType;
|
||||||
import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTFunctionCallExpression;
|
import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTFunctionCallExpression;
|
||||||
import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTNamedTypeSpecifier;
|
import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTNamedTypeSpecifier;
|
||||||
|
@ -179,12 +181,14 @@ public class AbstractClassInstantiationChecker extends AbstractIndexAstChecker {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Checks whether specified type (class or typedef to the class) is abstract class.
|
* Checks whether specified type (class or typedef to the class) is an abstract class.
|
||||||
* If it is - reports violations on each pure virtual method
|
* If it is, reports violations on each pure virtual method
|
||||||
*/
|
*/
|
||||||
private void reportProblemsIfAbstract(IType typeToCheck, IASTNode problemNode ) {
|
private void reportProblemsIfAbstract(IType typeToCheck, IASTNode problemNode ) {
|
||||||
IType unwindedType = CxxAstUtils.getInstance().unwindTypedef(typeToCheck);
|
IType unwindedType = CxxAstUtils.getInstance().unwindTypedef(typeToCheck);
|
||||||
if (unwindedType instanceof ICPPClassType) {
|
if (!(unwindedType instanceof ICPPClassType) || unwindedType instanceof IProblemBinding) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
ICPPClassType classType = (ICPPClassType) unwindedType;
|
ICPPClassType classType = (ICPPClassType) unwindedType;
|
||||||
ICPPMethod[] pureVirtualMethods = pureVirtualMethodsCache.get(classType);
|
ICPPMethod[] pureVirtualMethods = pureVirtualMethodsCache.get(classType);
|
||||||
if (pureVirtualMethods == null) {
|
if (pureVirtualMethods == null) {
|
||||||
|
@ -197,5 +201,4 @@ public class AbstractClassInstantiationChecker extends AbstractIndexAstChecker {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
* Copyright (c) 2010,2011 Gil Barash
|
* Copyright (c) 2010, 2011 Gil Barash
|
||||||
* 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:
|
||||||
* Gil Barash - Initial implementation
|
* Gil Barash - Initial implementation
|
||||||
* Elena laskavaia - Rewrote checker to reduce false positives in complex cases
|
* Elena laskavaia - Rewrote checker to reduce false positives in complex cases
|
||||||
|
* Sergey Prigogin (Google)
|
||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
package org.eclipse.cdt.codan.internal.checkers;
|
package org.eclipse.cdt.codan.internal.checkers;
|
||||||
|
|
||||||
|
@ -50,8 +51,7 @@ public class CaseBreakChecker extends AbstractIndexAstChecker implements IChecke
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This visitor looks for "switch" statements and invokes "SwitchVisitor" on
|
* This visitor looks for "switch" statements and invokes "SwitchVisitor" on them.
|
||||||
* them.
|
|
||||||
*/
|
*/
|
||||||
class SwitchFindingVisitor extends ASTVisitor {
|
class SwitchFindingVisitor extends ASTVisitor {
|
||||||
SwitchFindingVisitor() {
|
SwitchFindingVisitor() {
|
||||||
|
@ -67,7 +67,7 @@ public class CaseBreakChecker extends AbstractIndexAstChecker implements IChecke
|
||||||
* - "continue"
|
* - "continue"
|
||||||
* - "goto" (does not check that the goto actually exists the
|
* - "goto" (does not check that the goto actually exists the
|
||||||
* switch)
|
* switch)
|
||||||
* - "thorw"
|
* - "throw"
|
||||||
* - "exit"
|
* - "exit"
|
||||||
*/
|
*/
|
||||||
protected boolean isBreakOrExitStatement(IASTStatement statement) {
|
protected boolean isBreakOrExitStatement(IASTStatement statement) {
|
||||||
|
@ -83,7 +83,7 @@ public class CaseBreakChecker extends AbstractIndexAstChecker implements IChecke
|
||||||
IASTSwitchStatement switchStmt = (IASTSwitchStatement) statement;
|
IASTSwitchStatement switchStmt = (IASTSwitchStatement) statement;
|
||||||
IASTStatement body = switchStmt.getBody();
|
IASTStatement body = switchStmt.getBody();
|
||||||
if (body instanceof IASTCompoundStatement) {
|
if (body instanceof IASTCompoundStatement) {
|
||||||
// if not it is not really a switch
|
// If not it is not really a switch
|
||||||
IASTStatement[] statements = ((IASTCompoundStatement) body).getStatements();
|
IASTStatement[] statements = ((IASTCompoundStatement) body).getStatements();
|
||||||
IASTStatement prevCase = null;
|
IASTStatement prevCase = null;
|
||||||
for (int i = 0; i < statements.length; i++) {
|
for (int i = 0; i < statements.length; i++) {
|
||||||
|
@ -97,16 +97,16 @@ public class CaseBreakChecker extends AbstractIndexAstChecker implements IChecke
|
||||||
if (isCaseStatement(curr)) {
|
if (isCaseStatement(curr)) {
|
||||||
prevCase = curr;
|
prevCase = curr;
|
||||||
}
|
}
|
||||||
// next is case or end of switch - means this one is the last
|
// Next is case or end of switch - means this one is the last
|
||||||
if (prevCase != null && (isCaseStatement(next) || next == null)) {
|
if (prevCase != null && (isCaseStatement(next) || next == null)) {
|
||||||
// check that current statement end with break or any other exit statement
|
// Check that current statement end with break or any other exit statement
|
||||||
if (!_checkEmptyCase && isCaseStatement(curr) && next != null) {
|
if (!_checkEmptyCase && isCaseStatement(curr) && next != null) {
|
||||||
continue; // empty case & we don't care
|
continue; // Empty case and we don't care
|
||||||
}
|
}
|
||||||
if (!_checkLastCase && next == null) {
|
if (!_checkLastCase && next == null) {
|
||||||
continue; // last case and we don't care
|
continue; // Last case and we don't care
|
||||||
}
|
}
|
||||||
if (isFallThroughStamement(curr)) {
|
if (!isProducedByMacroExpansion(prevCase) && isFallThroughStamement(curr)) {
|
||||||
IASTComment comment = null;
|
IASTComment comment = null;
|
||||||
if (next != null) {
|
if (next != null) {
|
||||||
comment = getLeadingComment(next);
|
comment = getLeadingComment(next);
|
||||||
|
@ -139,7 +139,7 @@ public class CaseBreakChecker extends AbstractIndexAstChecker implements IChecke
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param nextstatement
|
* @param body
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
public boolean isFallThroughStamement(IASTStatement body) {
|
public boolean isFallThroughStamement(IASTStatement body) {
|
||||||
|
@ -171,13 +171,11 @@ public class CaseBreakChecker extends AbstractIndexAstChecker implements IChecke
|
||||||
IASTFileLocation astLocation = astNode.getFileLocation();
|
IASTFileLocation astLocation = astNode.getFileLocation();
|
||||||
int line = astLocation.getEndingLineNumber();
|
int line = astLocation.getEndingLineNumber();
|
||||||
IProblemLocationFactory locFactory = getRuntime().getProblemLocationFactory();
|
IProblemLocationFactory locFactory = getRuntime().getProblemLocationFactory();
|
||||||
return locFactory.createProblemLocation(getFile(), -1,
|
return locFactory.createProblemLocation(getFile(), -1, -1, line);
|
||||||
-1, line);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Checks if the given statement is a result of macro expansion with a
|
* Checks if the given statement is a result of macro expansion with a possible
|
||||||
* possible
|
|
||||||
* exception for the trailing semicolon.
|
* exception for the trailing semicolon.
|
||||||
*
|
*
|
||||||
* @param statement the statement to check.
|
* @param statement the statement to check.
|
||||||
|
|
|
@ -9,17 +9,17 @@
|
||||||
# Alena Laskavaia - initial API and implementation
|
# Alena Laskavaia - initial API and implementation
|
||||||
###############################################################################
|
###############################################################################
|
||||||
CaseBreakChecker_DefaultNoBreakCommentDescription=Comment text to suppress the problem:
|
CaseBreakChecker_DefaultNoBreakCommentDescription=Comment text to suppress the problem:
|
||||||
CaseBreakChecker_EmptyCaseDescription=Check also empty case statement (except if last)
|
CaseBreakChecker_EmptyCaseDescription=Check also empty 'case' statement (except if last)
|
||||||
CaseBreakChecker_LastCaseDescription=Check also the last case statement
|
CaseBreakChecker_LastCaseDescription=Check also the last 'case' statement
|
||||||
CatchByReference_ReportForUnknownType=Report a problem if type cannot be resolved
|
CatchByReference_ReportForUnknownType=Report a problem if type cannot be resolved
|
||||||
NamingConventionFunctionChecker_LabelNamePattern=Name Pattern
|
NamingConventionFunctionChecker_LabelNamePattern=Name Pattern
|
||||||
NamingConventionFunctionChecker_ParameterMethods=Also check C++ method names
|
NamingConventionFunctionChecker_ParameterMethods=Also check C++ method names
|
||||||
ReturnChecker_Param0=Also check functions with implicit return value
|
ReturnChecker_Param0=Also check functions with implicit return value
|
||||||
GenericParameter_ParameterExceptions=Exceptions (value of the problem argument)
|
GenericParameter_ParameterExceptions=Exceptions (value of the problem argument)
|
||||||
GenericParameter_ParameterExceptionsItem=Value of the argument
|
GenericParameter_ParameterExceptionsItem=Value of the argument
|
||||||
StatementHasNoEffectChecker_ParameterMacro=Report problem in statements that comes from macro expansion
|
StatementHasNoEffectChecker_ParameterMacro=Report problem in statements that come from macro expansion
|
||||||
SuggestedParenthesisChecker_SuggestParanthesesAroundNot=Suggest parenthesis around not operator
|
SuggestedParenthesisChecker_SuggestParanthesesAroundNot=Suggest parenthesis around 'not' operator
|
||||||
SuspiciousSemicolonChecker_ParamAfterElse=Report an error if semicolon is right after else statement
|
SuspiciousSemicolonChecker_ParamAfterElse=Report an error if semicolon is right after 'else' statement
|
||||||
SuspiciousSemicolonChecker_ParamElse=Do not report an error after 'if' when 'else' exists
|
SuspiciousSemicolonChecker_ParamElse=Do not report an error after 'if' when 'else' exists
|
||||||
|
|
||||||
ProblemBindingChecker_Candidates=Candidates are:
|
ProblemBindingChecker_Candidates=Candidates are:
|
||||||
|
|
|
@ -57,9 +57,7 @@ public class StatementHasNoEffectChecker extends AbstractIndexAstChecker {
|
||||||
if (stmt instanceof IASTExpressionStatement) {
|
if (stmt instanceof IASTExpressionStatement) {
|
||||||
IASTExpression expression = ((IASTExpressionStatement) stmt).getExpression();
|
IASTExpression expression = ((IASTExpressionStatement) stmt).getExpression();
|
||||||
if (hasNoEffect(expression)) {
|
if (hasNoEffect(expression)) {
|
||||||
boolean inMacro = CxxAstUtils.getInstance().isInMacro(expression);
|
if (!shouldReportInMacro() && CxxAstUtils.isInMacro(expression))
|
||||||
boolean shouldReportInMacro = shouldReportInMacro();
|
|
||||||
if (inMacro && !shouldReportInMacro)
|
|
||||||
return PROCESS_SKIP;
|
return PROCESS_SKIP;
|
||||||
String arg = expression.getRawSignature();
|
String arg = expression.getRawSignature();
|
||||||
if (!isFilteredArg(arg))
|
if (!isFilteredArg(arg))
|
||||||
|
|
|
@ -7,6 +7,7 @@
|
||||||
*
|
*
|
||||||
* Contributors:
|
* Contributors:
|
||||||
* Andrew Gvozdev - initial API and implementation
|
* Andrew Gvozdev - initial API and implementation
|
||||||
|
* Sergey Prigogin (Google)
|
||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
package org.eclipse.cdt.codan.internal.checkers;
|
package org.eclipse.cdt.codan.internal.checkers;
|
||||||
|
|
||||||
|
@ -18,6 +19,7 @@ import java.util.Map;
|
||||||
import java.util.Map.Entry;
|
import java.util.Map.Entry;
|
||||||
|
|
||||||
import org.eclipse.cdt.codan.checkers.CodanCheckersActivator;
|
import org.eclipse.cdt.codan.checkers.CodanCheckersActivator;
|
||||||
|
import org.eclipse.cdt.codan.core.cxx.CxxAstUtils;
|
||||||
import org.eclipse.cdt.codan.core.cxx.model.AbstractIndexAstChecker;
|
import org.eclipse.cdt.codan.core.cxx.model.AbstractIndexAstChecker;
|
||||||
import org.eclipse.cdt.codan.core.model.IProblem;
|
import org.eclipse.cdt.codan.core.model.IProblem;
|
||||||
import org.eclipse.cdt.codan.core.model.IProblemWorkingCopy;
|
import org.eclipse.cdt.codan.core.model.IProblemWorkingCopy;
|
||||||
|
@ -54,6 +56,7 @@ public class UnusedSymbolInFileScopeChecker extends AbstractIndexAstChecker {
|
||||||
public static final String ER_UNUSED_VARIABLE_DECLARATION_ID = "org.eclipse.cdt.codan.internal.checkers.UnusedVariableDeclarationProblem"; //$NON-NLS-1$
|
public static final String ER_UNUSED_VARIABLE_DECLARATION_ID = "org.eclipse.cdt.codan.internal.checkers.UnusedVariableDeclarationProblem"; //$NON-NLS-1$
|
||||||
public static final String ER_UNUSED_FUNCTION_DECLARATION_ID = "org.eclipse.cdt.codan.internal.checkers.UnusedFunctionDeclarationProblem"; //$NON-NLS-1$
|
public static final String ER_UNUSED_FUNCTION_DECLARATION_ID = "org.eclipse.cdt.codan.internal.checkers.UnusedFunctionDeclarationProblem"; //$NON-NLS-1$
|
||||||
public static final String ER_UNUSED_STATIC_FUNCTION_ID = "org.eclipse.cdt.codan.internal.checkers.UnusedStaticFunctionProblem"; //$NON-NLS-1$
|
public static final String ER_UNUSED_STATIC_FUNCTION_ID = "org.eclipse.cdt.codan.internal.checkers.UnusedStaticFunctionProblem"; //$NON-NLS-1$
|
||||||
|
public static final String PARAM_MACRO_ID = "macro"; //$NON-NLS-1$
|
||||||
public static final String PARAM_EXCEPT_ARG_LIST = "exceptions"; //$NON-NLS-1$
|
public static final String PARAM_EXCEPT_ARG_LIST = "exceptions"; //$NON-NLS-1$
|
||||||
|
|
||||||
private Map<IBinding, IASTDeclarator> externFunctionDeclarations = new HashMap<IBinding, IASTDeclarator>();
|
private Map<IBinding, IASTDeclarator> externFunctionDeclarations = new HashMap<IBinding, IASTDeclarator>();
|
||||||
|
@ -71,6 +74,7 @@ public class UnusedSymbolInFileScopeChecker extends AbstractIndexAstChecker {
|
||||||
@Override
|
@Override
|
||||||
public void initPreferences(IProblemWorkingCopy problem) {
|
public void initPreferences(IProblemWorkingCopy problem) {
|
||||||
super.initPreferences(problem);
|
super.initPreferences(problem);
|
||||||
|
addPreference(problem, PARAM_MACRO_ID, CheckersMessages.StatementHasNoEffectChecker_ParameterMacro, Boolean.TRUE);
|
||||||
if (problem.getId().equals(ER_UNUSED_VARIABLE_DECLARATION_ID)) {
|
if (problem.getId().equals(ER_UNUSED_VARIABLE_DECLARATION_ID)) {
|
||||||
unusedVariableProblem = problem;
|
unusedVariableProblem = problem;
|
||||||
ListProblemPreference pref = addListPreference(problem, PARAM_EXCEPT_ARG_LIST,
|
ListProblemPreference pref = addListPreference(problem, PARAM_EXCEPT_ARG_LIST,
|
||||||
|
@ -90,11 +94,11 @@ public class UnusedSymbolInFileScopeChecker extends AbstractIndexAstChecker {
|
||||||
}
|
}
|
||||||
|
|
||||||
private boolean isAnyCandidate() {
|
private boolean isAnyCandidate() {
|
||||||
return externFunctionDeclarations.size() > 0 ||
|
return !externFunctionDeclarations.isEmpty() ||
|
||||||
staticFunctionDeclarations.size() > 0 ||
|
!staticFunctionDeclarations.isEmpty() ||
|
||||||
staticFunctionDefinitions.size() > 0 ||
|
!staticFunctionDefinitions.isEmpty() ||
|
||||||
externVariableDeclarations.size() > 0 ||
|
!externVariableDeclarations.isEmpty() ||
|
||||||
staticVariableDeclarations.size() > 0;
|
!staticVariableDeclarations.isEmpty();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void processAst(IASTTranslationUnit ast) {
|
public void processAst(IASTTranslationUnit ast) {
|
||||||
|
@ -131,23 +135,31 @@ public class UnusedSymbolInFileScopeChecker extends AbstractIndexAstChecker {
|
||||||
int storageClass = simpleDeclaration.getDeclSpecifier().getStorageClass();
|
int storageClass = simpleDeclaration.getDeclSpecifier().getStorageClass();
|
||||||
|
|
||||||
if (binding instanceof IFunction) {
|
if (binding instanceof IFunction) {
|
||||||
if (storageClass == IASTDeclSpecifier.sc_extern || storageClass == IASTDeclSpecifier.sc_unspecified) {
|
if (storageClass == IASTDeclSpecifier.sc_extern ||
|
||||||
|
storageClass == IASTDeclSpecifier.sc_unspecified) {
|
||||||
|
if (shouldReportInMacro(ER_UNUSED_FUNCTION_DECLARATION_ID) ||
|
||||||
|
!CxxAstUtils.isInMacro(astName)) {
|
||||||
externFunctionDeclarations.put(binding, decl);
|
externFunctionDeclarations.put(binding, decl);
|
||||||
|
}
|
||||||
} else if (storageClass == IASTDeclSpecifier.sc_static) {
|
} else if (storageClass == IASTDeclSpecifier.sc_static) {
|
||||||
|
if (shouldReportInMacro(ER_UNUSED_STATIC_FUNCTION_ID) ||
|
||||||
|
!CxxAstUtils.isInMacro(astName)) {
|
||||||
staticFunctionDeclarations.put(binding, decl);
|
staticFunctionDeclarations.put(binding, decl);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
} else if (binding instanceof IVariable) {
|
} else if (binding instanceof IVariable) {
|
||||||
|
if (shouldReportInMacro(ER_UNUSED_VARIABLE_DECLARATION_ID) ||
|
||||||
|
!CxxAstUtils.isInMacro(astName)) {
|
||||||
if (storageClass == IASTDeclSpecifier.sc_extern) {
|
if (storageClass == IASTDeclSpecifier.sc_extern) {
|
||||||
IASTInitializer initializer = decl.getInitializer();
|
// Initializer makes "extern" declaration to become definition do not count these
|
||||||
// initializer makes "extern" declaration to become definition do not count these
|
if (decl.getInitializer() == null) {
|
||||||
if (initializer==null) {
|
|
||||||
externVariableDeclarations.put(binding, decl);
|
externVariableDeclarations.put(binding, decl);
|
||||||
}
|
}
|
||||||
} else if (storageClass == IASTDeclSpecifier.sc_static) {
|
} else if (storageClass == IASTDeclSpecifier.sc_static) {
|
||||||
IType type = ((IVariable) binding).getType();
|
IType type = ((IVariable) binding).getType();
|
||||||
// account for class constructor and avoid possible false positive
|
// Account for class constructor and avoid possible false positive
|
||||||
if (!(type instanceof ICPPClassType) && !(type instanceof IProblemType)) {
|
if (!(type instanceof ICPPClassType) && !(type instanceof IProblemType)) {
|
||||||
// check if initializer disqualifies it
|
// Check if initializer disqualifies it
|
||||||
IASTInitializer initializer = decl.getInitializer();
|
IASTInitializer initializer = decl.getInitializer();
|
||||||
IASTInitializerClause clause = null;
|
IASTInitializerClause clause = null;
|
||||||
if (initializer instanceof IASTEqualsInitializer) {
|
if (initializer instanceof IASTEqualsInitializer) {
|
||||||
|
@ -156,7 +168,7 @@ public class UnusedSymbolInFileScopeChecker extends AbstractIndexAstChecker {
|
||||||
} else if (initializer instanceof ICPPASTConstructorInitializer) {
|
} else if (initializer instanceof ICPPASTConstructorInitializer) {
|
||||||
ICPPASTConstructorInitializer constructorInitializer = (ICPPASTConstructorInitializer) initializer;
|
ICPPASTConstructorInitializer constructorInitializer = (ICPPASTConstructorInitializer) initializer;
|
||||||
IASTInitializerClause[] args = constructorInitializer.getArguments();
|
IASTInitializerClause[] args = constructorInitializer.getArguments();
|
||||||
if (args.length==1)
|
if (args.length == 1)
|
||||||
clause = args[0];
|
clause = args[0];
|
||||||
}
|
}
|
||||||
if (clause instanceof IASTLiteralExpression) {
|
if (clause instanceof IASTLiteralExpression) {
|
||||||
|
@ -172,6 +184,7 @@ public class UnusedSymbolInFileScopeChecker extends AbstractIndexAstChecker {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
return PROCESS_SKIP;
|
return PROCESS_SKIP;
|
||||||
} else if (element instanceof IASTFunctionDefinition) {
|
} else if (element instanceof IASTFunctionDefinition) {
|
||||||
// definitions
|
// definitions
|
||||||
|
@ -232,7 +245,12 @@ public class UnusedSymbolInFileScopeChecker extends AbstractIndexAstChecker {
|
||||||
staticFunctionDefinitions.remove(binding);
|
staticFunctionDefinitions.remove(binding);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!(parentNode instanceof IASTDeclarator)) {
|
if (parentNode instanceof IASTDeclarator) {
|
||||||
|
// Initializer makes "extern" declaration to become definition.
|
||||||
|
if (((IASTDeclarator) parentNode).getInitializer() != null) {
|
||||||
|
externVariableDeclarations.remove(binding);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
externVariableDeclarations.remove(binding);
|
externVariableDeclarations.remove(binding);
|
||||||
staticVariableDeclarations.remove(binding);
|
staticVariableDeclarations.remove(binding);
|
||||||
}
|
}
|
||||||
|
@ -310,7 +328,7 @@ public class UnusedSymbolInFileScopeChecker extends AbstractIndexAstChecker {
|
||||||
clearCandidates(); // release memory
|
clearCandidates(); // release memory
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean isFilteredOut(String arg, IProblem problem, String exceptionListParamId) {
|
private boolean isFilteredOut(String arg, IProblem problem, String exceptionListParamId) {
|
||||||
Object[] arr = (Object[]) getPreference(problem, exceptionListParamId);
|
Object[] arr = (Object[]) getPreference(problem, exceptionListParamId);
|
||||||
for (int i = 0; i < arr.length; i++) {
|
for (int i = 0; i < arr.length; i++) {
|
||||||
String str = (String) arr[i];
|
String str = (String) arr[i];
|
||||||
|
@ -320,4 +338,7 @@ public class UnusedSymbolInFileScopeChecker extends AbstractIndexAstChecker {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private boolean shouldReportInMacro(String errorId) {
|
||||||
|
return (Boolean) getPreference(getProblemById(errorId, getFile()), PARAM_MACRO_ID);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -121,7 +121,7 @@ public final class CxxAstUtils {
|
||||||
return (IType) typeName;
|
return (IType) typeName;
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean isInMacro(IASTNode node) {
|
public static boolean isInMacro(IASTNode node) {
|
||||||
IASTNodeSelector nodeSelector = node.getTranslationUnit().getNodeSelector(node.getTranslationUnit().getFilePath());
|
IASTNodeSelector nodeSelector = node.getTranslationUnit().getNodeSelector(node.getTranslationUnit().getFilePath());
|
||||||
IASTFileLocation fileLocation = node.getFileLocation();
|
IASTFileLocation fileLocation = node.getFileLocation();
|
||||||
IASTPreprocessorMacroExpansion macro = nodeSelector.findEnclosingMacroExpansion(fileLocation.getNodeOffset(),
|
IASTPreprocessorMacroExpansion macro = nodeSelector.findEnclosingMacroExpansion(fileLocation.getNodeOffset(),
|
||||||
|
|
|
@ -12,7 +12,7 @@
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<version>1.0.0-SNAPSHOT</version>
|
<version>1.0.0-SNAPSHOT</version>
|
||||||
<artifactId>org.eclipse.cdt.codan.core.tests</artifactId>
|
<artifactId>org.eclipse.cdt.codan.core.test</artifactId>
|
||||||
<packaging>eclipse-test-plugin</packaging>
|
<packaging>eclipse-test-plugin</packaging>
|
||||||
|
|
||||||
<build>
|
<build>
|
||||||
|
|
|
@ -7,6 +7,7 @@
|
||||||
*
|
*
|
||||||
* Contributors:
|
* Contributors:
|
||||||
* Gil Barash - Initial implementation
|
* Gil Barash - Initial implementation
|
||||||
|
* Sergey Prigogin (Google)
|
||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
package org.eclipse.cdt.codan.core.internal.checkers;
|
package org.eclipse.cdt.codan.core.internal.checkers;
|
||||||
|
|
||||||
|
@ -508,8 +509,9 @@ public class CaseBreakCheckerTest extends CheckerTestCase {
|
||||||
loadCodeAndRun(code);
|
loadCodeAndRun(code);
|
||||||
checkNoErrors();
|
checkNoErrors();
|
||||||
}
|
}
|
||||||
|
|
||||||
// void foo(int a) {
|
// void foo(int a) {
|
||||||
// switch( a ) {
|
// switch(a) {
|
||||||
// case 2:
|
// case 2:
|
||||||
// if (a*2<10)
|
// if (a*2<10)
|
||||||
// return;
|
// return;
|
||||||
|
@ -525,53 +527,43 @@ public class CaseBreakCheckerTest extends CheckerTestCase {
|
||||||
checkErrorLine(7);
|
checkErrorLine(7);
|
||||||
}
|
}
|
||||||
|
|
||||||
// #define DEFINE_BREAK {break;}
|
// #define DEFINE_BREAK {break;}
|
||||||
// void foo ( int a )
|
// void foo(int a) {
|
||||||
// {
|
// switch (a) {
|
||||||
// switch ( a )
|
// case 1:
|
||||||
// {
|
// DEFINE_BREAK // No warning here
|
||||||
// case 1:
|
// }
|
||||||
// DEFINE_BREAK // <-- Warning: No break at the end of this case
|
// }
|
||||||
// }
|
|
||||||
// }
|
|
||||||
public void testBreakInBraces() {
|
public void testBreakInBraces() {
|
||||||
String code = getAboveComment();
|
String code = getAboveComment();
|
||||||
loadCodeAndRun(code);
|
loadCodeAndRun(code);
|
||||||
checkNoErrors();
|
checkNoErrors();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// #define MY_MACRO(i) \
|
||||||
// #define MY_MACRO(i) \
|
// case i: { \
|
||||||
// case i: \
|
// }
|
||||||
// { \
|
//
|
||||||
// break; \
|
// void f() {
|
||||||
// }
|
// int x;
|
||||||
//
|
// switch (x) {
|
||||||
// void f()
|
// MY_MACRO(1) // No warning here
|
||||||
// {
|
// }
|
||||||
// int x;
|
// }
|
||||||
// switch (x)
|
|
||||||
// {
|
|
||||||
// MY_MACRO(1) // WARNING HERE
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
|
|
||||||
public void testInMacro() {
|
public void testInMacro() {
|
||||||
String code = getAboveComment();
|
String code = getAboveComment();
|
||||||
loadCodeAndRun(code);
|
loadCodeAndRun(code);
|
||||||
checkNoErrors();
|
checkNoErrors();
|
||||||
}
|
}
|
||||||
|
|
||||||
//void foo()
|
// void foo() {
|
||||||
//{
|
// switch (0)
|
||||||
//switch(0)
|
// default: {
|
||||||
//default:
|
// }
|
||||||
//{
|
// }
|
||||||
//}
|
|
||||||
//}
|
|
||||||
public void testEmptyCompoundStatement() {
|
public void testEmptyCompoundStatement() {
|
||||||
String code = getAboveComment();
|
String code = getAboveComment();
|
||||||
loadCodeAndRun(code);
|
loadCodeAndRun(code);
|
||||||
checkErrorLine(6);
|
checkErrorLine(4);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -7,6 +7,7 @@
|
||||||
*
|
*
|
||||||
* Contributors:
|
* Contributors:
|
||||||
* Andrew Gvozdev - initial API and implementation
|
* Andrew Gvozdev - initial API and implementation
|
||||||
|
* Sergey Prigogin (Google)
|
||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
package org.eclipse.cdt.codan.core.internal.checkers;
|
package org.eclipse.cdt.codan.core.internal.checkers;
|
||||||
|
|
||||||
|
@ -17,7 +18,6 @@ import org.eclipse.cdt.codan.internal.checkers.UnusedSymbolInFileScopeChecker;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Test for {@see UnusedSymbolInFileScopeChecker} class
|
* Test for {@see UnusedSymbolInFileScopeChecker} class
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
public class UnusedSymbolInFileScopeCheckerTest extends CheckerTestCase {
|
public class UnusedSymbolInFileScopeCheckerTest extends CheckerTestCase {
|
||||||
@Override
|
@Override
|
||||||
|
@ -222,8 +222,15 @@ public class UnusedSymbolInFileScopeCheckerTest extends CheckerTestCase {
|
||||||
checkNoErrors();
|
checkNoErrors();
|
||||||
}
|
}
|
||||||
|
|
||||||
// extern int test_var=0; // not quite legal but some compilers allow that
|
// extern const int test_var=0; // not quite legal but some compilers allow that
|
||||||
public void testExternVariable_Definition() throws IOException {
|
public void testExternVariable_Definition1() throws IOException {
|
||||||
|
loadCodeAndRun(getAboveComment());
|
||||||
|
checkNoErrors();
|
||||||
|
}
|
||||||
|
|
||||||
|
// extern const int test_var;
|
||||||
|
// const int test_var = 0;
|
||||||
|
public void testExternVariable_Definition2() throws IOException {
|
||||||
loadCodeAndRun(getAboveComment());
|
loadCodeAndRun(getAboveComment());
|
||||||
checkNoErrors();
|
checkNoErrors();
|
||||||
}
|
}
|
||||||
|
|
|
@ -8,9 +8,9 @@
|
||||||
# Contributors:
|
# Contributors:
|
||||||
# IBM Corporation - initial API and implementation
|
# IBM Corporation - initial API and implementation
|
||||||
###############################################################################
|
###############################################################################
|
||||||
source.cdtaix.jar = src/
|
source.. = src/
|
||||||
bin.includes = fragment.xml,\
|
bin.includes = fragment.xml,\
|
||||||
cdtaix.jar,\
|
.,\
|
||||||
about.html,\
|
about.html,\
|
||||||
META-INF/,\
|
META-INF/,\
|
||||||
os/
|
os/
|
||||||
|
|
Binary file not shown.
|
@ -10,8 +10,8 @@
|
||||||
###############################################################################
|
###############################################################################
|
||||||
bin.includes = fragment.xml,\
|
bin.includes = fragment.xml,\
|
||||||
about.html,\
|
about.html,\
|
||||||
cdt_linux.jar,\
|
.,\
|
||||||
META-INF/
|
META-INF/
|
||||||
src.includes = about.html,\
|
src.includes = about.html,\
|
||||||
library/
|
library/
|
||||||
source.cdt_linux.jar = src/
|
source.. = src/
|
||||||
|
|
Binary file not shown.
|
@ -10,9 +10,9 @@
|
||||||
###############################################################################
|
###############################################################################
|
||||||
bin.includes = fragment.xml,\
|
bin.includes = fragment.xml,\
|
||||||
about.html,\
|
about.html,\
|
||||||
cdt_macosx.jar,\
|
.,\
|
||||||
os/,\
|
os/,\
|
||||||
META-INF/
|
META-INF/
|
||||||
src.includes = about.html,\
|
src.includes = about.html,\
|
||||||
library/
|
library/
|
||||||
source.cdt_macosx.jar = src/
|
source.. = src/
|
||||||
|
|
Binary file not shown.
|
@ -11,8 +11,8 @@
|
||||||
bin.includes = fragment.xml,\
|
bin.includes = fragment.xml,\
|
||||||
about.html,\
|
about.html,\
|
||||||
os/,\
|
os/,\
|
||||||
cdt_solaris.jar,\
|
.,\
|
||||||
META-INF/
|
META-INF/
|
||||||
src.includes = about.html,\
|
src.includes = about.html,\
|
||||||
library/
|
library/
|
||||||
source.cdt_solaris.jar = src/
|
source.. = src/
|
||||||
|
|
Binary file not shown.
|
@ -15,6 +15,14 @@
|
||||||
<artifactId>org.eclipse.cdt.core.tests</artifactId>
|
<artifactId>org.eclipse.cdt.core.tests</artifactId>
|
||||||
<packaging>eclipse-test-plugin</packaging>
|
<packaging>eclipse-test-plugin</packaging>
|
||||||
|
|
||||||
|
<repositories>
|
||||||
|
<repository>
|
||||||
|
<id>cdt.repo</id>
|
||||||
|
<url>file:/${basedir}/../../releng/org.eclipse.cdt.repo/target/repository</url>
|
||||||
|
<layout>p2</layout>
|
||||||
|
</repository>
|
||||||
|
</repositories>
|
||||||
|
|
||||||
<build>
|
<build>
|
||||||
<plugins>
|
<plugins>
|
||||||
<plugin>
|
<plugin>
|
||||||
|
@ -28,6 +36,13 @@
|
||||||
<include>**/AutomatedIntegrationSuite.*</include>
|
<include>**/AutomatedIntegrationSuite.*</include>
|
||||||
</includes>
|
</includes>
|
||||||
<testFailureIgnore>true</testFailureIgnore>
|
<testFailureIgnore>true</testFailureIgnore>
|
||||||
|
<dependencies>
|
||||||
|
<dependency>
|
||||||
|
<artifactId>org.eclipse.cdt.feature.group</artifactId>
|
||||||
|
<version>8.0.0.${buildQualifier}</version>
|
||||||
|
<type>p2-installable-unit</type>
|
||||||
|
</dependency>
|
||||||
|
</dependencies>
|
||||||
</configuration>
|
</configuration>
|
||||||
</plugin>
|
</plugin>
|
||||||
</plugins>
|
</plugins>
|
||||||
|
|
|
@ -10,8 +10,8 @@
|
||||||
###############################################################################
|
###############################################################################
|
||||||
bin.includes = fragment.xml,\
|
bin.includes = fragment.xml,\
|
||||||
about.html,\
|
about.html,\
|
||||||
cdt_win32.jar,\
|
.,\
|
||||||
META-INF/
|
META-INF/
|
||||||
src.includes = about.html,\
|
src.includes = about.html,\
|
||||||
library/
|
library/
|
||||||
source.cdt_win32.jar = src/
|
source.. = src/
|
||||||
|
|
Binary file not shown.
|
@ -310,12 +310,13 @@ public class ClassTypeHelper {
|
||||||
/**
|
/**
|
||||||
* Returns methods either declared by the given class or generated by the compiler. Does not
|
* Returns methods either declared by the given class or generated by the compiler. Does not
|
||||||
* include methods declared in base classes.
|
* include methods declared in base classes.
|
||||||
* @param classType
|
|
||||||
* @return
|
|
||||||
*/
|
*/
|
||||||
private static ObjectSet<ICPPMethod> getOwnMethods(ICPPClassType classType) {
|
private static ObjectSet<ICPPMethod> getOwnMethods(ICPPClassType classType) {
|
||||||
ObjectSet<ICPPMethod> set= new ObjectSet<ICPPMethod>(4);
|
ObjectSet<ICPPMethod> set= new ObjectSet<ICPPMethod>(4);
|
||||||
set.addAll(classType.getDeclaredMethods());
|
set.addAll(classType.getDeclaredMethods());
|
||||||
|
if (classType instanceof IProblemBinding) {
|
||||||
|
return set;
|
||||||
|
}
|
||||||
ICPPClassScope scope= (ICPPClassScope) classType.getCompositeScope();
|
ICPPClassScope scope= (ICPPClassScope) classType.getCompositeScope();
|
||||||
set.addAll(scope.getImplicitMethods());
|
set.addAll(scope.getImplicitMethods());
|
||||||
return set;
|
return set;
|
||||||
|
|
|
@ -838,3 +838,22 @@ void TestClass::foo()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//!Bug 355006 - NPE implementing template function
|
||||||
|
//#org.eclipse.cdt.ui.tests.refactoring.implementmethod.ImplementMethodRefactoringTest
|
||||||
|
//@.config
|
||||||
|
filename=A.h
|
||||||
|
infos=1
|
||||||
|
//@A.h
|
||||||
|
|
||||||
|
/*$*/template<typename T> void func(T&);/*$$*/
|
||||||
|
|
||||||
|
//=
|
||||||
|
|
||||||
|
template<typename T> void func(T&);
|
||||||
|
|
||||||
|
template<typename T> inline void func(T& )
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -260,15 +260,16 @@ public class ImplementMethodRefactoring extends CRefactoring2 {
|
||||||
IASTFunctionDefinition functionDefinition = nodeFactory.newFunctionDefinition(declSpecifier, createdMethodDeclarator, nodeFactory.newCompoundStatement());
|
IASTFunctionDefinition functionDefinition = nodeFactory.newFunctionDefinition(declSpecifier, createdMethodDeclarator, nodeFactory.newCompoundStatement());
|
||||||
functionDefinition.setParent(unit);
|
functionDefinition.setParent(unit);
|
||||||
|
|
||||||
if (NodeHelper.isContainedInTemplateDeclaration(declarationParent)) {
|
ICPPASTTemplateDeclaration templateDeclaration = NodeHelper.findContainedTemplateDecalaration(declarationParent);
|
||||||
ICPPASTTemplateDeclaration templateDeclaration = nodeFactory.newTemplateDeclaration(functionDefinition);
|
if (templateDeclaration != null) {
|
||||||
templateDeclaration.setParent(unit);
|
ICPPASTTemplateDeclaration newTemplateDeclaration = nodeFactory.newTemplateDeclaration(functionDefinition);
|
||||||
|
newTemplateDeclaration.setParent(unit);
|
||||||
|
|
||||||
for (ICPPASTTemplateParameter templateParameter : ((ICPPASTTemplateDeclaration) declarationParent.getParent().getParent() ).getTemplateParameters()) {
|
for (ICPPASTTemplateParameter templateParameter : templateDeclaration.getTemplateParameters()) {
|
||||||
templateDeclaration.addTemplateParameter(templateParameter.copy(CopyStyle.withLocations));
|
newTemplateDeclaration.addTemplateParameter(templateParameter.copy(CopyStyle.withLocations));
|
||||||
}
|
}
|
||||||
|
|
||||||
return templateDeclaration;
|
return newTemplateDeclaration;
|
||||||
}
|
}
|
||||||
return functionDefinition;
|
return functionDefinition;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
* Copyright (c) 2008, 2009 Institute for Software, HSR Hochschule fuer Technik
|
* Copyright (c) 2008, 2011 Institute for Software, HSR Hochschule fuer Technik
|
||||||
* Rapperswil, University of applied sciences and others
|
* Rapperswil, University of applied sciences 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
|
||||||
|
@ -212,11 +212,16 @@ public class NodeHelper {
|
||||||
}
|
}
|
||||||
|
|
||||||
public static boolean isContainedInTemplateDeclaration(IASTNode node) {
|
public static boolean isContainedInTemplateDeclaration(IASTNode node) {
|
||||||
if (node == null) {
|
return findContainedTemplateDecalaration(node) != null;
|
||||||
return false;
|
|
||||||
} else if (node instanceof ICPPASTTemplateDeclaration) {
|
|
||||||
return true;
|
|
||||||
}
|
}
|
||||||
return isContainedInTemplateDeclaration(node.getParent());
|
|
||||||
|
public static ICPPASTTemplateDeclaration findContainedTemplateDecalaration(IASTNode node) {
|
||||||
|
while (node != null) {
|
||||||
|
if (node instanceof ICPPASTTemplateDeclaration) {
|
||||||
|
return (ICPPASTTemplateDeclaration) node;
|
||||||
|
}
|
||||||
|
node = node.getParent();
|
||||||
|
}
|
||||||
|
return null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -12,6 +12,7 @@
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<version>1.0.0-SNAPSHOT</version>
|
<version>1.0.0-SNAPSHOT</version>
|
||||||
<artifactId>org.eclipse.cdt.build.crossgcc-feature</artifactId>
|
<groupId>org.eclipse.cdt.features</groupId>
|
||||||
|
<artifactId>org.eclipse.cdt.build.crossgcc</artifactId>
|
||||||
<packaging>eclipse-feature</packaging>
|
<packaging>eclipse-feature</packaging>
|
||||||
</project>
|
</project>
|
||||||
|
|
|
@ -11,7 +11,8 @@
|
||||||
<relativePath>../../pom.xml</relativePath>
|
<relativePath>../../pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<artifactId>org.eclipse.cdt.gdb-feature</artifactId>
|
<groupId>org.eclipse.cdt.features</groupId>
|
||||||
|
<artifactId>org.eclipse.cdt.gdb</artifactId>
|
||||||
<packaging>eclipse-feature</packaging>
|
<packaging>eclipse-feature</packaging>
|
||||||
<version>7.0.0-SNAPSHOT</version>
|
<version>7.0.0-SNAPSHOT</version>
|
||||||
</project>
|
</project>
|
||||||
|
|
11
debug/org.eclipse.cdt.gdb.source-feature/.project
Normal file
11
debug/org.eclipse.cdt.gdb.source-feature/.project
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<projectDescription>
|
||||||
|
<name>org.eclipse.cdt.gdb.source-feature</name>
|
||||||
|
<comment></comment>
|
||||||
|
<projects>
|
||||||
|
</projects>
|
||||||
|
<buildSpec>
|
||||||
|
</buildSpec>
|
||||||
|
<natures>
|
||||||
|
</natures>
|
||||||
|
</projectDescription>
|
|
@ -11,7 +11,7 @@
|
||||||
<relativePath>../../pom.xml</relativePath>
|
<relativePath>../../pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<artifactId>org.eclipse.cdt.gdb.source-feature</artifactId>
|
<artifactId>org.eclipse.cdt.gdb.source</artifactId>
|
||||||
<packaging>eclipse-feature</packaging>
|
<packaging>eclipse-feature</packaging>
|
||||||
<version>7.0.0-SNAPSHOT</version>
|
<version>7.0.0-SNAPSHOT</version>
|
||||||
</project>
|
</project>
|
||||||
|
|
|
@ -11,7 +11,7 @@
|
||||||
<relativePath>../../pom.xml</relativePath>
|
<relativePath>../../pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<artifactId>org.eclipse.cdt.gnu.debug-feature</artifactId>
|
<artifactId>org.eclipse.cdt.gnu.debug</artifactId>
|
||||||
<packaging>eclipse-feature</packaging>
|
<packaging>eclipse-feature</packaging>
|
||||||
<version>7.1.0-SNAPSHOT</version>
|
<version>7.1.0-SNAPSHOT</version>
|
||||||
</project>
|
</project>
|
||||||
|
|
11
debug/org.eclipse.cdt.gnu.debug.source-feature/.project
Normal file
11
debug/org.eclipse.cdt.gnu.debug.source-feature/.project
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<projectDescription>
|
||||||
|
<name>org.eclipse.cdt.gnu.debug.source-feature</name>
|
||||||
|
<comment></comment>
|
||||||
|
<projects>
|
||||||
|
</projects>
|
||||||
|
<buildSpec>
|
||||||
|
</buildSpec>
|
||||||
|
<natures>
|
||||||
|
</natures>
|
||||||
|
</projectDescription>
|
|
@ -11,7 +11,7 @@
|
||||||
<relativePath>../../pom.xml</relativePath>
|
<relativePath>../../pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<artifactId>org.eclipse.cdt.gnu.debug.source-feature</artifactId>
|
<artifactId>org.eclipse.cdt.gnu.debug.source</artifactId>
|
||||||
<packaging>eclipse-feature</packaging>
|
<packaging>eclipse-feature</packaging>
|
||||||
<version>7.1.0-SNAPSHOT</version>
|
<version>7.1.0-SNAPSHOT</version>
|
||||||
</project>
|
</project>
|
||||||
|
|
|
@ -24,16 +24,16 @@ import org.eclipse.cdt.dsf.concurrent.Query;
|
||||||
import org.eclipse.cdt.dsf.datamodel.DMContexts;
|
import org.eclipse.cdt.dsf.datamodel.DMContexts;
|
||||||
import org.eclipse.cdt.dsf.datamodel.IDMContext;
|
import org.eclipse.cdt.dsf.datamodel.IDMContext;
|
||||||
import org.eclipse.cdt.dsf.debug.service.IProcesses;
|
import org.eclipse.cdt.dsf.debug.service.IProcesses;
|
||||||
import org.eclipse.cdt.dsf.debug.service.IRunControl;
|
import org.eclipse.cdt.dsf.debug.service.IProcesses.IProcessDMContext;
|
||||||
import org.eclipse.cdt.dsf.debug.service.IProcesses.IThreadDMContext;
|
import org.eclipse.cdt.dsf.debug.service.IProcesses.IThreadDMContext;
|
||||||
import org.eclipse.cdt.dsf.debug.service.IProcesses.IThreadDMData;
|
import org.eclipse.cdt.dsf.debug.service.IProcesses.IThreadDMData;
|
||||||
|
import org.eclipse.cdt.dsf.debug.service.IRunControl;
|
||||||
import org.eclipse.cdt.dsf.debug.service.IRunControl.IContainerDMContext;
|
import org.eclipse.cdt.dsf.debug.service.IRunControl.IContainerDMContext;
|
||||||
import org.eclipse.cdt.dsf.debug.service.IRunControl.IExecutionDMContext;
|
import org.eclipse.cdt.dsf.debug.service.IRunControl.IExecutionDMContext;
|
||||||
import org.eclipse.cdt.dsf.debug.service.command.ICommandControlService;
|
import org.eclipse.cdt.dsf.debug.service.command.ICommandControlService;
|
||||||
import org.eclipse.cdt.dsf.gdb.breakpoints.CBreakpointGdbThreadsFilterExtension;
|
import org.eclipse.cdt.dsf.gdb.breakpoints.CBreakpointGdbThreadsFilterExtension;
|
||||||
import org.eclipse.cdt.dsf.gdb.internal.ui.GdbUIPlugin;
|
import org.eclipse.cdt.dsf.gdb.internal.ui.GdbUIPlugin;
|
||||||
import org.eclipse.cdt.dsf.gdb.launching.GdbLaunch;
|
import org.eclipse.cdt.dsf.gdb.launching.GdbLaunch;
|
||||||
import org.eclipse.cdt.dsf.gdb.service.IGDBBackend;
|
|
||||||
import org.eclipse.cdt.dsf.mi.service.IMIExecutionDMContext;
|
import org.eclipse.cdt.dsf.mi.service.IMIExecutionDMContext;
|
||||||
import org.eclipse.cdt.dsf.mi.service.IMIProcesses;
|
import org.eclipse.cdt.dsf.mi.service.IMIProcesses;
|
||||||
import org.eclipse.cdt.dsf.service.DsfServicesTracker;
|
import org.eclipse.cdt.dsf.service.DsfServicesTracker;
|
||||||
|
@ -256,7 +256,7 @@ public class GdbThreadFilterEditor {
|
||||||
|
|
||||||
private void createThreadViewer(Composite parent) {
|
private void createThreadViewer(Composite parent) {
|
||||||
Label label = new Label(parent, SWT.NONE);
|
Label label = new Label(parent, SWT.NONE);
|
||||||
label.setText("&Restrict to Selected Targets and Threads:"); //$NON-NLS-1$
|
label.setText(Messages.GdbThreadFilterEditor_RestrictToSelected);
|
||||||
label.setFont(parent.getFont());
|
label.setFont(parent.getFont());
|
||||||
label.setLayoutData(new GridData());
|
label.setLayoutData(new GridData());
|
||||||
GridData data = new GridData(GridData.FILL_BOTH);
|
GridData data = new GridData(GridData.FILL_BOTH);
|
||||||
|
@ -388,7 +388,7 @@ public class GdbThreadFilterEditor {
|
||||||
IContainerDMContext[] containerDmcs = (IContainerDMContext[])getData();
|
IContainerDMContext[] containerDmcs = (IContainerDMContext[])getData();
|
||||||
rm.setData(containerDmcs);
|
rm.setData(containerDmcs);
|
||||||
} else {
|
} else {
|
||||||
rm.setStatus(getFailStatus(IDsfStatusConstants.INVALID_STATE, "Wront type of container contexts.")); //$NON-NLS-1$
|
rm.setStatus(getFailStatus(IDsfStatusConstants.INVALID_STATE, "Wrong type of container contexts.")); //$NON-NLS-1$
|
||||||
}
|
}
|
||||||
rm.done();
|
rm.done();
|
||||||
}
|
}
|
||||||
|
@ -458,7 +458,7 @@ public class GdbThreadFilterEditor {
|
||||||
|
|
||||||
class ContainerLabelQuery extends Query<String> {
|
class ContainerLabelQuery extends Query<String> {
|
||||||
@Override
|
@Override
|
||||||
protected void execute(DataRequestMonitor<String> rm) {
|
protected void execute(final DataRequestMonitor<String> rm) {
|
||||||
if (!session.isActive()) {
|
if (!session.isActive()) {
|
||||||
rm.setStatus(getFailStatus(IDsfStatusConstants.INVALID_STATE, "Container's session not active.")); //$NON-NLS-1$
|
rm.setStatus(getFailStatus(IDsfStatusConstants.INVALID_STATE, "Container's session not active.")); //$NON-NLS-1$
|
||||||
rm.done();
|
rm.done();
|
||||||
|
@ -466,13 +466,22 @@ public class GdbThreadFilterEditor {
|
||||||
}
|
}
|
||||||
|
|
||||||
DsfServicesTracker tracker = new DsfServicesTracker(GdbUIPlugin.getBundleContext(), session.getId());
|
DsfServicesTracker tracker = new DsfServicesTracker(GdbUIPlugin.getBundleContext(), session.getId());
|
||||||
IGDBBackend backend = tracker.getService(IGDBBackend.class);
|
IProcesses processService = tracker.getService(IProcesses.class);
|
||||||
if (backend != null) {
|
IProcessDMContext procDmc = DMContexts.getAncestorOfType(container, IProcessDMContext.class);
|
||||||
rm.setData(backend.getProgramPath().toOSString());
|
if (processService != null && procDmc != null) {
|
||||||
} else {
|
processService.getExecutionData(
|
||||||
rm.setStatus(getFailStatus(IDsfStatusConstants.INVALID_STATE, "GDB Backend not accessible.")); //$NON-NLS-1$
|
procDmc,
|
||||||
}
|
new DataRequestMonitor<IThreadDMData>(ImmediateExecutor.getInstance(), rm) {
|
||||||
|
@Override
|
||||||
|
public void handleSuccess() {
|
||||||
|
rm.setData(getData().getName());
|
||||||
rm.done();
|
rm.done();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
rm.setStatus(getFailStatus(IDsfStatusConstants.INVALID_STATE, "Processes service not accessible.")); //$NON-NLS-1$
|
||||||
|
rm.done();
|
||||||
|
}
|
||||||
tracker.dispose();
|
tracker.dispose();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -511,7 +520,8 @@ public class GdbThreadFilterEditor {
|
||||||
ImmediateExecutor.getInstance(), rm) {
|
ImmediateExecutor.getInstance(), rm) {
|
||||||
@Override
|
@Override
|
||||||
protected void handleSuccess() {
|
protected void handleSuccess() {
|
||||||
final StringBuilder builder = new StringBuilder("Thread["); //$NON-NLS-1$
|
final StringBuilder builder = new StringBuilder(Messages.GdbThreadFilterEditor_Thread);
|
||||||
|
builder.append("["); //$NON-NLS-1$
|
||||||
builder.append(((IMIExecutionDMContext)thread).getThreadId());
|
builder.append(((IMIExecutionDMContext)thread).getThreadId());
|
||||||
builder.append("] "); //$NON-NLS-1$
|
builder.append("] "); //$NON-NLS-1$
|
||||||
builder.append(getData().getId());
|
builder.append(getData().getId());
|
||||||
|
|
|
@ -32,6 +32,9 @@ public class Messages extends NLS {
|
||||||
public static String TracepointPropertyPage_Class;
|
public static String TracepointPropertyPage_Class;
|
||||||
public static String TracepointPropertyPage_Enabled;
|
public static String TracepointPropertyPage_Enabled;
|
||||||
|
|
||||||
|
public static String GdbThreadFilterEditor_Thread;
|
||||||
|
public static String GdbThreadFilterEditor_RestrictToSelected;
|
||||||
|
|
||||||
static {
|
static {
|
||||||
// initialize resource bundle
|
// initialize resource bundle
|
||||||
NLS.initializeMessages(Messages.class.getName(), Messages.class);
|
NLS.initializeMessages(Messages.class.getName(), Messages.class);
|
||||||
|
|
|
@ -29,3 +29,6 @@ TracepointPropertyPage_IgnoreCount=&Ignore count:
|
||||||
TracepointPropertyPage_PassCount=&Pass count:
|
TracepointPropertyPage_PassCount=&Pass count:
|
||||||
TracepointPropertyPage_Class=Class:
|
TracepointPropertyPage_Class=Class:
|
||||||
TracepointPropertyPage_Enabled=Enabled
|
TracepointPropertyPage_Enabled=Enabled
|
||||||
|
|
||||||
|
GdbThreadFilterEditor_Thread=Thread
|
||||||
|
GdbThreadFilterEditor_RestrictToSelected=&Restrict to Selected Processes and Threads:
|
|
@ -1669,7 +1669,7 @@ public class MIBreakpointsManager extends AbstractDsfService implements IBreakpo
|
||||||
|
|
||||||
// Extract the thread IDs (if there is none, we are covered)
|
// Extract the thread IDs (if there is none, we are covered)
|
||||||
for (IContainerDMContext ctxt : targets) {
|
for (IContainerDMContext ctxt : targets) {
|
||||||
if (DMContexts.isAncestorOf(ctxt, context)) {
|
if (ctxt.equals(context) || DMContexts.isAncestorOf(ctxt, context)) {
|
||||||
threads.add(filterExtension.getThreadFilters(ctxt));
|
threads.add(filterExtension.getThreadFilters(ctxt));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -12,6 +12,6 @@
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<version>4.0.0-SNAPSHOT</version>
|
<version>4.0.0-SNAPSHOT</version>
|
||||||
<artifactId>org.eclipse.cdt.gdb.dsf-feature</artifactId>
|
<artifactId>org.eclipse.cdt.gnu.dsf</artifactId>
|
||||||
<packaging>eclipse-feature</packaging>
|
<packaging>eclipse-feature</packaging>
|
||||||
</project>
|
</project>
|
||||||
|
|
11
dsf-gdb/org.eclipse.cdt.gnu.dsf.source-feature/.project
Normal file
11
dsf-gdb/org.eclipse.cdt.gnu.dsf.source-feature/.project
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<projectDescription>
|
||||||
|
<name>org.eclipse.cdt.gnu.dsf.source-feature</name>
|
||||||
|
<comment></comment>
|
||||||
|
<projects>
|
||||||
|
</projects>
|
||||||
|
<buildSpec>
|
||||||
|
</buildSpec>
|
||||||
|
<natures>
|
||||||
|
</natures>
|
||||||
|
</projectDescription>
|
|
@ -12,6 +12,6 @@
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<version>4.0.0-SNAPSHOT</version>
|
<version>4.0.0-SNAPSHOT</version>
|
||||||
<artifactId>org.eclipse.cdt.gdb.dsf.source-feature</artifactId>
|
<artifactId>org.eclipse.cdt.gnu.dsf.source</artifactId>
|
||||||
<packaging>eclipse-feature</packaging>
|
<packaging>eclipse-feature</packaging>
|
||||||
</project>
|
</project>
|
||||||
|
|
|
@ -12,6 +12,7 @@
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<version>2.1.0-SNAPSHOT</version>
|
<version>2.1.0-SNAPSHOT</version>
|
||||||
<artifactId>org.eclipse.cdt.examples.dsf-feature</artifactId>
|
<groupId>org.eclipse.cdt.features</groupId>
|
||||||
|
<artifactId>org.eclipse.cdt.examples.dsf</artifactId>
|
||||||
<packaging>eclipse-feature</packaging>
|
<packaging>eclipse-feature</packaging>
|
||||||
</project>
|
</project>
|
||||||
|
|
|
@ -12,6 +12,7 @@
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<version>7.0.0-SNAPSHOT</version>
|
<version>7.0.0-SNAPSHOT</version>
|
||||||
<artifactId>org.eclipse.cdtdebug.gdbjtag-feature</artifactId>
|
<groupId>org.eclipse.cdt.features</groupId>
|
||||||
|
<artifactId>org.eclipse.cdt.debug.gdbjtag</artifactId>
|
||||||
<packaging>eclipse-feature</packaging>
|
<packaging>eclipse-feature</packaging>
|
||||||
</project>
|
</project>
|
||||||
|
|
|
@ -12,6 +12,6 @@
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<version>5.2.0-SNAPSHOT</version>
|
<version>5.2.0-SNAPSHOT</version>
|
||||||
<artifactId>org.eclipse.cdt.core.lrparser.sdk.feature</artifactId>
|
<artifactId>org.eclipse.cdt.core.lrparser.sdk</artifactId>
|
||||||
<packaging>eclipse-feature</packaging>
|
<packaging>eclipse-feature</packaging>
|
||||||
</project>
|
</project>
|
||||||
|
|
|
@ -11,7 +11,8 @@
|
||||||
<relativePath>../../pom.xml</relativePath>
|
<relativePath>../../pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
|
<groupId>org.eclipse.cdt.features</groupId>
|
||||||
<version>5.2.0-SNAPSHOT</version>
|
<version>5.2.0-SNAPSHOT</version>
|
||||||
<artifactId>org.eclipse.cdt.core.lrparser.source.feature</artifactId>
|
<artifactId>org.eclipse.cdt.core.lrparser.source</artifactId>
|
||||||
<packaging>eclipse-feature</packaging>
|
<packaging>eclipse-feature</packaging>
|
||||||
</project>
|
</project>
|
||||||
|
|
|
@ -12,6 +12,6 @@
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<version>2.1.100-SNAPSHOT</version>
|
<version>2.1.100-SNAPSHOT</version>
|
||||||
<artifactId>org.eclipse.cdt.debug.ui.memory-feature</artifactId>
|
<artifactId>org.eclipse.cdt.debug.ui.memory</artifactId>
|
||||||
<packaging>eclipse-feature</packaging>
|
<packaging>eclipse-feature</packaging>
|
||||||
</project>
|
</project>
|
||||||
|
|
|
@ -11,7 +11,8 @@
|
||||||
<relativePath>../../pom.xml</relativePath>
|
<relativePath>../../pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
|
<groupId>org.eclipse.cdt.features</groupId>
|
||||||
<version>1.0.0-SNAPSHOT</version>
|
<version>1.0.0-SNAPSHOT</version>
|
||||||
<artifactId>org.eclipse.cdt.p2-feature</artifactId>
|
<artifactId>org.eclipse.cdt.p2</artifactId>
|
||||||
<packaging>eclipse-feature</packaging>
|
<packaging>eclipse-feature</packaging>
|
||||||
</project>
|
</project>
|
||||||
|
|
3
pom.xml
3
pom.xml
|
@ -149,6 +149,8 @@
|
||||||
<module>dsf/org.eclipse.cdt.examples.dsf.pda.ui</module>
|
<module>dsf/org.eclipse.cdt.examples.dsf.pda.ui</module>
|
||||||
<module>dsf/org.eclipse.cdt.examples.dsf-feature</module>
|
<module>dsf/org.eclipse.cdt.examples.dsf-feature</module>
|
||||||
|
|
||||||
|
<module>releng/org.eclipse.cdt.repo</module>
|
||||||
|
|
||||||
<module>core/org.eclipse.cdt.core.tests</module>
|
<module>core/org.eclipse.cdt.core.tests</module>
|
||||||
<module>core/org.eclipse.cdt.ui.tests</module>
|
<module>core/org.eclipse.cdt.ui.tests</module>
|
||||||
<module>build/org.eclipse.cdt.managedbuilder.core.tests</module>
|
<module>build/org.eclipse.cdt.managedbuilder.core.tests</module>
|
||||||
|
@ -161,7 +163,6 @@
|
||||||
<module>debug/org.eclipse.cdt.debug.ui.tests</module>
|
<module>debug/org.eclipse.cdt.debug.ui.tests</module>
|
||||||
-->
|
-->
|
||||||
|
|
||||||
<module>releng/org.eclipse.cdt.repo</module>
|
|
||||||
</modules>
|
</modules>
|
||||||
|
|
||||||
<repositories>
|
<repositories>
|
||||||
|
|
|
@ -11,6 +11,7 @@
|
||||||
<relativePath>../../pom.xml</relativePath>
|
<relativePath>../../pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<artifactId>org.eclipse.cdt-feature</artifactId>
|
<groupId>org.eclipse.cdt.features</groupId>
|
||||||
|
<artifactId>org.eclipse.cdt</artifactId>
|
||||||
<packaging>eclipse-feature</packaging>
|
<packaging>eclipse-feature</packaging>
|
||||||
</project>
|
</project>
|
||||||
|
|
|
@ -11,6 +11,6 @@
|
||||||
<relativePath>../../pom.xml</relativePath>
|
<relativePath>../../pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<artifactId>org.eclipse.cdt.platform-feature</artifactId>
|
<artifactId>org.eclipse.cdt.platform</artifactId>
|
||||||
<packaging>eclipse-feature</packaging>
|
<packaging>eclipse-feature</packaging>
|
||||||
</project>
|
</project>
|
||||||
|
|
11
releng/org.eclipse.cdt.platform.source-feature/.project
Normal file
11
releng/org.eclipse.cdt.platform.source-feature/.project
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<projectDescription>
|
||||||
|
<name>org.eclipse.cdt.platform.source-feature</name>
|
||||||
|
<comment></comment>
|
||||||
|
<projects>
|
||||||
|
</projects>
|
||||||
|
<buildSpec>
|
||||||
|
</buildSpec>
|
||||||
|
<natures>
|
||||||
|
</natures>
|
||||||
|
</projectDescription>
|
|
@ -11,6 +11,6 @@
|
||||||
<relativePath>../../pom.xml</relativePath>
|
<relativePath>../../pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<artifactId>org.eclipse.cdt.platform.source-feature</artifactId>
|
<artifactId>org.eclipse.cdt.platform.source</artifactId>
|
||||||
<packaging>eclipse-feature</packaging>
|
<packaging>eclipse-feature</packaging>
|
||||||
</project>
|
</project>
|
||||||
|
|
|
@ -14,4 +14,47 @@
|
||||||
<version>8.0.0-SNAPSHOT</version>
|
<version>8.0.0-SNAPSHOT</version>
|
||||||
<artifactId>org.eclipse.cdt.repo</artifactId>
|
<artifactId>org.eclipse.cdt.repo</artifactId>
|
||||||
<packaging>eclipse-repository</packaging>
|
<packaging>eclipse-repository</packaging>
|
||||||
|
|
||||||
|
<properties>
|
||||||
|
<cdt-install>/home/data/httpd/download.eclipse.org/tools/cdt/builds/hudson/cdt-maint</cdt-install>
|
||||||
|
</properties>
|
||||||
|
|
||||||
|
<profiles>
|
||||||
|
<profile>
|
||||||
|
<id>production</id>
|
||||||
|
<build>
|
||||||
|
<plugins>
|
||||||
|
<plugin>
|
||||||
|
<artifactId>maven-antrun-plugin</artifactId>
|
||||||
|
<executions>
|
||||||
|
<execution>
|
||||||
|
<id>deploy</id>
|
||||||
|
<phase>install</phase>
|
||||||
|
<goals>
|
||||||
|
<goal>run</goal>
|
||||||
|
</goals>
|
||||||
|
<configuration>
|
||||||
|
<tasks>
|
||||||
|
<mkdir dir="${cdt-install}"/>
|
||||||
|
<delete>
|
||||||
|
<fileset dir="${cdt-install}">
|
||||||
|
<include name="**" />
|
||||||
|
</fileset>
|
||||||
|
</delete>
|
||||||
|
<copy
|
||||||
|
file="target/org.eclipse.cdt.repo.zip"
|
||||||
|
tofile="${cdt-install}/org.eclipse.cdt.repo.${unqualifiedVersion}.${buildQualifier}.zip"/>
|
||||||
|
<unzip
|
||||||
|
src="target/org.eclipse.cdt.repo.zip"
|
||||||
|
dest="${cdt-install}"/>
|
||||||
|
</tasks>
|
||||||
|
</configuration>
|
||||||
|
</execution>
|
||||||
|
</executions>
|
||||||
|
</plugin>
|
||||||
|
</plugins>
|
||||||
|
</build>
|
||||||
|
</profile>
|
||||||
|
</profiles>
|
||||||
|
|
||||||
</project>
|
</project>
|
||||||
|
|
|
@ -11,6 +11,7 @@
|
||||||
<relativePath>../../pom.xml</relativePath>
|
<relativePath>../../pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<artifactId>org.eclipse.cdt.sdk-feature</artifactId>
|
<groupId>org.eclipse.cdt.features</groupId>
|
||||||
|
<artifactId>org.eclipse.cdt.sdk</artifactId>
|
||||||
<packaging>eclipse-feature</packaging>
|
<packaging>eclipse-feature</packaging>
|
||||||
</project>
|
</project>
|
||||||
|
|
|
@ -12,6 +12,6 @@
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<version>1.0.3-SNAPSHOT</version>
|
<version>1.0.3-SNAPSHOT</version>
|
||||||
<artifactId>org.eclipse.cdt.bupc-feature</artifactId>
|
<artifactId>org.eclipse.cdt.bupc</artifactId>
|
||||||
<packaging>eclipse-feature</packaging>
|
<packaging>eclipse-feature</packaging>
|
||||||
</project>
|
</project>
|
||||||
|
|
|
@ -12,6 +12,6 @@
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<version>5.1.0-SNAPSHOT</version>
|
<version>5.1.0-SNAPSHOT</version>
|
||||||
<artifactId>org.eclipse.cdt.core.parser.upc.sdk.feature</artifactId>
|
<artifactId>org.eclipse.cdt.core.parser.upc.sdk</artifactId>
|
||||||
<packaging>eclipse-feature</packaging>
|
<packaging>eclipse-feature</packaging>
|
||||||
</project>
|
</project>
|
||||||
|
|
|
@ -11,7 +11,8 @@
|
||||||
<relativePath>../../pom.xml</relativePath>
|
<relativePath>../../pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
|
<groupId>org.eclipse.cdt.features</groupId>
|
||||||
<version>5.1.0-SNAPSHOT</version>
|
<version>5.1.0-SNAPSHOT</version>
|
||||||
<artifactId>org.eclipse.cdt.core.parser.upc.source.feature</artifactId>
|
<artifactId>org.eclipse.cdt.core.parser.upc.source</artifactId>
|
||||||
<packaging>eclipse-feature</packaging>
|
<packaging>eclipse-feature</packaging>
|
||||||
</project>
|
</project>
|
||||||
|
|
|
@ -12,6 +12,7 @@
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<version>5.1.0-SNAPSHOT</version>
|
<version>5.1.0-SNAPSHOT</version>
|
||||||
<artifactId>org.eclipse.cdt.util-feature</artifactId>
|
<groupId>org.eclipse.cdt.features</groupId>
|
||||||
|
<artifactId>org.eclipse.cdt.util</artifactId>
|
||||||
<packaging>eclipse-feature</packaging>
|
<packaging>eclipse-feature</packaging>
|
||||||
</project>
|
</project>
|
||||||
|
|
|
@ -12,6 +12,6 @@
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<version>1.0.0-SNAPSHOT</version>
|
<version>1.0.0-SNAPSHOT</version>
|
||||||
<artifactId>org.eclipse.cdt.msw-feature</artifactId>
|
<artifactId>org.eclipse.cdt.msw</artifactId>
|
||||||
<packaging>eclipse-feature</packaging>
|
<packaging>eclipse-feature</packaging>
|
||||||
</project>
|
</project>
|
||||||
|
|
|
@ -12,6 +12,6 @@
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<version>6.1.0-SNAPSHOT</version>
|
<version>6.1.0-SNAPSHOT</version>
|
||||||
<artifactId>org.eclipse.cdt.xlc.sdk-feature</artifactId>
|
<artifactId>org.eclipse.cdt.xlc.sdk</artifactId>
|
||||||
<packaging>eclipse-feature</packaging>
|
<packaging>eclipse-feature</packaging>
|
||||||
</project>
|
</project>
|
||||||
|
|
|
@ -12,6 +12,7 @@
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<version>6.1.0-SNAPSHOT</version>
|
<version>6.1.0-SNAPSHOT</version>
|
||||||
<artifactId>org.eclipse.cdt.xlc.source.feature</artifactId>
|
<groupId>org.eclipse.cdt.features</groupId>
|
||||||
|
<artifactId>org.eclipse.cdt.xlc.source</artifactId>
|
||||||
<packaging>eclipse-feature</packaging>
|
<packaging>eclipse-feature</packaging>
|
||||||
</project>
|
</project>
|
||||||
|
|
Loading…
Add table
Reference in a new issue