KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > jdt > internal > codeassist > complete > CompletionOnMemberValueName


1 /*******************************************************************************
2  * Copyright (c) 2005 IBM Corporation and others.
3  * All rights reserved. This program and the accompanying materials
4  * are made available under the terms of the Eclipse Public License v1.0
5  * which accompanies this distribution, and is available at
6  * http://www.eclipse.org/legal/epl-v10.html
7  *
8  * Contributors:
9  * IBM Corporation - initial API and implementation
10  *******************************************************************************/

11 package org.eclipse.jdt.internal.codeassist.complete;
12
13 import org.eclipse.jdt.internal.compiler.ast.MemberValuePair;
14
15 /*
16  * Completion node build by the parser in any case it was intending to
17  * reduce annotation's attribute name containing the cursor.
18  * e.g.
19  *
20  * @Annot(attri[cursor]
21  * class X {
22  * }
23  *
24  * ---> @Annot(<CompletionOnAttributeName:attri>)
25  * class X {
26  * }
27  */

28 public class CompletionOnMemberValueName extends MemberValuePair {
29     public CompletionOnMemberValueName(char[] token, int sourceStart, int sourceEnd) {
30         super(token, sourceStart, sourceEnd, null);
31     }
32     
33     public StringBuffer JavaDoc print(int indent, StringBuffer JavaDoc output) {
34         output.append("<CompleteOnAttributeName:"); //$NON-NLS-1$
35
output.append(name);
36         output.append('>');
37         return output;
38     }
39 }
40
Popular Tags