Binding qualifiedBinding, Scope scope) { InternalCompletionContext context = new InternalCompletionContext(); if (this.requestor.isExtendedContextRequired()) { context.setExtendedData( this.typeRoot, compilationUnitDeclaration, context.setExpectedTypesSignatures(expTypes); context.setExpectedTypesKeys(expKeys); context.setOffset(this.actualCompletionPosition + 1 - this.offset); context.setJavadoc(this.assistNodeInJavadoc); context.setToken(scanner.completionIdentifier); context.setTokenRange( scanner.completedIdentifierStart - this.offset, scanner.completedIdentifierEnd - this.offset, } else if(astNode instanceof CompletionOnJavadocTag) { CompletionOnJavadocTag javadocTag = (CompletionOnJavadocTag) astNode; context.setToken(CharOperation.concat(new char[]{'@'}, javadocTag.token)); context.setTokenRange( javadocTag.tagSourceStart - this.offset, javadocTag.tagSourceEnd - this.offset, } else { CompletionScanner scanner = (CompletionScanner)this.parser.javadocParser.scanner;
@Override public Optional<String> getExpectedTypeSignature() { if (coreContext == null) { return absent(); } // keys contain '/' instead of dots and may end with ';' final char[][] keys = coreContext.getExpectedTypesKeys(); if (keys == null) { return absent(); } if (keys.length < 1) { return absent(); } final String res = new String(keys[0]); return of(res); }
private void buildTokenLocationContext(InternalCompletionContext context, Scope scope, ASTNode astNode, ASTNode astNodeParent) { if (scope == null || context.isInJavadoc()) return; field.modifiers == ClassFileConstants.AccDefault && (field.annotations == null || field.annotations.length == 0)) { context.setTokenLocation(CompletionContext.TL_MEMBER_START); if (method.modifiers == ClassFileConstants.AccDefault && (method.annotations == null || method.annotations.length == 0)) { context.setTokenLocation(CompletionContext.TL_MEMBER_START); astNode instanceof CompletionOnSingleNameReference && !((CompletionOnSingleNameReference)astNode).isPrecededByModifiers) { context.setTokenLocation(CompletionContext.TL_STATEMENT_START); astNode instanceof CompletionOnSingleNameReference && !((CompletionOnSingleNameReference)astNode).isPrecededByModifiers) { context.setTokenLocation(CompletionContext.TL_STATEMENT_START);
if(!contextAccepted) { contextAccepted = true; InternalCompletionContext context = new InternalCompletionContext(); context.setOffset(completionPosition - this.offset); context.setTokenKind(CompletionContext.TOKEN_KIND_UNKNOWN); if (this.requestor.isExtendedContextRequired()) context.setExtended(); this.requestor.acceptContext(context); if(!contextAccepted) { contextAccepted = true; InternalCompletionContext context = new InternalCompletionContext(); context.setTokenKind(CompletionContext.TOKEN_KIND_UNKNOWN); context.setOffset(completionPosition - this.offset); if (this.requestor.isExtendedContextRequired()) context.setExtended(); this.requestor.acceptContext(context);
if(!contextAccepted) { contextAccepted = true; InternalCompletionContext context = new InternalCompletionContext(); if (this.requestor.isExtendedContextRequired()) context.setExtended(); this.requestor.acceptContext(context); InternalCompletionContext context = new InternalCompletionContext(); if (this.requestor.isExtendedContextRequired()) context.setExtended(); this.requestor.acceptContext(context);
if(!contextAccepted) { contextAccepted = true; InternalCompletionContext context = new InternalCompletionContext(); context.setOffset(completionPosition - this.offset); context.setTokenKind(CompletionContext.TOKEN_KIND_UNKNOWN); if (this.requestor.isExtendedContextRequired()) context.setExtended(); this.requestor.acceptContext(context); if(!contextAccepted) { contextAccepted = true; InternalCompletionContext context = new InternalCompletionContext(); context.setTokenKind(CompletionContext.TOKEN_KIND_UNKNOWN); context.setOffset(completionPosition - this.offset); if (this.requestor.isExtendedContextRequired()) context.setExtended(); this.requestor.acceptContext(context);
if(!contextAccepted) { contextAccepted = true; InternalCompletionContext context = new InternalCompletionContext(); if (this.requestor.isExtendedContextRequired()) context.setExtended(); this.requestor.acceptContext(context); InternalCompletionContext context = new InternalCompletionContext(); if (this.requestor.isExtendedContextRequired()) context.setExtended(); this.requestor.acceptContext(context);
Binding qualifiedBinding, Scope scope) { InternalCompletionContext context = new InternalCompletionContext(); if (this.requestor.isExtendedContextRequired()) { context.setExtendedData( this.typeRoot, compilationUnitDeclaration, context.setExpectedTypesSignatures(expTypes); context.setExpectedTypesKeys(expKeys); context.setOffset(this.actualCompletionPosition + 1 - this.offset); context.setJavadoc(this.assistNodeInJavadoc); context.setToken(scanner.completionIdentifier); context.setTokenRange( scanner.completedIdentifierStart - this.offset, scanner.completedIdentifierEnd - this.offset, } else if(astNode instanceof CompletionOnJavadocTag) { CompletionOnJavadocTag javadocTag = (CompletionOnJavadocTag) astNode; context.setToken(CharOperation.concat(new char[]{'@'}, javadocTag.token)); context.setTokenRange( javadocTag.tagSourceStart - this.offset, javadocTag.tagSourceEnd - this.offset, } else { CompletionScanner scanner = (CompletionScanner)this.parser.javadocParser.scanner;
if(!contextAccepted) { contextAccepted = true; InternalCompletionContext context = new InternalCompletionContext(); context.setOffset(completionPosition - this.offset); context.setTokenKind(CompletionContext.TOKEN_KIND_UNKNOWN); if (this.requestor.isExtendedContextRequired()) context.setExtended(); this.requestor.acceptContext(context); if(!contextAccepted) { contextAccepted = true; InternalCompletionContext context = new InternalCompletionContext(); context.setTokenKind(CompletionContext.TOKEN_KIND_UNKNOWN); context.setOffset(completionPosition - this.offset); if (this.requestor.isExtendedContextRequired()) context.setExtended(); this.requestor.acceptContext(context);
private void buildTokenLocationContext(InternalCompletionContext context, Scope scope, ASTNode astNode, ASTNode astNodeParent) { if (scope == null || context.isInJavadoc()) return; field.modifiers == ClassFileConstants.AccDefault && (field.annotations == null || field.annotations.length == 0)) { context.setTokenLocation(CompletionContext.TL_MEMBER_START); if (method.modifiers == ClassFileConstants.AccDefault && (method.annotations == null || method.annotations.length == 0)) { context.setTokenLocation(CompletionContext.TL_MEMBER_START); context.setTokenLocation(CompletionContext.TL_CONSTRUCTOR_START); context.setTokenLocation(CompletionContext.TL_CONSTRUCTOR_START); astNode instanceof CompletionOnSingleNameReference && !((CompletionOnSingleNameReference)astNode).isPrecededByModifiers) { context.setTokenLocation(CompletionContext.TL_STATEMENT_START); astNode instanceof CompletionOnSingleNameReference && !((CompletionOnSingleNameReference)astNode).isPrecededByModifiers) { context.setTokenLocation(CompletionContext.TL_STATEMENT_START); astNode instanceof CompletionOnSingleNameReference && !((CompletionOnSingleNameReference)astNode).isPrecededByModifiers) { context.setTokenLocation(CompletionContext.TL_STATEMENT_START);
if(!contextAccepted) { contextAccepted = true; InternalCompletionContext context = new InternalCompletionContext(); if (this.requestor.isExtendedContextRequired()) context.setExtended(); this.requestor.acceptContext(context); InternalCompletionContext context = new InternalCompletionContext(); if (this.requestor.isExtendedContextRequired()) context.setExtended(); this.requestor.acceptContext(context);
@Override public Set<ITypeName> getExpectedTypeNames() { ASTNode completion = getCompletionNode().orNull(); char[][] keys = isArgumentCompletion(completion) && getPrefix().isEmpty() ? simulateCompletionWithFakePrefix() : coreContext.getExpectedTypesKeys(); return createTypeNamesFromKeys(keys); }
Binding qualifiedBinding, Scope scope) { InternalCompletionContext context = new InternalCompletionContext(); if (this.requestor.isExtendedContextRequired()) { context.setExtendedData( this.typeRoot, compilationUnitDeclaration, context.setExpectedTypesSignatures(expTypes); context.setExpectedTypesKeys(expKeys); context.setOffset(this.actualCompletionPosition + 1 - this.offset); context.setJavadoc(this.assistNodeInJavadoc); context.setToken(scanner.completionIdentifier); context.setTokenRange( scanner.completedIdentifierStart - this.offset, scanner.completedIdentifierEnd - this.offset, } else if(astNode instanceof CompletionOnJavadocTag) { CompletionOnJavadocTag javadocTag = (CompletionOnJavadocTag) astNode; context.setToken(CharOperation.concat(new char[]{'@'}, javadocTag.token)); context.setTokenRange( javadocTag.tagSourceStart - this.offset, javadocTag.tagSourceEnd - this.offset, } else { CompletionScanner scanner = (CompletionScanner)this.parser.javadocParser.scanner;
if(!contextAccepted) { contextAccepted = true; InternalCompletionContext context = new InternalCompletionContext(); context.setOffset(completionPosition - this.offset); context.setTokenKind(CompletionContext.TOKEN_KIND_UNKNOWN); if (this.requestor.isExtendedContextRequired()) context.setExtended(); this.requestor.acceptContext(context); if(!contextAccepted) { contextAccepted = true; InternalCompletionContext context = new InternalCompletionContext(); context.setTokenKind(CompletionContext.TOKEN_KIND_UNKNOWN); context.setOffset(completionPosition - this.offset); if (this.requestor.isExtendedContextRequired()) context.setExtended(); this.requestor.acceptContext(context);
private void buildTokenLocationContext(InternalCompletionContext context, Scope scope, ASTNode astNode, ASTNode astNodeParent) { if (scope == null || context.isInJavadoc()) return; field.modifiers == ClassFileConstants.AccDefault && (field.annotations == null || field.annotations.length == 0)) { context.setTokenLocation(CompletionContext.TL_MEMBER_START); if (method.modifiers == ClassFileConstants.AccDefault && (method.annotations == null || method.annotations.length == 0)) { context.setTokenLocation(CompletionContext.TL_MEMBER_START); context.setTokenLocation(CompletionContext.TL_CONSTRUCTOR_START); context.setTokenLocation(CompletionContext.TL_CONSTRUCTOR_START); astNode instanceof CompletionOnSingleNameReference && !((CompletionOnSingleNameReference)astNode).isPrecededByModifiers) { context.setTokenLocation(CompletionContext.TL_STATEMENT_START); astNode instanceof CompletionOnSingleNameReference && !((CompletionOnSingleNameReference)astNode).isPrecededByModifiers) { context.setTokenLocation(CompletionContext.TL_STATEMENT_START); astNode instanceof CompletionOnSingleNameReference && !((CompletionOnSingleNameReference)astNode).isPrecededByModifiers) { context.setTokenLocation(CompletionContext.TL_STATEMENT_START);
if(!contextAccepted) { contextAccepted = true; InternalCompletionContext context = new InternalCompletionContext(); if (this.requestor.isExtendedContextRequired()) context.setExtended(); this.requestor.acceptContext(context); InternalCompletionContext context = new InternalCompletionContext(); if (this.requestor.isExtendedContextRequired()) context.setExtended(); this.requestor.acceptContext(context);
if (scope.compilerOptions().sourceLevel < ClassFileConstants.JDK1_7) return false; char[][] expectedTypekeys= this.completionContext.getExpectedTypesKeys(); if (expectedTypekeys == null || expectedTypekeys.length == 0) return true;
Binding qualifiedBinding, Scope scope) { InternalCompletionContext context = new InternalCompletionContext(); if (this.requestor.isExtendedContextRequired()) { context.setExtendedData( this.typeRoot, compilationUnitDeclaration, context.setExpectedTypesSignatures(expTypes); context.setExpectedTypesKeys(expKeys); context.setOffset(this.actualCompletionPosition + 1 - this.offset); context.setJavadoc(this.assistNodeInJavadoc); context.setToken(scanner.completionIdentifier); context.setTokenRange( scanner.completedIdentifierStart - this.offset, scanner.completedIdentifierEnd - this.offset, } else if(astNode instanceof CompletionOnJavadocTag) { CompletionOnJavadocTag javadocTag = (CompletionOnJavadocTag) astNode; context.setToken(CharOperation.concat(new char[]{'@'}, javadocTag.token)); context.setTokenRange( javadocTag.tagSourceStart - this.offset, javadocTag.tagSourceEnd - this.offset, } else { CompletionScanner scanner = (CompletionScanner)this.parser.javadocParser.scanner;
if(!contextAccepted) { contextAccepted = true; InternalCompletionContext context = new InternalCompletionContext(); context.setOffset(completionPosition - this.offset); context.setTokenKind(CompletionContext.TOKEN_KIND_UNKNOWN); if (this.requestor.isExtendedContextRequired()) context.setExtended(); this.requestor.acceptContext(context); if(!contextAccepted) { contextAccepted = true; InternalCompletionContext context = new InternalCompletionContext(); context.setTokenKind(CompletionContext.TOKEN_KIND_UNKNOWN); context.setOffset(completionPosition - this.offset); if (this.requestor.isExtendedContextRequired()) context.setExtended(); this.requestor.acceptContext(context);
private void buildTokenLocationContext(InternalCompletionContext context, Scope scope, ASTNode astNode, ASTNode astNodeParent) { if (scope == null || context.isInJavadoc()) return; field.modifiers == ClassFileConstants.AccDefault && (field.annotations == null || field.annotations.length == 0)) { context.setTokenLocation(CompletionContext.TL_MEMBER_START); if (method.modifiers == ClassFileConstants.AccDefault && (method.annotations == null || method.annotations.length == 0)) { context.setTokenLocation(CompletionContext.TL_MEMBER_START); context.setTokenLocation(CompletionContext.TL_CONSTRUCTOR_START); context.setTokenLocation(CompletionContext.TL_CONSTRUCTOR_START); context.setTokenLocation(CompletionContext.TL_STATEMENT_START); } else { ReferenceContext referenceContext = scope.referenceContext(); astNode instanceof CompletionOnSingleNameReference && !((CompletionOnSingleNameReference)astNode).isPrecededByModifiers) { context.setTokenLocation(CompletionContext.TL_STATEMENT_START); astNode instanceof CompletionOnSingleNameReference && !((CompletionOnSingleNameReference)astNode).isPrecededByModifiers) { context.setTokenLocation(CompletionContext.TL_STATEMENT_START); astNode instanceof CompletionOnSingleNameReference && !((CompletionOnSingleNameReference)astNode).isPrecededByModifiers) { context.setTokenLocation(CompletionContext.TL_STATEMENT_START);