Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTFunctionWithTryBlock.java')
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTFunctionWithTryBlock.java49
1 files changed, 25 insertions, 24 deletions
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTFunctionWithTryBlock.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTFunctionWithTryBlock.java
index 2242208f96d..1c8663b47fe 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTFunctionWithTryBlock.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTFunctionWithTryBlock.java
@@ -27,14 +27,14 @@ import org.eclipse.cdt.core.parser.util.ArrayUtil;
* @see ICPPASTFunctionWithTryBlock
*/
public class CPPASTFunctionWithTryBlock extends CPPASTFunctionDefinition implements ICPPASTFunctionWithTryBlock {
- private ICPPASTCatchHandler[] catchHandlers;
- private int catchHandlersPos= -1;
+ private ICPPASTCatchHandler[] catchHandlers;
+ private int catchHandlersPos = -1;
- public CPPASTFunctionWithTryBlock() {
+ public CPPASTFunctionWithTryBlock() {
}
- public CPPASTFunctionWithTryBlock(IASTDeclSpecifier declSpecifier,
- IASTFunctionDeclarator declarator, IASTStatement bodyStatement) {
+ public CPPASTFunctionWithTryBlock(IASTDeclSpecifier declSpecifier, IASTFunctionDeclarator declarator,
+ IASTStatement bodyStatement) {
super(declSpecifier, declarator, bodyStatement);
}
@@ -66,28 +66,29 @@ public class CPPASTFunctionWithTryBlock extends CPPASTFunctionDefinition impleme
@Override
public void addCatchHandler(ICPPASTCatchHandler statement) {
- assertNotFrozen();
- if (statement != null) {
- catchHandlers = ArrayUtil.appendAt(ICPPASTCatchHandler.class, catchHandlers, ++catchHandlersPos, statement);
- statement.setParent(this);
+ assertNotFrozen();
+ if (statement != null) {
+ catchHandlers = ArrayUtil.appendAt(ICPPASTCatchHandler.class, catchHandlers, ++catchHandlersPos, statement);
+ statement.setParent(this);
statement.setPropertyInParent(CATCH_HANDLER);
- }
- }
+ }
+ }
- @Override
+ @Override
public ICPPASTCatchHandler[] getCatchHandlers() {
- if (catchHandlers == null) return ICPPASTCatchHandler.EMPTY_CATCHHANDLER_ARRAY;
- catchHandlers = ArrayUtil.trimAt(ICPPASTCatchHandler.class, catchHandlers, catchHandlersPos);
- return catchHandlers;
- }
+ if (catchHandlers == null)
+ return ICPPASTCatchHandler.EMPTY_CATCHHANDLER_ARRAY;
+ catchHandlers = ArrayUtil.trimAt(ICPPASTCatchHandler.class, catchHandlers, catchHandlersPos);
+ return catchHandlers;
+ }
- @Override
+ @Override
protected boolean acceptCatchHandlers(ASTVisitor action) {
- final ICPPASTCatchHandler[] handlers = getCatchHandlers();
- for (int i= 0; i < handlers.length; i++) {
- if (!handlers[i].accept(action))
- return false;
- }
- return true;
- }
+ final ICPPASTCatchHandler[] handlers = getCatchHandlers();
+ for (int i = 0; i < handlers.length; i++) {
+ if (!handlers[i].accept(action))
+ return false;
+ }
+ return true;
+ }
}

Back to the top