Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/RecoveredBlock.java')
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/RecoveredBlock.java36
1 files changed, 3 insertions, 33 deletions
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/RecoveredBlock.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/RecoveredBlock.java
index a26bdaa8be..79ee70ca0e 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/RecoveredBlock.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/RecoveredBlock.java
@@ -10,9 +10,7 @@ package org.eclipse.jdt.internal.compiler.parser;
import org.eclipse.jdt.internal.compiler.ast.*;
import org.eclipse.jdt.internal.compiler.lookup.*;
-import org.eclipse.jdt.internal.compiler.util.CharOperation;
-
-public class RecoveredBlock extends RecoveredStatement implements CompilerModifiers, TerminalSymbols, BaseTypes {
+public class RecoveredBlock extends RecoveredStatement implements CompilerModifiers, TerminalSymbols {
public Block blockDeclaration;
@@ -134,11 +132,11 @@ public AstNode parseTree(){
}
public String toString(int tab) {
StringBuffer result = new StringBuffer(tabString(tab));
- result.append("Recovered block:\n"/*nonNLS*/);
+ result.append("Recovered block:\n");
result.append(blockDeclaration.toString(tab + 1));
if (this.statements != null) {
for (int i = 0; i < this.statementCount; i++) {
- result.append("\n"/*nonNLS*/);
+ result.append("\n");
result.append(this.statements[i].toString(tab + 1));
}
}
@@ -246,32 +244,4 @@ public Statement updateStatement(){
return blockDeclaration;
}
-
-/*
- * Record a field declaration
- */
-public RecoveredElement add(FieldDeclaration fieldDeclaration, int bracketBalance) {
-
- /* local variables inside method can only be final and non void */
- char[][] fieldTypeName;
- if ((fieldDeclaration.modifiers & ~AccFinal) != 0 /* local var can only be final */
- || (fieldDeclaration.type == null) // initializer
- || ((fieldTypeName = fieldDeclaration.type.getTypeName()).length == 1 // non void
- && CharOperation.equals(fieldTypeName[0], VoidBinding.sourceName()))){
- this.updateSourceEndIfNecessary(this.previousAvailableLineEnd(fieldDeclaration.declarationSourceStart - 1));
- return this.parent.add(fieldDeclaration, bracketBalance);
- }
-
- /* do not consider a local variable starting passed the block end (if set)
- it must be belonging to an enclosing block */
- if (blockDeclaration.sourceEnd != 0
- && fieldDeclaration.declarationSourceStart > blockDeclaration.sourceEnd){
- return this.parent.add(fieldDeclaration, bracketBalance);
- }
-
- // ignore the added field, since indicates a local variable behind recovery point
- // which thus got parsed as a field reference. This can happen if restarting after
- // having reduced an assistNode to get the following context (see 1GEK7SG)
- return this;
-}
}

Back to the top