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 package statement containing the cursor location.
18 * package java.io[cursor];
24 * ---> <CompleteOnPackage: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 CompletionOnPackageReference extends ImportReference {
38 public CompletionOnPackageReference(char[][] tokens , long[] positions) {
39 super(tokens, positions, true);
41 public String toString(int tab, boolean withOnDemand) {
42 StringBuffer buffer = new StringBuffer(tabString(tab));
43 buffer. append("<CompleteOnPackage:"); //$NON-NLS-1$
44 for (int i = 0; i < tokens.length; i++) {
45 buffer.append(tokens[i]);
46 if (i < (tokens.length - 1)) {
47 buffer.append("."); //$NON-NLS-1$
50 buffer.append(">"); //$NON-NLS-1$
51 return buffer.toString();