Stephan Herrmann | 7b7062f | 2010-04-01 19:56:59 +0000 | [diff] [blame] | 1 | /******************************************************************************* |
| 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 | *******************************************************************************/ |
| 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 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 | } |