/******************************************************************************* * Copyright (c) 2000, 2001, 2002 International Business Machines Corp. and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Common Public License v0.5 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/cpl-v05.html * * Contributors: * IBM Corporation - initial API and implementation ******************************************************************************/ package net.sourceforge.phpdt.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() { * * } * } * * The source range of the completion node denotes the source range * which should be replaced by the completion. */ import net.sourceforge.phpdt.internal.compiler.ast.SingleNameReference; import net.sourceforge.phpdt.internal.compiler.lookup.BlockScope; import net.sourceforge.phpdt.internal.compiler.lookup.TypeBinding; public class CompletionOnSingleNameReference extends SingleNameReference { public CompletionOnSingleNameReference(char[] source, long pos) { super(source, pos); } public TypeBinding resolveType(BlockScope scope) { throw new CompletionNodeFound(this, scope); } public String toStringExpression() { return ""; //$NON-NLS-2$ //$NON-NLS-1$ } }