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.select;
14 * Selection node build by the parser in any case it was intending to
15 * reduce an import reference containing the assist identifier.
18 * import java.[start]io[end].*;
24 * ---> <SelectOnImport:java.io>
32 import net.sourceforge.phpdt.internal.compiler.ast.ImportReference;
34 public class SelectionOnImportReference extends ImportReference {
36 public SelectionOnImportReference(char[][] tokens , long[] positions) {
37 super(tokens, positions, false);
39 public String toString(int tab, boolean withOnDemand) {
41 StringBuffer buffer = new StringBuffer(tabString(tab));
42 buffer. append("<SelectOnImport:"); //$NON-NLS-1$
43 for (int i = 0; i < tokens.length; i++) {
44 buffer.append(tokens[i]);
45 if (i < (tokens.length - 1)) {
46 buffer.append("."); //$NON-NLS-1$
49 buffer.append(">"); //$NON-NLS-1$
50 return buffer.toString();