Lines 4465-4470
Link Here
|
4465 |
} |
4465 |
} |
4466 |
return false; |
4466 |
return false; |
4467 |
} |
4467 |
} |
|
|
4468 |
protected boolean isInsideArrayInitializer(){ |
4469 |
int i = this.elementPtr; |
4470 |
if (i > -1 && this.elementKindStack[i] == K_ARRAY_INITIALIZER) { |
4471 |
return true; |
4472 |
} |
4473 |
|
4474 |
return false; |
4475 |
} |
4468 |
public CompilationUnitDeclaration parse(ICompilationUnit sourceUnit, CompilationResult compilationResult, int cursorLoc) { |
4476 |
public CompilationUnitDeclaration parse(ICompilationUnit sourceUnit, CompilationResult compilationResult, int cursorLoc) { |
4469 |
|
4477 |
|
4470 |
this.cursorLocation = cursorLoc; |
4478 |
this.cursorLocation = cursorLoc; |
Lines 4620-4625
Link Here
|
4620 |
if(oldElement != this.currentElement) { |
4628 |
if(oldElement != this.currentElement) { |
4621 |
popElement(K_LOCAL_INITIALIZER_DELIMITER); |
4629 |
popElement(K_LOCAL_INITIALIZER_DELIMITER); |
4622 |
} |
4630 |
} |
|
|
4631 |
} else if(this.currentElement != null && this.currentElement instanceof RecoveredField) { |
4632 |
// To make sure the array initializer is popped when the focus is shifted to the parent |
4633 |
// in case we're restarting recovery inside an array initializer |
4634 |
RecoveredElement oldElement = this.currentElement; |
4635 |
super.recoveryExitFromVariable(); |
4636 |
if(oldElement != this.currentElement) { |
4637 |
if(topKnownElementKind(COMPLETION_OR_ASSIST_PARSER) == K_ARRAY_INITIALIZER) { |
4638 |
popElement(K_ARRAY_INITIALIZER); |
4639 |
popElement(K_FIELD_INITIALIZER_DELIMITER); |
4640 |
} |
4641 |
} |
4623 |
} else { |
4642 |
} else { |
4624 |
super.recoveryExitFromVariable(); |
4643 |
super.recoveryExitFromVariable(); |
4625 |
} |
4644 |
} |