@Override public StringBuffer printStatement(int indent, StringBuffer output) { printAsExpression(indent, output); return output.append(';'); } }
@Override public StringBuffer printAsExpression(int indent, StringBuffer output) { printIndent(indent, output); output.append("<SelectionOnLocalName:"); //$NON-NLS-1$ printModifiers(this.modifiers, output); this.type.print(0, output).append(' ').append(this.name); if (this.initialization != null) { output.append(" = "); //$NON-NLS-1$ this.initialization.printExpression(0, output); } return output.append('>'); }
@Override protected LocalDeclaration createLocalDeclaration(char[] assistName,int sourceStart,int sourceEnd) { if (this.indexOfAssistIdentifier() < 0) { return super.createLocalDeclaration(assistName, sourceStart, sourceEnd); } else { SelectionOnLocalName local = new SelectionOnLocalName(assistName, sourceStart, sourceEnd); this.assistNode = local; this.lastCheckPoint = sourceEnd + 1; return local; } } @Override
@Override public void resolve(BlockScope scope) { super.resolve(scope); if (isTypeNameVar(scope)) { if ((this.bits & ASTNode.IsForeachElementVariable) != 0 && scope.blockStatement instanceof ForeachStatement) { // small version extracted from ForeachStatement.resolve(): ForeachStatement stat = (ForeachStatement) scope.blockStatement; TypeBinding collectionType = stat.collection == null ? null : stat.collection.resolveType((BlockScope) scope.parent); // Patch the resolved type if (!TypeBinding.equalsEquals(TypeBinding.NULL, collectionType) && !TypeBinding.equalsEquals(TypeBinding.VOID, collectionType)) { TypeBinding elementType = ForeachStatement.getCollectionElementType(scope, collectionType); if (elementType != null) { this.patchType(elementType); } } } } throw new SelectionNodeFound(this.binding); }
protected LocalDeclaration createLocalDeclaration(char[] assistName,int sourceStart,int sourceEnd) { if (this.indexOfAssistIdentifier() < 0) { return super.createLocalDeclaration(assistName, sourceStart, sourceEnd); } else { SelectionOnLocalName local = new SelectionOnLocalName(assistName, sourceStart, sourceEnd); this.assistNode = local; this.lastCheckPoint = sourceEnd + 1; return local; } } public NameReference createQualifiedAssistNameReference(char[][] previousIdentifiers, char[] assistName, long[] positions){
public StringBuffer printAsExpression(int indent, StringBuffer output) { printIndent(indent, output); output.append("<SelectionOnLocalName:"); //$NON-NLS-1$ printModifiers(this.modifiers, output); this.type.print(0, output).append(' ').append(this.name); if (this.initialization != null) { output.append(" = "); //$NON-NLS-1$ this.initialization.printExpression(0, output); } return output.append('>'); }
public StringBuffer printStatement(int indent, StringBuffer output) { printAsExpression(indent, output); return output.append(';'); } }
protected LocalDeclaration createLocalDeclaration(char[] assistName,int sourceStart,int sourceEnd) { if (this.indexOfAssistIdentifier() < 0) { return super.createLocalDeclaration(assistName, sourceStart, sourceEnd); } else { SelectionOnLocalName local = new SelectionOnLocalName(assistName, sourceStart, sourceEnd); this.assistNode = local; this.lastCheckPoint = sourceEnd + 1; return local; } } public NameReference createQualifiedAssistNameReference(char[][] previousIdentifiers, char[] assistName, long[] positions){
public StringBuffer printAsExpression(int indent, StringBuffer output) { printIndent(indent, output); output.append("<SelectionOnLocalName:"); //$NON-NLS-1$ printModifiers(this.modifiers, output); this.type.print(0, output).append(' ').append(this.name); if (this.initialization != null) { output.append(" = "); //$NON-NLS-1$ this.initialization.printExpression(0, output); } return output.append('>'); }
public StringBuffer printStatement(int indent, StringBuffer output) { printAsExpression(indent, output); return output.append(';'); } }
protected LocalDeclaration createLocalDeclaration(char[] assistName,int sourceStart,int sourceEnd) { if (this.indexOfAssistIdentifier() < 0) { return super.createLocalDeclaration(assistName, sourceStart, sourceEnd); } else { SelectionOnLocalName local = new SelectionOnLocalName(assistName, sourceStart, sourceEnd); this.assistNode = local; this.lastCheckPoint = sourceEnd + 1; return local; } } public NameReference createQualifiedAssistNameReference(char[][] previousIdentifiers, char[] assistName, long[] positions){
public StringBuffer printAsExpression(int indent, StringBuffer output) { printIndent(indent, output); output.append("<SelectionOnLocalName:"); //$NON-NLS-1$ printModifiers(this.modifiers, output); this.type.print(0, output).append(' ').append(this.name); if (this.initialization != null) { output.append(" = "); //$NON-NLS-1$ this.initialization.printExpression(0, output); } return output.append('>'); }
public StringBuffer printStatement(int indent, StringBuffer output) { printAsExpression(indent, output); return output.append(';'); } }
protected LocalDeclaration createLocalDeclaration(char[] assistName,int sourceStart,int sourceEnd) { if (this.indexOfAssistIdentifier() < 0) { return super.createLocalDeclaration(assistName, sourceStart, sourceEnd); } else { SelectionOnLocalName local = new SelectionOnLocalName(assistName, sourceStart, sourceEnd); this.assistNode = local; this.lastCheckPoint = sourceEnd + 1; return local; } } public NameReference createQualifiedAssistNameReference(char[][] previousIdentifiers, char[] assistName, long[] positions){
public StringBuffer printAsExpression(int indent, StringBuffer output) { printIndent(indent, output); output.append("<SelectionOnLocalName:"); //$NON-NLS-1$ printModifiers(this.modifiers, output); this.type.print(0, output).append(' ').append(this.name); if (this.initialization != null) { output.append(" = "); //$NON-NLS-1$ this.initialization.printExpression(0, output); } return output.append('>'); }
public StringBuffer printStatement(int indent, StringBuffer output) { printAsExpression(indent, output); return output.append(';'); } }
protected LocalDeclaration createLocalDeclaration(char[] assistName,int sourceStart,int sourceEnd) { if (this.indexOfAssistIdentifier() < 0) { return super.createLocalDeclaration(assistName, sourceStart, sourceEnd); } else { SelectionOnLocalName local = new SelectionOnLocalName(assistName, sourceStart, sourceEnd); this.assistNode = local; this.lastCheckPoint = sourceEnd + 1; return local; } } public NameReference createQualifiedAssistNameReference(char[][] previousIdentifiers, char[] assistName, long[] positions){
public StringBuffer printAsExpression(int indent, StringBuffer output) { printIndent(indent, output); output.append("<SelectionOnLocalName:"); //$NON-NLS-1$ printModifiers(this.modifiers, output); this.type.print(0, output).append(' ').append(this.name); if (this.initialization != null) { output.append(" = "); //$NON-NLS-1$ this.initialization.printExpression(0, output); } return output.append('>'); }
public StringBuffer printStatement(int indent, StringBuffer output) { printAsExpression(indent, output); return output.append(';'); } }