KickJava   Java API By Example, From Geeks To Geeks.

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


1 /*******************************************************************************
2  * Copyright (c) 2000, 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.JavadocSingleNameReference;
14 import org.eclipse.jdt.internal.compiler.lookup.BlockScope;
15 import org.eclipse.jdt.internal.compiler.lookup.TypeBinding;
16
17 public class CompletionOnJavadocParamNameReference extends JavadocSingleNameReference implements CompletionOnJavadoc {
18     public int completionFlags = JAVADOC;
19     public char[][] missingParams;
20     public char[][] missingTypeParams;
21
22     public CompletionOnJavadocParamNameReference(char[] name, long pos, int start, int end) {
23         super(name, pos, start, end);
24     }
25
26     public CompletionOnJavadocParamNameReference(JavadocSingleNameReference nameRef) {
27         super(nameRef.token, (((long)nameRef.sourceStart)<<32)+nameRef.sourceEnd, nameRef.tagSourceStart, nameRef.tagSourceStart);
28     }
29
30     /**
31      * @param flags The completionFlags to set.
32      */

33     public void addCompletionFlags(int flags) {
34         this.completionFlags |= flags;
35     }
36
37     /**
38      * Get completion node flags.
39      *
40      * @return int Flags of the javadoc completion node.
41      */

42     public int getCompletionFlags() {
43         return this.completionFlags;
44     }
45
46     /* (non-Javadoc)
47      * @see org.eclipse.jdt.internal.compiler.ast.AllocationExpression#printExpression(int, java.lang.StringBuffer)
48      */

49     public StringBuffer JavaDoc printExpression(int indent, StringBuffer JavaDoc output) {
50         output.append("<CompletionOnJavadocParamNameReference:"); //$NON-NLS-1$
51
if (this.token != null) super.printExpression(indent, output);
52         return output.append('>');
53     }
54
55     /* (non-Javadoc)
56      * @see org.eclipse.jdt.internal.compiler.ast.SingleNameReference#reportError(org.eclipse.jdt.internal.compiler.lookup.BlockScope)
57      */

58     public TypeBinding reportError(BlockScope scope) {
59         return null;
60     }
61 }
62
Popular Tags