diff options
author | Jonah Graham | 2018-11-20 16:20:42 +0000 |
---|---|---|
committer | Jonah Graham | 2018-11-22 21:47:02 +0000 |
commit | 170e654b4796bad1453ae85a427b97317d67a69a (patch) | |
tree | 6ca9b8a8fedd5fd25f97eb79c408312e256ff981 /core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTLabelStatement.java | |
parent | 35996a5c5ca5c254959ba48241eaada6dbf8628d (diff) | |
download | org.eclipse.cdt-170e654b4796bad1453ae85a427b97317d67a69a.tar.gz org.eclipse.cdt-170e654b4796bad1453ae85a427b97317d67a69a.tar.xz org.eclipse.cdt-170e654b4796bad1453ae85a427b97317d67a69a.zip |
Bug 540373: Cleanup: Format & Remove trailing whitespace
This was done by selecting all projects in Eclipse then
Source -> Clean Up... -> choosing:
- Format source code
- Remove trailing white spaces on all lines
and completing the wizard
Change-Id: I63685372c6bcc67719bcf145123bcb72e5b00394
Diffstat (limited to 'core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTLabelStatement.java')
-rw-r--r-- | core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTLabelStatement.java | 102 |
1 files changed, 56 insertions, 46 deletions
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTLabelStatement.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTLabelStatement.java index 04526a15729..9adc8bdf994 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTLabelStatement.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTLabelStatement.java @@ -24,10 +24,10 @@ import org.eclipse.cdt.core.dom.ast.IASTStatement; * @author jcamelon */ public class CPPASTLabelStatement extends CPPASTAttributeOwner implements IASTLabelStatement { - private IASTName name; - private IASTStatement nestedStatement; + private IASTName name; + private IASTStatement nestedStatement; - public CPPASTLabelStatement() { + public CPPASTLabelStatement() { } public CPPASTLabelStatement(IASTName name, IASTStatement nestedStatement) { @@ -50,72 +50,82 @@ public class CPPASTLabelStatement extends CPPASTAttributeOwner implements IASTLa @Override public IASTName getName() { - return name; - } + return name; + } - @Override + @Override public void setName(IASTName name) { - assertNotFrozen(); - this.name = name; - if (name != null) { + assertNotFrozen(); + this.name = name; + if (name != null) { name.setParent(this); name.setPropertyInParent(NAME); } - } + } - @Override + @Override public boolean accept(ASTVisitor action) { - if (action.shouldVisitStatements) { - switch (action.visit(this)) { - case ASTVisitor.PROCESS_ABORT: return false; - case ASTVisitor.PROCESS_SKIP: return true; - default: break; - } + if (action.shouldVisitStatements) { + switch (action.visit(this)) { + case ASTVisitor.PROCESS_ABORT: + return false; + case ASTVisitor.PROCESS_SKIP: + return true; + default: + break; + } } - if (!acceptByAttributeSpecifiers(action)) return false; - if (name != null && !name.accept(action)) return false; - if (nestedStatement != null && !nestedStatement.accept(action)) return false; + if (!acceptByAttributeSpecifiers(action)) + return false; + if (name != null && !name.accept(action)) + return false; + if (nestedStatement != null && !nestedStatement.accept(action)) + return false; - if (action.shouldVisitStatements) { - switch (action.leave(this)) { - case ASTVisitor.PROCESS_ABORT: return false; - case ASTVisitor.PROCESS_SKIP: return true; - default: break; - } + if (action.shouldVisitStatements) { + switch (action.leave(this)) { + case ASTVisitor.PROCESS_ABORT: + return false; + case ASTVisitor.PROCESS_SKIP: + return true; + default: + break; + } } - return true; - } + return true; + } @Override public int getRoleForName(IASTName n) { - if (n == name) return r_declaration; + if (n == name) + return r_declaration; return r_unclear; } - @Override + @Override public IASTStatement getNestedStatement() { - return nestedStatement; - } + return nestedStatement; + } - @Override + @Override public void setNestedStatement(IASTStatement s) { - assertNotFrozen(); - nestedStatement = s; - if (s != null) { + assertNotFrozen(); + nestedStatement = s; + if (s != null) { s.setParent(this); s.setPropertyInParent(NESTED_STATEMENT); } - } + } - @Override + @Override public void replace(IASTNode child, IASTNode other) { - if (child == nestedStatement) { - other.setParent(this); - other.setPropertyInParent(child.getPropertyInParent()); - setNestedStatement((IASTStatement) other); - return; - } - super.replace(child, other); - } + if (child == nestedStatement) { + other.setParent(this); + other.setPropertyInParent(child.getPropertyInParent()); + setNestedStatement((IASTStatement) other); + return; + } + super.replace(child, other); + } } |