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 exception type reference containing the completion identifier
16 * as part of a qualified name.
23 * } catch (java.io.IOExc[cursor] e) {
32 * } catch (<CompleteOnException:java.io.IOExc> e) {
37 * The source range of the completion node denotes the source range
38 * which should be replaced by the completion.
40 public class CompletionOnQualifiedExceptionReference extends CompletionOnQualifiedTypeReference {
41 public CompletionOnQualifiedExceptionReference(char[][] previousIdentifiers, char[] completionIdentifier, long[] positions) {
42 super(previousIdentifiers, completionIdentifier, positions);
44 public String toStringExpression(int tab) {
46 StringBuffer buffer = new StringBuffer();
47 buffer. append("<CompleteOnException:"); //$NON-NLS-1$
48 for (int i = 0; i < tokens.length; i++) {
49 buffer.append(tokens[i]);
50 buffer.append("."); //$NON-NLS-1$
52 buffer.append(completionIdentifier).append(">"); //$NON-NLS-1$
53 return buffer.toString();