blob: 45bc49e5ed2736604e2868c7cf020a0b3419bd15 [file] [log] [blame]
/*******************************************************************************
* Copyright (c) 2000, 2004 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
package org.eclipse.jdt.internal.codeassist.complete;
/*
* Completion node build by the parser in any case it was intending to
* reduce an exception type reference containing the completion identifier.
* e.g.
*
* class X {
* void foo() {
* try {
* bar();
* } catch (IOExc[cursor] e) {
* }
* }
* }
*
* ---> class X {
* void foo() {
* try {
* bar();
* } catch (<CompleteOnException:IOExc> e) {
* }
* }
* }
*
* The source range of the completion node denotes the source range
* which should be replaced by the completion.
*/
public class CompletionOnExceptionReference extends CompletionOnSingleTypeReference {
public CompletionOnExceptionReference(char[] source, long pos) {
super(source, pos);
}
public StringBuffer printExpression(int indent, StringBuffer output) {
return output.append("<CompleteOnException:").append(this.token).append('>'); //$NON-NLS-1$
}
}