01: /*******************************************************************************
02: * Copyright (c) 2005 IBM Corporation and others.
03: * All rights reserved. This program and the accompanying materials
04: * are made available under the terms of the Eclipse Public License v1.0
05: * which accompanies this distribution, and is available at
06: * http://www.eclipse.org/legal/epl-v10.html
07: *
08: * Contributors:
09: * IBM Corporation - initial API and implementation
10: *******************************************************************************/package org.eclipse.jdt.internal.codeassist.complete;
11:
12: import org.eclipse.jdt.internal.compiler.ast.MemberValuePair;
13:
14: /*
15: * Completion node build by the parser in any case it was intending to
16: * reduce annotation's attribute name containing the cursor.
17: * e.g.
18: *
19: * @Annot(attri[cursor]
20: * class X {
21: * }
22: *
23: * ---> @Annot(<CompletionOnAttributeName:attri>)
24: * class X {
25: * }
26: */
27: public class CompletionOnMemberValueName extends MemberValuePair {
28: public CompletionOnMemberValueName(char[] token, int sourceStart,
29: int sourceEnd) {
30: super (token, sourceStart, sourceEnd, null);
31: }
32:
33: public StringBuffer print(int indent, StringBuffer output) {
34: output.append("<CompleteOnAttributeName:"); //$NON-NLS-1$
35: output.append(name);
36: output.append('>');
37: return output;
38: }
39: }
|