mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-29 19:45:01 +02:00
Cosmetics.
This commit is contained in:
parent
a84636dec5
commit
c1bea60652
2 changed files with 10 additions and 11 deletions
|
@ -30,8 +30,8 @@ import org.eclipse.cdt.internal.core.dom.parser.IASTAmbiguityParent;
|
||||||
* Models a function definition without a try-block. If used for a constructor definition it may contain
|
* Models a function definition without a try-block. If used for a constructor definition it may contain
|
||||||
* member initializers.
|
* member initializers.
|
||||||
*/
|
*/
|
||||||
public class CPPASTFunctionDefinition extends ASTNode implements
|
public class CPPASTFunctionDefinition extends ASTNode
|
||||||
ICPPASTFunctionDefinition, IASTAmbiguityParent {
|
implements ICPPASTFunctionDefinition, IASTAmbiguityParent {
|
||||||
|
|
||||||
private IASTDeclSpecifier declSpecifier;
|
private IASTDeclSpecifier declSpecifier;
|
||||||
private IASTFunctionDeclarator declarator;
|
private IASTFunctionDeclarator declarator;
|
||||||
|
@ -41,7 +41,6 @@ public class CPPASTFunctionDefinition extends ASTNode implements
|
||||||
private boolean fDeleted= false;
|
private boolean fDeleted= false;
|
||||||
private boolean fDefaulted= false;
|
private boolean fDefaulted= false;
|
||||||
|
|
||||||
|
|
||||||
public CPPASTFunctionDefinition() {
|
public CPPASTFunctionDefinition() {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -199,8 +198,7 @@ public class CPPASTFunctionDefinition extends ASTNode implements
|
||||||
}
|
}
|
||||||
|
|
||||||
public void replace(IASTNode child, IASTNode other) {
|
public void replace(IASTNode child, IASTNode other) {
|
||||||
if( bodyStatement == child )
|
if (bodyStatement == child) {
|
||||||
{
|
|
||||||
other.setPropertyInParent(bodyStatement.getPropertyInParent());
|
other.setPropertyInParent(bodyStatement.getPropertyInParent());
|
||||||
other.setParent(bodyStatement.getParent());
|
other.setParent(bodyStatement.getParent());
|
||||||
bodyStatement = (IASTStatement) other;
|
bodyStatement = (IASTStatement) other;
|
||||||
|
|
|
@ -55,7 +55,8 @@ public class SelectionHelper {
|
||||||
}
|
}
|
||||||
@Override
|
@Override
|
||||||
public int visit(IASTDeclaration declaration) {
|
public int visit(IASTDeclaration declaration) {
|
||||||
if (declaration instanceof IASTSimpleDeclaration && isSelectionOnExpression(textSelection, declaration)) {
|
if (declaration instanceof IASTSimpleDeclaration &&
|
||||||
|
isSelectionOnExpression(textSelection, declaration)) {
|
||||||
container.setObject((IASTSimpleDeclaration) declaration);
|
container.setObject((IASTSimpleDeclaration) declaration);
|
||||||
}
|
}
|
||||||
return super.visit(declaration);
|
return super.visit(declaration);
|
||||||
|
|
Loading…
Add table
Reference in a new issue