01: /*******************************************************************************
02: * Copyright (c) 2000, 2005 IBM Corporation and others.
03: * All rights reserved. This program and the accompanying materials
04: * are made available under the terms of the Eclipse Public License v1.0
05: * which accompanies this distribution, and is available at
06: * http://www.eclipse.org/legal/epl-v10.html
07: *
08: * Contributors:
09: * IBM Corporation - initial API and implementation
10: *******************************************************************************/package org.eclipse.jdt.internal.codeassist.complete;
11:
12: import org.eclipse.jdt.internal.compiler.ast.JavadocSingleNameReference;
13: import org.eclipse.jdt.internal.compiler.lookup.BlockScope;
14: import org.eclipse.jdt.internal.compiler.lookup.TypeBinding;
15:
16: public class CompletionOnJavadocParamNameReference extends
17: JavadocSingleNameReference implements CompletionOnJavadoc {
18: public int completionFlags = JAVADOC;
19: public char[][] missingParams;
20: public char[][] missingTypeParams;
21:
22: public CompletionOnJavadocParamNameReference(char[] name, long pos,
23: int start, int end) {
24: super (name, pos, start, end);
25: }
26:
27: public CompletionOnJavadocParamNameReference(
28: JavadocSingleNameReference nameRef) {
29: super (nameRef.token, (((long) nameRef.sourceStart) << 32)
30: + nameRef.sourceEnd, nameRef.tagSourceStart,
31: nameRef.tagSourceStart);
32: }
33:
34: /**
35: * @param flags The completionFlags to set.
36: */
37: public void addCompletionFlags(int flags) {
38: this .completionFlags |= flags;
39: }
40:
41: /**
42: * Get completion node flags.
43: *
44: * @return int Flags of the javadoc completion node.
45: */
46: public int getCompletionFlags() {
47: return this .completionFlags;
48: }
49:
50: /* (non-Javadoc)
51: * @see org.eclipse.jdt.internal.compiler.ast.AllocationExpression#printExpression(int, java.lang.StringBuffer)
52: */
53: public StringBuffer printExpression(int indent, StringBuffer output) {
54: output.append("<CompletionOnJavadocParamNameReference:"); //$NON-NLS-1$
55: if (this .token != null)
56: super .printExpression(indent, output);
57: return output.append('>');
58: }
59:
60: /* (non-Javadoc)
61: * @see org.eclipse.jdt.internal.compiler.ast.SingleNameReference#reportError(org.eclipse.jdt.internal.compiler.lookup.BlockScope)
62: */
63: public TypeBinding reportError(BlockScope scope) {
64: return null;
65: }
66: }
|