protected Object syntaxRecoverQualifiedName(int primitiveToken) throws InvalidInputException { if (this.cursorLocation == ((int)this.identifierPositionStack[this.identifierPtr])) { // special case of completion just before the dot. return createTypeReference(primitiveToken); } int idLength = this.identifierLengthStack[this.identifierLengthPtr]; char[][] tokens = new char[idLength][]; int startPtr = this.identifierPtr-idLength+1; System.arraycopy(this.identifierStack, startPtr, tokens, 0, idLength); long[] positions = new long[idLength+1]; System.arraycopy(this.identifierPositionStack, startPtr, positions, 0, idLength); positions[idLength] = (((long)this.tokenPreviousPosition)<<32) + this.tokenPreviousPosition; this.completionNode = new CompletionOnJavadocQualifiedTypeReference(tokens, CharOperation.NO_CHAR, positions, this.tagSourceStart, this.tagSourceEnd); if (CompletionEngine.DEBUG) { System.out.println(" completion partial qualified type="+this.completionNode); //$NON-NLS-1$ } return this.completionNode; }
output.append("infos:"); //$NON-NLS-1$ char separator = 0; if (completeAnException()) { output.append("exception"); //$NON-NLS-1$ separator = ','; if (completeInText()) { if (separator != 0) output.append(separator); output.append("text"); //$NON-NLS-1$ separator = ','; if (completeBaseTypes()) { if (separator != 0) output.append(separator); output.append("base types"); //$NON-NLS-1$ separator = ','; if (completeFormalReference()) { if (separator != 0) output.append(separator); output.append("formal reference"); //$NON-NLS-1$
if (!this.requestor.isIgnored(CompletionProposal.TYPE_REF) || ((this.assistNodeInJavadoc & CompletionOnJavadoc.TEXT) != 0 && !this.requestor.isIgnored(CompletionProposal.JAVADOC_TYPE_REF))) { int rangeStart = typeRef.completeInText() ? typeRef.sourceStart : (int) (completionPosition >>> 32); setSourceAndTokenRange(rangeStart, (int) completionPosition); findMemberTypes( int rangeStart = typeRef.completeInText() ? typeRef.sourceStart : (int) (completionPosition >>> 32); setTokenRange(rangeStart, (int) completionPosition);
if (!this.requestor.isIgnored(CompletionProposal.TYPE_REF) || ((this.assistNodeInJavadoc & CompletionOnJavadoc.TEXT) != 0 && !this.requestor.isIgnored(CompletionProposal.JAVADOC_TYPE_REF))) { int rangeStart = typeRef.completeInText() ? typeRef.sourceStart : (int) (completionPosition >>> 32); setSourceAndTokenRange(rangeStart, (int) completionPosition); findMemberTypes( int rangeStart = typeRef.completeInText() ? typeRef.sourceStart : (int) (completionPosition >>> 32); setTokenRange(rangeStart, (int) completionPosition);
output.append("infos:"); //$NON-NLS-1$ char separator = 0; if (completeAnException()) { output.append("exception"); //$NON-NLS-1$ separator = ','; if (completeInText()) { if (separator != 0) output.append(separator); output.append("text"); //$NON-NLS-1$ separator = ','; if (completeBaseTypes()) { if (separator != 0) output.append(separator); output.append("base types"); //$NON-NLS-1$ separator = ','; if (completeFormalReference()) { if (separator != 0) output.append(separator); output.append("formal reference"); //$NON-NLS-1$
@Override protected Object syntaxRecoverQualifiedName(int primitiveToken) throws InvalidInputException { if (this.cursorLocation == ((int)this.identifierPositionStack[this.identifierPtr])) { // special case of completion just before the dot. return createTypeReference(primitiveToken); } int idLength = this.identifierLengthStack[this.identifierLengthPtr]; char[][] tokens = new char[idLength][]; int startPtr = this.identifierPtr-idLength+1; System.arraycopy(this.identifierStack, startPtr, tokens, 0, idLength); long[] positions = new long[idLength+1]; System.arraycopy(this.identifierPositionStack, startPtr, positions, 0, idLength); positions[idLength] = (((long)this.tokenPreviousPosition)<<32) + this.tokenPreviousPosition; this.completionNode = new CompletionOnJavadocQualifiedTypeReference(tokens, CharOperation.NO_CHAR, positions, this.tagSourceStart, this.tagSourceEnd); if (CompletionEngine.DEBUG) { System.out.println(" completion partial qualified type="+this.completionNode); //$NON-NLS-1$ } return this.completionNode; }
if (!this.requestor.isIgnored(CompletionProposal.TYPE_REF) || ((this.assistNodeInJavadoc & CompletionOnJavadoc.TEXT) != 0 && !this.requestor.isIgnored(CompletionProposal.JAVADOC_TYPE_REF))) { int rangeStart = typeRef.completeInText() ? typeRef.sourceStart : (int) (completionPosition >>> 32); setSourceAndTokenRange(rangeStart, (int) completionPosition); findMemberTypes( int rangeStart = typeRef.completeInText() ? typeRef.sourceStart : (int) (completionPosition >>> 32); setTokenRange(rangeStart, (int) completionPosition);
output.append("infos:"); //$NON-NLS-1$ char separator = 0; if (completeAnException()) { output.append("exception"); //$NON-NLS-1$ separator = ','; if (completeInText()) { if (separator != 0) output.append(separator); output.append("text"); //$NON-NLS-1$ separator = ','; if (completeBaseTypes()) { if (separator != 0) output.append(separator); output.append("base types"); //$NON-NLS-1$ separator = ','; if (completeFormalReference()) { if (separator != 0) output.append(separator); output.append("formal reference"); //$NON-NLS-1$
protected Object syntaxRecoverQualifiedName(int primitiveToken) throws InvalidInputException { if (this.cursorLocation == ((int)this.identifierPositionStack[this.identifierPtr])) { // special case of completion just before the dot. return createTypeReference(primitiveToken); } int idLength = this.identifierLengthStack[this.identifierLengthPtr]; char[][] tokens = new char[idLength][]; int startPtr = this.identifierPtr-idLength+1; System.arraycopy(this.identifierStack, startPtr, tokens, 0, idLength); long[] positions = new long[idLength+1]; System.arraycopy(this.identifierPositionStack, startPtr, positions, 0, idLength); positions[idLength] = (((long)this.tokenPreviousPosition)<<32) + this.tokenPreviousPosition; this.completionNode = new CompletionOnJavadocQualifiedTypeReference(tokens, CharOperation.NO_CHAR, positions, this.tagSourceStart, this.tagSourceEnd); if (CompletionEngine.DEBUG) { System.out.println(" completion partial qualified type="+this.completionNode); //$NON-NLS-1$ } return this.completionNode; }
if (!this.requestor.isIgnored(CompletionProposal.TYPE_REF) || ((this.assistNodeInJavadoc & CompletionOnJavadoc.TEXT) != 0 && !this.requestor.isIgnored(CompletionProposal.JAVADOC_TYPE_REF))) { int rangeStart = typeRef.completeInText() ? typeRef.sourceStart : (int) (completionPosition >>> 32); setSourceAndTokenRange(rangeStart, (int) completionPosition); findMemberTypes( int rangeStart = typeRef.completeInText() ? typeRef.sourceStart : (int) (completionPosition >>> 32); setTokenRange(rangeStart, (int) completionPosition);
output.append("infos:"); //$NON-NLS-1$ char separator = 0; if (completeAnException()) { output.append("exception"); //$NON-NLS-1$ separator = ','; if (completeInText()) { if (separator != 0) output.append(separator); output.append("text"); //$NON-NLS-1$ separator = ','; if (completeBaseTypes()) { if (separator != 0) output.append(separator); output.append("base types"); //$NON-NLS-1$ separator = ','; if (completeFormalReference()) { if (separator != 0) output.append(separator); output.append("formal reference"); //$NON-NLS-1$
protected Object syntaxRecoverQualifiedName(int primitiveToken) throws InvalidInputException { if (this.cursorLocation == ((int)this.identifierPositionStack[this.identifierPtr])) { // special case of completion just before the dot. return createTypeReference(primitiveToken); } int idLength = this.identifierLengthStack[this.identifierLengthPtr]; char[][] tokens = new char[idLength][]; int startPtr = this.identifierPtr-idLength+1; System.arraycopy(this.identifierStack, startPtr, tokens, 0, idLength); long[] positions = new long[idLength+1]; System.arraycopy(this.identifierPositionStack, startPtr, positions, 0, idLength); positions[idLength] = (((long)this.tokenPreviousPosition)<<32) + this.tokenPreviousPosition; this.completionNode = new CompletionOnJavadocQualifiedTypeReference(tokens, CharOperation.NO_CHAR, positions, this.tagSourceStart, this.tagSourceEnd); if (CompletionEngine.DEBUG) { System.out.println(" completion partial qualified type="+this.completionNode); //$NON-NLS-1$ } return this.completionNode; }
if (!this.requestor.isIgnored(CompletionProposal.TYPE_REF) || ((this.assistNodeInJavadoc & CompletionOnJavadoc.TEXT) != 0 && !this.requestor.isIgnored(CompletionProposal.JAVADOC_TYPE_REF))) { int rangeStart = typeRef.completeInText() ? typeRef.sourceStart : (int) (completionPosition >>> 32); setSourceAndTokenRange(rangeStart, (int) completionPosition); findMemberTypes( int rangeStart = typeRef.completeInText() ? typeRef.sourceStart : (int) (completionPosition >>> 32); setTokenRange(rangeStart, (int) completionPosition);
output.append("infos:"); //$NON-NLS-1$ char separator = 0; if (completeAnException()) { output.append("exception"); //$NON-NLS-1$ separator = ','; if (completeInText()) { if (separator != 0) output.append(separator); output.append("text"); //$NON-NLS-1$ separator = ','; if (completeBaseTypes()) { if (separator != 0) output.append(separator); output.append("base types"); //$NON-NLS-1$ separator = ','; if (completeFormalReference()) { if (separator != 0) output.append(separator); output.append("formal reference"); //$NON-NLS-1$
protected Object syntaxRecoverQualifiedName(int primitiveToken) throws InvalidInputException { if (this.cursorLocation == ((int)this.identifierPositionStack[this.identifierPtr])) { // special case of completion just before the dot. return createTypeReference(primitiveToken); } int idLength = this.identifierLengthStack[this.identifierLengthPtr]; char[][] tokens = new char[idLength][]; int startPtr = this.identifierPtr-idLength+1; System.arraycopy(this.identifierStack, startPtr, tokens, 0, idLength); long[] positions = new long[idLength+1]; System.arraycopy(this.identifierPositionStack, startPtr, positions, 0, idLength); positions[idLength] = (((long)this.tokenPreviousPosition)<<32) + this.tokenPreviousPosition; this.completionNode = new CompletionOnJavadocQualifiedTypeReference(tokens, CharOperation.NO_CHAR, positions, this.tagSourceStart, this.tagSourceEnd); if (CompletionEngine.DEBUG) { System.out.println(" completion partial qualified type="+this.completionNode); //$NON-NLS-1$ } return this.completionNode; }
if (!this.requestor.isIgnored(CompletionProposal.TYPE_REF) || ((this.assistNodeInJavadoc & CompletionOnJavadoc.TEXT) != 0 && !this.requestor.isIgnored(CompletionProposal.JAVADOC_TYPE_REF))) { int rangeStart = typeRef.completeInText() ? typeRef.sourceStart : (int) (completionPosition >>> 32); setSourceAndTokenRange(rangeStart, (int) completionPosition); findMemberTypes( int rangeStart = typeRef.completeInText() ? typeRef.sourceStart : (int) (completionPosition >>> 32); setTokenRange(rangeStart, (int) completionPosition);
output.append("infos:"); //$NON-NLS-1$ char separator = 0; if (completeAnException()) { output.append("exception"); //$NON-NLS-1$ separator = ','; if (completeInText()) { if (separator != 0) output.append(separator); output.append("text"); //$NON-NLS-1$ separator = ','; if (completeBaseTypes()) { if (separator != 0) output.append(separator); output.append("base types"); //$NON-NLS-1$ separator = ','; if (completeFormalReference()) { if (separator != 0) output.append(separator); output.append("formal reference"); //$NON-NLS-1$
protected Object syntaxRecoverQualifiedName(int primitiveToken) throws InvalidInputException { if (this.cursorLocation == ((int)this.identifierPositionStack[this.identifierPtr])) { // special case of completion just before the dot. return createTypeReference(primitiveToken); } int idLength = this.identifierLengthStack[this.identifierLengthPtr]; char[][] tokens = new char[idLength][]; int startPtr = this.identifierPtr-idLength+1; System.arraycopy(this.identifierStack, startPtr, tokens, 0, idLength); long[] positions = new long[idLength+1]; System.arraycopy(this.identifierPositionStack, startPtr, positions, 0, idLength); positions[idLength] = (((long)this.tokenPreviousPosition)<<32) + this.tokenPreviousPosition; this.completionNode = new CompletionOnJavadocQualifiedTypeReference(tokens, CharOperation.NO_CHAR, positions, this.tagSourceStart, this.tagSourceEnd); if (CompletionEngine.DEBUG) { System.out.println(" completion partial qualified type="+this.completionNode); //$NON-NLS-1$ } return this.completionNode; }
protected Object createArgumentReference(char[] name, int dim, boolean isVarargs, Object typeRef, long[] dimPositions, long argNamePos) throws InvalidInputException { // Create argument as we may need it after char[] argName = name==null ? CharOperation.NO_CHAR : name; Expression expression = (Expression) super.createArgumentReference(argName, dim, isVarargs, typeRef, dimPositions, argNamePos); // See if completion location is in argument int refStart = ((TypeReference)typeRef).sourceStart; int refEnd = ((TypeReference)typeRef).sourceEnd; boolean inCompletion = (refStart <= this.cursorLocation && this.cursorLocation <= refEnd) // completion cursor is between first and last stacked identifiers || ((refStart == (refEnd+1) && refEnd == this.cursorLocation)); // or it's a completion on empty token if (this.completionNode == null && inCompletion) { JavadocArgumentExpression javadocArgument = (JavadocArgumentExpression) expression; TypeReference expressionType = javadocArgument.argument.type; if (expressionType instanceof JavadocSingleTypeReference) { this.completionNode = new CompletionOnJavadocSingleTypeReference((JavadocSingleTypeReference) expressionType); } else if (expressionType instanceof JavadocQualifiedTypeReference) { this.completionNode = new CompletionOnJavadocQualifiedTypeReference((JavadocQualifiedTypeReference) expressionType); } if (CompletionEngine.DEBUG) { System.out.println(" completion argument="+this.completionNode); //$NON-NLS-1$ } return this.completionNode; } return expression; }
protected Object createArgumentReference(char[] name, int dim, boolean isVarargs, Object typeRef, long[] dimPositions, long argNamePos) throws InvalidInputException { // Create argument as we may need it after char[] argName = name==null ? CharOperation.NO_CHAR : name; Expression expression = (Expression) super.createArgumentReference(argName, dim, isVarargs, typeRef, dimPositions, argNamePos); // See if completion location is in argument int refStart = ((TypeReference)typeRef).sourceStart; int refEnd = ((TypeReference)typeRef).sourceEnd; boolean inCompletion = (refStart <= this.cursorLocation && this.cursorLocation <= refEnd) // completion cursor is between first and last stacked identifiers || ((refStart == (refEnd+1) && refEnd == this.cursorLocation)); // or it's a completion on empty token if (this.completionNode == null && inCompletion) { JavadocArgumentExpression javadocArgument = (JavadocArgumentExpression) expression; TypeReference expressionType = javadocArgument.argument.type; if (expressionType instanceof JavadocSingleTypeReference) { this.completionNode = new CompletionOnJavadocSingleTypeReference((JavadocSingleTypeReference) expressionType); } else if (expressionType instanceof JavadocQualifiedTypeReference) { this.completionNode = new CompletionOnJavadocQualifiedTypeReference((JavadocQualifiedTypeReference) expressionType); } if (CompletionEngine.DEBUG) { System.out.println(" completion argument="+this.completionNode); //$NON-NLS-1$ } return this.completionNode; } return expression; }