public ReferenceExpression newReferenceExpression() { char[] selector = this.identifierStack[this.identifierPtr]; if (selector != assistIdentifier()){ return super.newReferenceExpression(); } ReferenceExpression referenceExpression = new CompletionOnReferenceExpressionName(); this.assistNode = referenceExpression; return referenceExpression; } public CompilationUnitDeclaration parse(ICompilationUnit sourceUnit, CompilationResult compilationResult, int cursorLoc) {
public ReferenceExpression newReferenceExpression() { char[] selector = this.identifierStack[this.identifierPtr]; if (selector != assistIdentifier()){ return super.newReferenceExpression(); } ReferenceExpression referenceExpression = new CompletionOnReferenceExpressionName(); this.assistNode = referenceExpression; return referenceExpression; } public CompilationUnitDeclaration parse(ICompilationUnit sourceUnit, CompilationResult compilationResult, int cursorLoc) {
@Override public ReferenceExpression newReferenceExpression() { char[] selector = this.identifierStack[this.identifierPtr]; if (selector != assistIdentifier()){ return super.newReferenceExpression(); } ReferenceExpression referenceExpression = new CompletionOnReferenceExpressionName(this.scanner); this.assistNode = referenceExpression; return referenceExpression; } public CompilationUnitDeclaration parse(ICompilationUnit sourceUnit, CompilationResult compilationResult, int cursorLoc) {
public ReferenceExpression newReferenceExpression() { char[] selector = this.identifierStack[this.identifierPtr]; if (selector != assistIdentifier()){ return super.newReferenceExpression(); } ReferenceExpression referenceExpression = new CompletionOnReferenceExpressionName(this.scanner); this.assistNode = referenceExpression; return referenceExpression; } public CompilationUnitDeclaration parse(ICompilationUnit sourceUnit, CompilationResult compilationResult, int cursorLoc) {
public ReferenceExpression newReferenceExpression() { char[] selector = this.identifierStack[this.identifierPtr]; if (selector != assistIdentifier()){ return super.newReferenceExpression(); } ReferenceExpression referenceExpression = new CompletionOnReferenceExpressionName(); this.assistNode = referenceExpression; return referenceExpression; } public CompilationUnitDeclaration parse(ICompilationUnit sourceUnit, CompilationResult compilationResult, int cursorLoc) {
protected void consumeWildcard() { super.consumeWildcard(); if (assistIdentifier() == null && this.currentToken == TokenNameIdentifier) { // Test below copied from CompletionScanner.getCurrentIdentifierSource() if (this.cursorLocation < this.scanner.startPosition && this.scanner.currentPosition == this.scanner.startPosition){ // fake empty identifier got issued this.pushIdentifier(); } else if (this.cursorLocation+1 >= this.scanner.startPosition && this.cursorLocation < this.scanner.currentPosition){ this.pushIdentifier(); } else { return; } } else { return; } Wildcard wildcard = (Wildcard) this.genericsStack[this.genericsPtr]; CompletionOnKeyword1 keyword = new CompletionOnKeyword1( this.identifierStack[this.identifierPtr], this.identifierPositionStack[this.identifierPtr], new char[][]{Keywords.EXTENDS, Keywords.SUPER} ); keyword.canCompleteEmptyToken = true; wildcard.kind = Wildcard.EXTENDS; wildcard.bound = keyword; this.identifierPtr--; this.identifierLengthPtr--; this.assistNode = wildcard.bound; this.lastCheckPoint = wildcard.bound.sourceEnd + 1; } protected void consumeWildcard1() {
if(typeParameter.type != null || (typeParameter.bounds != null && typeParameter.bounds.length > 0)) return; if (assistIdentifier() == null && this.currentToken == TokenNameIdentifier) { // Test below copied from CompletionScanner.getCurrentIdentifierSource() if (this.cursorLocation < this.scanner.startPosition && this.scanner.currentPosition == this.scanner.startPosition){ // fake empty identifier got issued this.pushIdentifier();
protected void consumeWildcard() { super.consumeWildcard(); if (assistIdentifier() == null && this.currentToken == TokenNameIdentifier) { // Test below copied from CompletionScanner.getCurrentIdentifierSource() if (this.cursorLocation < this.scanner.startPosition && this.scanner.currentPosition == this.scanner.startPosition){ // fake empty identifier got issued this.pushIdentifier(); } else if (this.cursorLocation+1 >= this.scanner.startPosition && this.cursorLocation < this.scanner.currentPosition){ this.pushIdentifier(); } else { return; } } else { return; } Wildcard wildcard = (Wildcard) this.genericsStack[this.genericsPtr]; CompletionOnKeyword1 keyword = new CompletionOnKeyword1( this.identifierStack[this.identifierPtr], this.identifierPositionStack[this.identifierPtr], new char[][]{Keywords.EXTENDS, Keywords.SUPER} ); wildcard.kind = Wildcard.EXTENDS; wildcard.bound = keyword; this.identifierPtr--; this.identifierLengthPtr--; this.assistNode = wildcard.bound; this.lastCheckPoint = wildcard.bound.sourceEnd + 1; } protected void consumeWildcard1() {
protected void consumeWildcard() { super.consumeWildcard(); if (assistIdentifier() == null && this.currentToken == TokenNameIdentifier) { // Test below copied from CompletionScanner.getCurrentIdentifierSource() if (this.cursorLocation < this.scanner.startPosition && this.scanner.currentPosition == this.scanner.startPosition){ // fake empty identifier got issued this.pushIdentifier(); } else if (this.cursorLocation+1 >= this.scanner.startPosition && this.cursorLocation < this.scanner.currentPosition){ this.pushIdentifier(); } else { return; } } else { return; } Wildcard wildcard = (Wildcard) this.genericsStack[this.genericsPtr]; CompletionOnKeyword1 keyword = new CompletionOnKeyword1( this.identifierStack[this.identifierPtr], this.identifierPositionStack[this.identifierPtr], new char[][]{Keywords.EXTENDS, Keywords.SUPER} ); wildcard.kind = Wildcard.EXTENDS; wildcard.bound = keyword; this.identifierPtr--; this.identifierLengthPtr--; this.assistNode = wildcard.bound; this.lastCheckPoint = wildcard.bound.sourceEnd + 1; } protected void consumeWildcard1() {
if(typeParameter.type != null || (typeParameter.bounds != null && typeParameter.bounds.length > 0)) return; if (assistIdentifier() == null && this.currentToken == TokenNameIdentifier) { // Test below copied from CompletionScanner.getCurrentIdentifierSource() if (this.cursorLocation < this.scanner.startPosition && this.scanner.currentPosition == this.scanner.startPosition){ // fake empty identifier got issued this.pushIdentifier();
@Override protected void consumeWildcard() { super.consumeWildcard(); if (assistIdentifier() == null && this.currentToken == TokenNameIdentifier) { // Test below copied from CompletionScanner.getCurrentIdentifierSource() if (this.cursorLocation < this.scanner.startPosition && this.scanner.currentPosition == this.scanner.startPosition){ // fake empty identifier got issued this.pushIdentifier(); } else if (this.cursorLocation+1 >= this.scanner.startPosition && this.cursorLocation < this.scanner.currentPosition){ this.pushIdentifier(); } else { return; } } else { return; } Wildcard wildcard = (Wildcard) this.genericsStack[this.genericsPtr]; CompletionOnKeyword1 keyword = new CompletionOnKeyword1( this.identifierStack[this.identifierPtr], this.identifierPositionStack[this.identifierPtr], new char[][]{Keywords.EXTENDS, Keywords.SUPER} ); wildcard.kind = Wildcard.EXTENDS; wildcard.bound = keyword; this.identifierPtr--; this.identifierLengthPtr--; this.assistNode = wildcard.bound; this.lastCheckPoint = wildcard.bound.sourceEnd + 1; } @Override
protected void consumeWildcard() { super.consumeWildcard(); if (assistIdentifier() == null && this.currentToken == TokenNameIdentifier) { // Test below copied from CompletionScanner.getCurrentIdentifierSource() if (this.cursorLocation < this.scanner.startPosition && this.scanner.currentPosition == this.scanner.startPosition){ // fake empty identifier got issued this.pushIdentifier(); } else if (this.cursorLocation+1 >= this.scanner.startPosition && this.cursorLocation < this.scanner.currentPosition){ this.pushIdentifier(); } else { return; } } else { return; } Wildcard wildcard = (Wildcard) this.genericsStack[this.genericsPtr]; CompletionOnKeyword1 keyword = new CompletionOnKeyword1( this.identifierStack[this.identifierPtr], this.identifierPositionStack[this.identifierPtr], new char[][]{Keywords.EXTENDS, Keywords.SUPER} ); wildcard.kind = Wildcard.EXTENDS; wildcard.bound = keyword; this.identifierPtr--; this.identifierLengthPtr--; this.assistNode = wildcard.bound; this.lastCheckPoint = wildcard.bound.sourceEnd + 1; } protected void consumeWildcard1() {
protected void consumeTypeParameterHeader() { super.consumeTypeParameterHeader(); TypeParameter typeParameter = (TypeParameter) this.genericsStack[this.genericsPtr]; if(typeParameter.type != null || (typeParameter.bounds != null && typeParameter.bounds.length > 0)) return; if (assistIdentifier() == null && this.currentToken == TokenNameIdentifier) { // Test below copied from CompletionScanner.getCurrentIdentifierSource() if (this.cursorLocation < this.scanner.startPosition && this.scanner.currentPosition == this.scanner.startPosition){ // fake empty identifier got issued this.pushIdentifier(); } else if (this.cursorLocation+1 >= this.scanner.startPosition && this.cursorLocation < this.scanner.currentPosition){ this.pushIdentifier(); } else { return; } } else { return; } CompletionOnKeyword1 keyword = new CompletionOnKeyword1( this.identifierStack[this.identifierPtr], this.identifierPositionStack[this.identifierPtr], Keywords.EXTENDS); typeParameter.type = keyword; this.identifierPtr--; this.identifierLengthPtr--; this.assistNode = typeParameter.type; this.lastCheckPoint = typeParameter.type.sourceEnd + 1; } protected void consumeTypeParameter1() {
protected void consumeWildcard() { super.consumeWildcard(); if (assistIdentifier() == null && this.currentToken == TokenNameIdentifier) { // Test below copied from CompletionScanner.getCurrentIdentifierSource() if (this.cursorLocation < this.scanner.startPosition && this.scanner.currentPosition == this.scanner.startPosition){ // fake empty identifier got issued this.pushIdentifier(); } else if (this.cursorLocation+1 >= this.scanner.startPosition && this.cursorLocation < this.scanner.currentPosition){ this.pushIdentifier(); } else { return; } } else { return; } Wildcard wildcard = (Wildcard) this.genericsStack[this.genericsPtr]; CompletionOnKeyword1 keyword = new CompletionOnKeyword1( this.identifierStack[this.identifierPtr], this.identifierPositionStack[this.identifierPtr], new char[][]{Keywords.EXTENDS, Keywords.SUPER} ); wildcard.kind = Wildcard.EXTENDS; wildcard.bound = keyword; this.identifierPtr--; this.identifierLengthPtr--; this.assistNode = wildcard.bound; this.lastCheckPoint = wildcard.bound.sourceEnd + 1; } protected void consumeWildcard1() {
protected void consumeTypeParameterHeader() { super.consumeTypeParameterHeader(); TypeParameter typeParameter = (TypeParameter) this.genericsStack[this.genericsPtr]; if(typeParameter.type != null || (typeParameter.bounds != null && typeParameter.bounds.length > 0)) return; if (assistIdentifier() == null && this.currentToken == TokenNameIdentifier) { // Test below copied from CompletionScanner.getCurrentIdentifierSource() if (this.cursorLocation < this.scanner.startPosition && this.scanner.currentPosition == this.scanner.startPosition){ // fake empty identifier got issued this.pushIdentifier(); } else if (this.cursorLocation+1 >= this.scanner.startPosition && this.cursorLocation < this.scanner.currentPosition){ this.pushIdentifier(); } else { return; } } else { return; } CompletionOnKeyword1 keyword = new CompletionOnKeyword1( this.identifierStack[this.identifierPtr], this.identifierPositionStack[this.identifierPtr], Keywords.EXTENDS); typeParameter.type = keyword; this.identifierPtr--; this.identifierLengthPtr--; this.assistNode = typeParameter.type; this.lastCheckPoint = typeParameter.type.sourceEnd + 1; } protected void consumeTypeParameter1() {
protected void consumeTypeParameterHeader() { super.consumeTypeParameterHeader(); TypeParameter typeParameter = (TypeParameter) this.genericsStack[this.genericsPtr]; if(typeParameter.type != null || (typeParameter.bounds != null && typeParameter.bounds.length > 0)) return; if (assistIdentifier() == null && this.currentToken == TokenNameIdentifier) { // Test below copied from CompletionScanner.getCurrentIdentifierSource() if (this.cursorLocation < this.scanner.startPosition && this.scanner.currentPosition == this.scanner.startPosition){ // fake empty identifier got issued this.pushIdentifier(); } else if (this.cursorLocation+1 >= this.scanner.startPosition && this.cursorLocation < this.scanner.currentPosition){ this.pushIdentifier(); } else { return; } } else { return; } CompletionOnKeyword1 keyword = new CompletionOnKeyword1( this.identifierStack[this.identifierPtr], this.identifierPositionStack[this.identifierPtr], Keywords.EXTENDS); typeParameter.type = keyword; this.identifierPtr--; this.identifierLengthPtr--; this.assistNode = typeParameter.type; this.lastCheckPoint = typeParameter.type.sourceEnd + 1; } protected void consumeTypeParameter1() {
protected void consumeTypeParameterHeader() { super.consumeTypeParameterHeader(); TypeParameter typeParameter = (TypeParameter) this.genericsStack[this.genericsPtr]; if(typeParameter.type != null || (typeParameter.bounds != null && typeParameter.bounds.length > 0)) return; if (assistIdentifier() == null && this.currentToken == TokenNameIdentifier) { // Test below copied from CompletionScanner.getCurrentIdentifierSource() if (this.cursorLocation < this.scanner.startPosition && this.scanner.currentPosition == this.scanner.startPosition){ // fake empty identifier got issued this.pushIdentifier(); } else if (this.cursorLocation+1 >= this.scanner.startPosition && this.cursorLocation < this.scanner.currentPosition){ this.pushIdentifier(); } else { return; } } else { return; } CompletionOnKeyword1 keyword = new CompletionOnKeyword1( this.identifierStack[this.identifierPtr], this.identifierPositionStack[this.identifierPtr], Keywords.EXTENDS); typeParameter.type = keyword; this.identifierPtr--; this.identifierLengthPtr--; this.assistNode = typeParameter.type; this.lastCheckPoint = typeParameter.type.sourceEnd + 1; } protected void consumeTypeParameter1() {
assistIdentifier(), positions[0]); } else { assistIdentifier(), positions);
if (assistIdentifier() == null && this.currentToken == TokenNameIdentifier) { // Test below copied from CompletionScanner.getCurrentIdentifierSource() if (this.cursorLocation < this.scanner.startPosition && this.scanner.currentPosition == this.scanner.startPosition){ // fake empty identifier got issued this.pushIdentifier();
if (assistIdentifier() == null && this.currentToken == TokenNameIdentifier) { // Test below copied from CompletionScanner.getCurrentIdentifierSource() if (this.cursorLocation < this.scanner.startPosition && this.scanner.currentPosition == this.scanner.startPosition){ // fake empty identifier got issued this.pushIdentifier();