KickJava   Java API By Example, From Geeks To Geeks.

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


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

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

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

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

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