Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
Copyright (c) 2000, 2008 IBM Corporation and others. All rights reserved. This program and the accompanying materials are made available under the terms of the Eclipse Public License v1.0 which accompanies this distribution, and is available at http://www.eclipse.org/legal/epl-v10.html Contributors: IBM Corporation - initial API and implementation /
package org.eclipse.jdt.internal.codeassist.complete;
/*
 * Completion node build by the parser in any case it was intending to
 * reduce a single name reference containing the completion identifier.
 * e.g.
 *
 *	class X {
 *    void foo() {
 *      ba[cursor]
 *    }
 *  }
 *
 *	---> class X {
 *         void foo() {
 *           <CompleteOnName:ba>
 *         }
 *       }
 *
 * The source range of the completion node denotes the source range
 * which should be replaced by the completion.
 */
	public char[][] possibleKeywords;
	public boolean canBeExplicitConstructor;
	public boolean isPrecededByModifiers;
	public CompletionOnSingleNameReference(char[] sourcelong posboolean isInsideAnnotationAttribute) {
		this(sourceposnullfalseisInsideAnnotationAttribute);
	}
	public CompletionOnSingleNameReference(char[] sourcelong poschar[][] possibleKeywordsboolean canBeExplicitConstructorboolean isInsideAnnotationAttribute) {
		super(sourcepos);
		this. = possibleKeywords;
		this. = canBeExplicitConstructor;
		this. = isInsideAnnotationAttribute;
	}
	public StringBuffer printExpression(int indentStringBuffer output) {
		output.append("<CompleteOnName:"); //$NON-NLS-1$
		return super.printExpression(0, output).append('>');
	}
	public TypeBinding resolveType(BlockScope scope) {
		if(scope instanceof MethodScope) {
			throw new CompletionNodeFound(thisscope, ((MethodScope)scope).);
		}
		throw new CompletionNodeFound(thisscope);
	}
New to GrepCode? Check out our FAQ X