protected StringLiteral createStringLiteral(char[] token, int start, int end, int lineNumber) { return new StringLiteral(token, start, end, lineNumber); } protected RecoveredType currentRecoveryType() {
@Override public boolean visit(StringLiteral stringLiteral, BlockScope scope) { context.enter(factory.Code().createLiteral(CharOperation.charToString(stringLiteral.source())), stringLiteral); return true; }
@Override public StringBuffer printExpression(int indent, StringBuffer output) { output.append("<CompletionOnString:"); //$NON-NLS-1$ output = super.printExpression(indent, output); return output.append('>'); } }
if (expr2 instanceof CharLiteral) { // string+char this.expressionStack[this.expressionPtr] = ((StringLiteral) expr1).extendWith((CharLiteral) expr2); } else if (expr2 instanceof StringLiteral) { //string+string this.expressionStack[this.expressionPtr] = ((StringLiteral) expr1).extendWith((StringLiteral) expr2); } else { this.expressionStack[this.expressionPtr] = new BinaryExpression(expr1, expr2, PLUS); ((StringLiteral) expr1).extendsWith((StringLiteral) expr2); } else { this.expressionStack[this.expressionPtr] =
public boolean isCastCompatible(ITypeBinding type) { try { Scope scope = this.resolver.scope(); if (scope == null) return false; if (!(type instanceof TypeBinding)) return false; org.eclipse.jdt.internal.compiler.lookup.TypeBinding expressionType = ((TypeBinding) type).binding; // simulate capture in case checked binding did not properly get extracted from a reference expressionType = expressionType.capture(scope, 0, 0); return TypeBinding.EXPRESSION.checkCastTypesCompatibility(scope, this.binding, expressionType, null); } catch (AbortCompilation e) { // don't surface internal exception to clients // see https://bugs.eclipse.org/bugs/show_bug.cgi?id=143013 return false; } }
if (expr2 instanceof CharLiteral) { // string+char this.expressionStack[this.expressionPtr] = ((StringLiteral) expr1).extendWith((CharLiteral) expr2); } else if (expr2 instanceof StringLiteral) { //string+string this.expressionStack[this.expressionPtr] = ((StringLiteral) expr1).extendWith((StringLiteral) expr2); } else { this.expressionStack[this.expressionPtr] = new BinaryExpression(expr1, expr2, PLUS); ((StringLiteral) expr1).extendsWith((StringLiteral) expr2); } else { this.expressionStack[this.expressionPtr] =
public boolean isCastCompatible(ITypeBinding type) { try { Scope scope = this.resolver.scope(); if (scope == null) return false; if (!(type instanceof TypeBinding)) return false; org.eclipse.jdt.internal.compiler.lookup.TypeBinding expressionType = ((TypeBinding) type).binding; // simulate capture in case checked binding did not properly get extracted from a reference expressionType = expressionType.capture(scope, 0, 0); return TypeBinding.EXPRESSION.checkCastTypesCompatibility(scope, this.binding, expressionType, null); } catch (AbortCompilation e) { // don't surface internal exception to clients // see https://bugs.eclipse.org/bugs/show_bug.cgi?id=143013 return false; } }
if (expr2 instanceof CharLiteral) { // string+char this.expressionStack[this.expressionPtr] = ((StringLiteral) expr1).extendWith((CharLiteral) expr2); } else if (expr2 instanceof StringLiteral) { //string+string this.expressionStack[this.expressionPtr] = ((StringLiteral) expr1).extendWith((StringLiteral) expr2); } else { this.expressionStack[this.expressionPtr] = new BinaryExpression(expr1, expr2, PLUS); ((StringLiteral) expr1).extendsWith((StringLiteral) expr2); } else { this.expressionStack[this.expressionPtr] =
protected StringLiteral createStringLiteral(char[] token, int start, int end, int lineNumber) { return new StringLiteral(token, start, end, lineNumber); } protected RecoveredType currentRecoveryType() {
@Override public void visitStringLiteral(StringLiteral node) { set(node, setPosition(node, new lombok.ast.StringLiteral().astValue(String.valueOf(node.source())))); }
public StringBuffer printExpression(int indent, StringBuffer output) { output.append("<CompletionOnString:"); //$NON-NLS-1$ output = super.printExpression(indent, output); return output.append('>'); } }
@Override public boolean isCastCompatible(ITypeBinding type) { try { Scope scope = this.resolver.scope(); if (scope == null) return false; if (!(type instanceof TypeBinding)) return false; org.eclipse.jdt.internal.compiler.lookup.TypeBinding expressionType = ((TypeBinding) type).binding; // simulate capture in case checked binding did not properly get extracted from a reference expressionType = expressionType.capture(scope, 0, 0); return TypeBinding.EXPRESSION.checkCastTypesCompatibility(scope, this.binding, expressionType, null); } catch (AbortCompilation e) { // don't surface internal exception to clients // see https://bugs.eclipse.org/bugs/show_bug.cgi?id=143013 return false; } }
if (expr2 instanceof CharLiteral) { // string+char this.expressionStack[this.expressionPtr] = ((StringLiteral) expr1).extendWith((CharLiteral) expr2); } else if (expr2 instanceof StringLiteral) { //string+string this.expressionStack[this.expressionPtr] = ((StringLiteral) expr1).extendWith((StringLiteral) expr2); } else { this.expressionStack[this.expressionPtr] = new BinaryExpression(expr1, expr2, PLUS); ((StringLiteral) expr1).extendsWith((StringLiteral) expr2); } else { this.expressionStack[this.expressionPtr] =
protected StringLiteral createStringLiteral(char[] token, int start, int end, int lineNumber) { return new StringLiteral(token, start, end, lineNumber); } protected RecoveredType currentRecoveryType() {
@Override public void visitStringLiteral(StringLiteral node) { set(node, setPosition(node, new lombok.ast.StringLiteral().astValue(String.valueOf(node.source())))); }
public StringBuffer printExpression(int indent, StringBuffer output) { output.append("<CompletionOnString:"); //$NON-NLS-1$ output = super.printExpression(indent, output); return output.append('>'); } }
public boolean isCastCompatible(ITypeBinding type) { try { Scope scope = this.resolver.scope(); if (scope == null) return false; if (!(type instanceof TypeBinding)) return false; org.eclipse.jdt.internal.compiler.lookup.TypeBinding expressionType = ((TypeBinding) type).binding; // simulate capture in case checked binding did not properly get extracted from a reference expressionType = expressionType.capture(scope, 0); return TypeBinding.EXPRESSION.checkCastTypesCompatibility(scope, this.binding, expressionType, null); } catch (AbortCompilation e) { // don't surface internal exception to clients // see https://bugs.eclipse.org/bugs/show_bug.cgi?id=143013 return false; } }
if (expr2 instanceof CharLiteral) { // string+char this.expressionStack[this.expressionPtr] = ((StringLiteral) expr1).extendWith((CharLiteral) expr2); } else if (expr2 instanceof StringLiteral) { //string+string this.expressionStack[this.expressionPtr] = ((StringLiteral) expr1).extendWith((StringLiteral) expr2); } else { this.expressionStack[this.expressionPtr] = new BinaryExpression(expr1, expr2, PLUS); ((StringLiteral) expr1).extendsWith((StringLiteral) expr2); } else { this.expressionStack[this.expressionPtr] =
protected StringLiteral createStringLiteral(char[] token, int start, int end, int lineNumber) { return new StringLiteral(token, start, end, lineNumber); } protected RecoveredType currentRecoveryType() {
@Override public void visitStringLiteral(StringLiteral node) { set(node, setPosition(node, new lombok.ast.StringLiteral().astValue(String.valueOf(node.source())))); }