public RecoveredElement add(Statement stmt, int bracketBalanceValue, boolean delegatedByParent) { resetPendingModifiers(); /* do not consider a nested block starting passed the block end (if set) it must be belonging to an enclosing block */ if (this.blockDeclaration.sourceEnd != 0 && stmt.sourceStart > this.blockDeclaration.sourceEnd){ if (delegatedByParent) return this; //ignore return this.parent.add(stmt, bracketBalanceValue); } RecoveredStatement element = new RecoveredStatement(stmt, this, bracketBalanceValue); attach(element); if (stmt.sourceEnd == 0) return element; return this; } /*
public RecoveredElement add(Statement stmt, int bracketBalanceValue, boolean delegatedByParent) { resetPendingModifiers(); /* do not consider a nested block starting passed the block end (if set) it must be belonging to an enclosing block */ if (this.blockDeclaration.sourceEnd != 0 && stmt.sourceStart > this.blockDeclaration.sourceEnd){ if (delegatedByParent) return this; //ignore return this.parent.add(stmt, bracketBalanceValue); } RecoveredStatement element = new RecoveredStatement(stmt, this, bracketBalanceValue); attach(element); if (stmt.sourceEnd == 0) return element; return this; } /*
public RecoveredElement add(Statement stmt, int bracketBalanceValue, boolean delegatedByParent) { resetPendingModifiers(); /* do not consider a nested block starting passed the block end (if set) it must be belonging to an enclosing block */ if (this.blockDeclaration.sourceEnd != 0 && stmt.sourceStart > this.blockDeclaration.sourceEnd){ if (delegatedByParent) return this; //ignore return this.parent.add(stmt, bracketBalanceValue); } RecoveredStatement element = new RecoveredStatement(stmt, this, bracketBalanceValue); attach(element); if (stmt.sourceEnd == 0) return element; return this; } /*
public RecoveredElement add(Statement stmt, int bracketBalanceValue, boolean delegatedByParent) { resetPendingModifiers(); /* do not consider a nested block starting passed the block end (if set) it must be belonging to an enclosing block */ if (this.blockDeclaration.sourceEnd != 0 && stmt.sourceStart > this.blockDeclaration.sourceEnd){ if (delegatedByParent) return this; //ignore return this.parent.add(stmt, bracketBalanceValue); } RecoveredStatement element = new RecoveredStatement(stmt, this, bracketBalanceValue); attach(element); if (stmt.sourceEnd == 0) return element; return this; } /*
public RecoveredElement add(Statement stmt, int bracketBalanceValue, boolean delegatedByParent) { resetPendingModifiers(); /* do not consider a nested block starting passed the block end (if set) it must be belonging to an enclosing block */ if (this.blockDeclaration.sourceEnd != 0 && stmt.sourceStart > this.blockDeclaration.sourceEnd){ if (delegatedByParent) return this; //ignore return this.parent.add(stmt, bracketBalanceValue); } RecoveredStatement element = new RecoveredStatement(stmt, this, bracketBalanceValue); attach(element); if (stmt.sourceEnd == 0) return element; return this; } /*
public RecoveredElement add(Statement stmt, int bracketBalanceValue, boolean delegatedByParent) { resetPendingModifiers(); /* do not consider a nested block starting passed the block end (if set) it must be belonging to an enclosing block */ if (this.blockDeclaration.sourceEnd != 0 && stmt.sourceStart > this.blockDeclaration.sourceEnd){ if (delegatedByParent) return this; //ignore return this.parent.add(stmt, bracketBalanceValue); } RecoveredStatement element = new RecoveredStatement(stmt, this, bracketBalanceValue); attach(element); if (stmt.sourceEnd == 0) return element; return this; } /*
public RecoveredElement add(Statement stmt, int bracketBalanceValue, boolean delegatedByParent) { resetPendingModifiers(); /* do not consider a nested block starting passed the block end (if set) it must be belonging to an enclosing block */ if (this.blockDeclaration.sourceEnd != 0 && stmt.sourceStart > this.blockDeclaration.sourceEnd){ if (delegatedByParent) return this; //ignore return this.parent.add(stmt, bracketBalanceValue); } RecoveredStatement element = new RecoveredStatement(stmt, this, bracketBalanceValue); attach(element); if (stmt.sourceEnd == 0) return element; return this; } /*
public RecoveredElement add(Statement stmt, int bracketBalanceValue, boolean delegatedByParent) { if (stmt instanceof LambdaExpression) // lambdas are recovered up to the containing statement anyways. return this; resetPendingModifiers(); /* do not consider a nested block starting passed the block end (if set) it must be belonging to an enclosing block */ if (this.blockDeclaration.sourceEnd != 0 && stmt.sourceStart > this.blockDeclaration.sourceEnd){ if (delegatedByParent) return this; //ignore return this.parent.add(stmt, bracketBalanceValue); } RecoveredStatement element = new RecoveredStatement(stmt, this, bracketBalanceValue); attach(element); if (stmt.sourceEnd == 0) return element; return this; } /*
public RecoveredElement add(Statement stmt, int bracketBalanceValue, boolean delegatedByParent) { if (stmt instanceof LambdaExpression) // lambdas are recovered up to the containing statement anyways. return this; resetPendingModifiers(); /* do not consider a nested block starting passed the block end (if set) it must be belonging to an enclosing block */ if (this.blockDeclaration.sourceEnd != 0 && stmt.sourceStart > this.blockDeclaration.sourceEnd){ if (delegatedByParent) return this; //ignore return this.parent.add(stmt, bracketBalanceValue); } RecoveredStatement element = new RecoveredStatement(stmt, this, bracketBalanceValue); attach(element); if (stmt.sourceEnd == 0) return element; return this; } /*
public RecoveredElement add(Statement stmt, int bracketBalanceValue, boolean delegatedByParent) { if (stmt instanceof LambdaExpression) // lambdas are recovered up to the containing statement anyways. return this; resetPendingModifiers(); /* do not consider a nested block starting passed the block end (if set) it must be belonging to an enclosing block */ if (this.blockDeclaration.sourceEnd != 0 && stmt.sourceStart > this.blockDeclaration.sourceEnd){ if (delegatedByParent) return this; //ignore return this.parent.add(stmt, bracketBalanceValue); } RecoveredStatement element = new RecoveredStatement(stmt, this, bracketBalanceValue); attach(element); if (stmt.sourceEnd == 0) return element; return this; } /*
public RecoveredElement add(Statement stmt, int bracketBalanceValue, boolean delegatedByParent) { resetPendingModifiers(); /* do not consider a nested block starting passed the block end (if set) it must be belonging to an enclosing block */ if (this.blockDeclaration.sourceEnd != 0 && stmt.sourceStart > this.blockDeclaration.sourceEnd){ if (delegatedByParent) return this; //ignore return this.parent.add(stmt, bracketBalanceValue); } RecoveredStatement element = new RecoveredStatement(stmt, this, bracketBalanceValue); attach(element); if (!isEndKnown(stmt)) return element; return this; } boolean isEndKnown(Statement stmt) {
if ((node.sourceStart >= start && node.sourceEnd <= end)) { if (!found) { statements[i] = new RecoveredStatement(stmt, blk, 0); found = true; blk.statementCount = i + 1;
if ((node.sourceStart >= start && node.sourceEnd <= end)) { if (!found) { statements[i] = new RecoveredStatement(stmt, blk, 0); found = true; blk.statementCount = i + 1;
if ((node.sourceStart >= start && node.sourceEnd <= end)) { if (!found) { statements[i] = new RecoveredStatement(stmt, blk, 0); found = true; blk.statementCount = i + 1;
if (parseTree != null) { if ((parseTree.sourceStart == 0 || parseTree.sourceEnd == 0) || (parseTree.sourceStart >= statementStart && parseTree.sourceEnd <= statementEnd)) { recoveredBlock.statements[recoveredBlock.statementCount - 1] = new RecoveredStatement(statement, recoveredBlock, 0); statement = null; } else if (recoveredStatement instanceof RecoveredLocalVariable && statement instanceof Expression) {
if (parseTree != null) { if ((parseTree.sourceStart == 0 || parseTree.sourceEnd == 0) || (parseTree.sourceStart >= statementStart && parseTree.sourceEnd <= statementEnd)) { recoveredBlock.statements[recoveredBlock.statementCount - 1] = new RecoveredStatement(statement, recoveredBlock, 0); statement = null; } else if (recoveredStatement instanceof RecoveredLocalVariable && statement instanceof Expression) {
if (parseTree != null) { if ((parseTree.sourceStart == 0 || parseTree.sourceEnd == 0) || (parseTree.sourceStart >= statementStart && parseTree.sourceEnd <= statementEnd)) { recoveredBlock.statements[recoveredBlock.statementCount - 1] = new RecoveredStatement(statement, recoveredBlock, 0); statement = null; } else if (recoveredStatement instanceof RecoveredLocalVariable && statement instanceof Expression) {