blob: 913afd6f1a8d5bc7abbd51ceebfd1453cfa58c5c [file] [log] [blame]
Stephan Herrmann7b7062f2010-04-01 19:56:59 +00001/*******************************************************************************
2 * Copyright (c) 2005, 2009 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 *******************************************************************************/
11package org.eclipse.jdt.internal.codeassist.complete;
12
13import 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 */
28public class CompletionOnMemberValueName extends MemberValuePair {
29 public CompletionOnMemberValueName(char[] token, int sourceStart, 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(this.name);
36 output.append('>');
37 return output;
38 }
39}