1 /*******************************************************************************
2  * Copyright (c) 2000, 2009 IBM Corporation and others.
3  *
4  * This program and the accompanying materials
5  * are made available under the terms of the Eclipse Public License 2.0
6  * which accompanies this distribution, and is available at
7  * https://www.eclipse.org/legal/epl-2.0/
8  *
9  * SPDX-License-Identifier: EPL-2.0
10  *
11  * Contributors:
12  *     IBM Corporation - initial API and implementation
13  *******************************************************************************/
14 package org.eclipse.jdt.internal.codeassist.complete;
15 
16 import org.eclipse.jdt.internal.compiler.ast.JavadocSingleNameReference;
17 import org.eclipse.jdt.internal.compiler.lookup.BlockScope;
18 import org.eclipse.jdt.internal.compiler.lookup.TypeBinding;
19 
20 public class CompletionOnJavadocParamNameReference extends JavadocSingleNameReference implements CompletionOnJavadoc {
21 	public int completionFlags = JAVADOC;
22 	public char[][] missingParams;
23 	public char[][] missingTypeParams;
24 
CompletionOnJavadocParamNameReference(char[] name, long pos, int start, int end)25 	public CompletionOnJavadocParamNameReference(char[] name, long pos, int start, int end) {
26 		super(name, pos, start, end);
27 	}
28 
CompletionOnJavadocParamNameReference(JavadocSingleNameReference nameRef)29 	public CompletionOnJavadocParamNameReference(JavadocSingleNameReference nameRef) {
30 		super(nameRef.token, (((long)nameRef.sourceStart)<<32)+nameRef.sourceEnd, nameRef.tagSourceStart, nameRef.tagSourceStart);
31 	}
32 
33 	@Override
addCompletionFlags(int flags)34 	public void addCompletionFlags(int flags) {
35 		this.completionFlags |= flags;
36 	}
37 
38 	@Override
getCompletionFlags()39 	public int getCompletionFlags() {
40 		return this.completionFlags;
41 	}
42 
43 	@Override
printExpression(int indent, StringBuffer output)44 	public StringBuffer printExpression(int indent, StringBuffer output) {
45 		output.append("<CompletionOnJavadocParamNameReference:"); //$NON-NLS-1$
46 		if (this.token != null) super.printExpression(indent, output);
47 		return output.append('>');
48 	}
49 
50 	@Override
reportError(BlockScope scope)51 	public TypeBinding reportError(BlockScope scope) {
52 		return null;
53 	}
54 }
55