1 /*******************************************************************************
2 * Copyright (c) 2000, 2001, 2002 International Business Machines Corp. and others.
3 * All rights reserved. This program and the accompanying materials
4 * are made available under the terms of the Common Public License v0.5
5 * which accompanies this distribution, and is available at
6 * http://www.eclipse.org/legal/cpl-v05.html
9 * IBM Corporation - initial API and implementation
10 ******************************************************************************/
11 package net.sourceforge.phpdt.internal.codeassist.complete;
14 * Completion node build by the parser in any case it was intending to
15 * reduce an import reference containing the cursor location.
18 * import java.io[cursor];
24 * ---> <CompleteOnImport:java.io>
30 * The source range is always of length 0.
31 * The arguments of the allocation expression are all the arguments defined
35 import net.sourceforge.phpdt.internal.compiler.ast.ImportReference;
37 public class CompletionOnImportReference extends ImportReference {
39 public CompletionOnImportReference(char[][] tokens , long[] positions) {
40 super(tokens, positions, false);
42 public String toString(int tab, boolean withOnDemand) {
44 StringBuffer buffer = new StringBuffer(tabString(tab));
45 buffer. append("<CompleteOnImport:"); //$NON-NLS-1$
46 for (int i = 0; i < tokens.length; i++) {
47 buffer.append(tokens[i]);
48 if (i < (tokens.length - 1)) {
49 buffer.append("."); //$NON-NLS-1$
52 buffer.append(">"); //$NON-NLS-1$
53 return buffer.toString();