View | Details | Raw Unified | Return to bug 139621 | Differences between
and this patch

Collapse All | Expand All

(-)src/org/eclipse/jdt/core/tests/model/JavadocBugsCompletionModelTest.java (-2 / +144 lines)
Lines 807-813 Link Here
807
		"package bugs.b139621;\n" + 
807
		"package bugs.b139621;\n" + 
808
		"public class BasicTestBugs {\n" + 
808
		"public class BasicTestBugs {\n" + 
809
		"	/**\n" + 
809
		"	/**\n" + 
810
		"	 * This method returns an object\n" + 
810
		"	 * Test with only an orphan comment in type declaration\n" + 
811
		"	 * @see Obj\n" + 
811
		"	 * @see Obj\n" + 
812
		"	 */\n" + 
812
		"	 */\n" + 
813
		"}\n";
813
		"}\n";
Lines 820-829 Link Here
820
	String source =
820
	String source =
821
		"package bugs.b139621;\n" + 
821
		"package bugs.b139621;\n" + 
822
		"/**\n" + 
822
		"/**\n" + 
823
		" * This method returns an object\n" + 
823
		" * Test with an existing javadoc type declaration\n" + 
824
		" * @see Test\n" + 
825
		" */\n" + 
826
		"public class BasicTestBugs {\n" + 
827
		"	/**\n" + 
828
		"	 * Test with only an orphan comment in type declaration\n" + 
829
		"	 * @see Obj\n" + 
830
		"	 */\n" + 
831
		"}\n";
832
	completeInJavadoc("/Completion/src/bugs/b139621/BasicTestBugs.java", source, true, "Obj");
833
	assertSortedResults(
834
		"Object[TYPE_REF]{Object, java.lang, Ljava.lang.Object;, null, null, "+this.positions+R_DICUNR+"}"
835
	);
836
}
837
public void testBug139621c() throws JavaModelException {
838
	String source =
839
		"package bugs.b139621;\n" + 
840
		"public class BasicTestBugs {\n" + 
841
		"	/**\n" + 
842
		"	 * Test with only an orphan comment in type declaration\n" +
843
		"	 * (completion for tags)\n" + 
844
		"	 * @\n" + 
845
		"	 */\n" + 
846
		"}\n";
847
	completeInJavadoc("/Completion/src/bugs/b139621/BasicTestBugs.java", source, true, "@");
848
	assertSortedResults(
849
		"author[JAVADOC_BLOCK_TAG]{@author, null, null, author, null, "+this.positions+JAVADOC_RELEVANCE+"}\n" + 
850
		"category[JAVADOC_BLOCK_TAG]{@category, null, null, category, null, "+this.positions+JAVADOC_RELEVANCE+"}\n" + 
851
		"deprecated[JAVADOC_BLOCK_TAG]{@deprecated, null, null, deprecated, null, "+this.positions+JAVADOC_RELEVANCE+"}\n" + 
852
		"docRoot[JAVADOC_INLINE_TAG]{{@docRoot}, null, null, docRoot, null, "+this.positions+JAVADOC_RELEVANCE+"}\n" + 
853
		"exception[JAVADOC_BLOCK_TAG]{@exception, null, null, exception, null, "+this.positions+JAVADOC_RELEVANCE+"}\n" + 
854
		"inheritDoc[JAVADOC_INLINE_TAG]{{@inheritDoc}, null, null, inheritDoc, null, "+this.positions+JAVADOC_RELEVANCE+"}\n" + 
855
		"link[JAVADOC_INLINE_TAG]{{@link}, null, null, link, null, "+this.positions+JAVADOC_RELEVANCE+"}\n" + 
856
		"linkplain[JAVADOC_INLINE_TAG]{{@linkplain}, null, null, linkplain, null, "+this.positions+JAVADOC_RELEVANCE+"}\n" + 
857
		"param[JAVADOC_BLOCK_TAG]{@param, null, null, param, null, "+this.positions+JAVADOC_RELEVANCE+"}\n" + 
858
		"return[JAVADOC_BLOCK_TAG]{@return, null, null, return, null, "+this.positions+JAVADOC_RELEVANCE+"}\n" + 
859
		"see[JAVADOC_BLOCK_TAG]{@see, null, null, see, null, "+this.positions+JAVADOC_RELEVANCE+"}\n" + 
860
		"serial[JAVADOC_BLOCK_TAG]{@serial, null, null, serial, null, "+this.positions+JAVADOC_RELEVANCE+"}\n" + 
861
		"serialData[JAVADOC_BLOCK_TAG]{@serialData, null, null, serialData, null, "+this.positions+JAVADOC_RELEVANCE+"}\n" + 
862
		"serialField[JAVADOC_BLOCK_TAG]{@serialField, null, null, serialField, null, "+this.positions+JAVADOC_RELEVANCE+"}\n" + 
863
		"since[JAVADOC_BLOCK_TAG]{@since, null, null, since, null, "+this.positions+JAVADOC_RELEVANCE+"}\n" + 
864
		"throws[JAVADOC_BLOCK_TAG]{@throws, null, null, throws, null, "+this.positions+JAVADOC_RELEVANCE+"}\n" + 
865
		"value[JAVADOC_INLINE_TAG]{{@value}, null, null, value, null, "+this.positions+JAVADOC_RELEVANCE+"}\n" + 
866
		"version[JAVADOC_BLOCK_TAG]{@version, null, null, version, null, "+this.positions+JAVADOC_RELEVANCE+"}"
867
	);
868
}
869
public void testBug139621d() throws JavaModelException {
870
	String source =
871
		"package bugs.b139621;\n" + 
872
		"public class BasicTestBugs {\n" + 
873
		"	/**\n" + 
874
		"	 * Test with only an orphan comment in type declaration\n" +
875
		"	 * (variation of completion for tags but considered in text as it's in fact tag start character is after a reference )\n" + 
876
		"	 * @see Object" + // missing \n
877
		"	 * @\n" + 
878
		"	 */\n" + 
879
		"}\n";
880
	completeInJavadoc("/Completion/src/bugs/b139621/BasicTestBugs.java", source, true, "@", 2);
881
	assertSortedResults(
882
		"docRoot[JAVADOC_INLINE_TAG]{{@docRoot}, null, null, docRoot, null, "+this.positions+JAVADOC_RELEVANCE+"}\n" + 
883
		"inheritDoc[JAVADOC_INLINE_TAG]{{@inheritDoc}, null, null, inheritDoc, null, "+this.positions+JAVADOC_RELEVANCE+"}\n" + 
884
		"link[JAVADOC_INLINE_TAG]{{@link}, null, null, link, null, "+this.positions+JAVADOC_RELEVANCE+"}\n" + 
885
		"linkplain[JAVADOC_INLINE_TAG]{{@linkplain}, null, null, linkplain, null, "+this.positions+JAVADOC_RELEVANCE+"}\n" + 
886
		"value[JAVADOC_INLINE_TAG]{{@value}, null, null, value, null, "+this.positions+JAVADOC_RELEVANCE+"}"
887
	);
888
}
889
public void testBug139621e() throws JavaModelException {
890
	String source =
891
		"package bugs.b139621;\n" + 
892
		"/**\n" + 
893
		" * Test with orphan comment after a method declaration\n" + 
894
		" * @see Test\n" + 
895
		" */\n" + 
896
		"public class BasicTestBugs {\n" + 
897
		"	public void foo() {}\n" +
898
		"	/**\n" + 
899
		"	 * This method returns an object\n" + 
900
		"	 * @see Obj\n" + 
901
		"	 */\n" + 
902
		"}\n";
903
	completeInJavadoc("/Completion/src/bugs/b139621/BasicTestBugs.java", source, true, "Obj");
904
	assertSortedResults(
905
		"Object[TYPE_REF]{Object, java.lang, Ljava.lang.Object;, null, null, "+this.positions+R_DICUNR+"}"
906
	);
907
}
908
public void testBug139621f() throws JavaModelException {
909
	String source =
910
		"package bugs.b139621;\n" + 
911
		"/**\n" + 
912
		" * Test with orphan comment after a field declaration\n" + 
824
		" * @see Test\n" + 
913
		" * @see Test\n" + 
825
		" */\n" + 
914
		" */\n" + 
826
		"public class BasicTestBugs {\n" + 
915
		"public class BasicTestBugs {\n" + 
916
		"	public int x;\n" +
827
		"	/**\n" + 
917
		"	/**\n" + 
828
		"	 * This method returns an object\n" + 
918
		"	 * This method returns an object\n" + 
829
		"	 * @see Obj\n" + 
919
		"	 * @see Obj\n" + 
Lines 834-839 Link Here
834
		"Object[TYPE_REF]{Object, java.lang, Ljava.lang.Object;, null, null, "+this.positions+R_DICUNR+"}"
924
		"Object[TYPE_REF]{Object, java.lang, Ljava.lang.Object;, null, null, "+this.positions+R_DICUNR+"}"
835
	);
925
	);
836
}
926
}
927
public void testBug139621g() throws JavaModelException {
928
	String source =
929
		"package bugs.b139621;\n" + 
930
		"/**\n" + 
931
		" * Compilation unit without any type\n" + 
932
		" * @see Obj\n" + 
933
		" */\n";
934
	completeInJavadoc("/Completion/src/bugs/b139621/BasicTestBugs.java", source, true, "Obj");
935
	assertSortedResults(
936
		"Object[TYPE_REF]{Object, java.lang, Ljava.lang.Object;, null, null, "+this.positions+R_DICUNR+"}"
937
	);
938
}
939
public void testBug139621h() throws JavaModelException {
940
	String source =
941
		"package bugs.b139621;\n" + 
942
		"/**\n" + 
943
		" * Compilation unit without any type\n" + 
944
		" * (completion for tags)\n" + 
945
		" * @\n" + 
946
		" */\n";
947
	completeInJavadoc("/Completion/src/bugs/b139621/BasicTestBugs.java", source, true, "@");
948
	assertSortedResults(
949
		"author[JAVADOC_BLOCK_TAG]{@author, null, null, author, null, "+this.positions+JAVADOC_RELEVANCE+"}\n" + 
950
		"category[JAVADOC_BLOCK_TAG]{@category, null, null, category, null, "+this.positions+JAVADOC_RELEVANCE+"}\n" + 
951
		"deprecated[JAVADOC_BLOCK_TAG]{@deprecated, null, null, deprecated, null, "+this.positions+JAVADOC_RELEVANCE+"}\n" + 
952
		"docRoot[JAVADOC_INLINE_TAG]{{@docRoot}, null, null, docRoot, null, "+this.positions+JAVADOC_RELEVANCE+"}\n" + 
953
		"link[JAVADOC_INLINE_TAG]{{@link}, null, null, link, null, "+this.positions+JAVADOC_RELEVANCE+"}\n" + 
954
		"linkplain[JAVADOC_INLINE_TAG]{{@linkplain}, null, null, linkplain, null, "+this.positions+JAVADOC_RELEVANCE+"}\n" + 
955
		"see[JAVADOC_BLOCK_TAG]{@see, null, null, see, null, "+this.positions+JAVADOC_RELEVANCE+"}\n" + 
956
		"serial[JAVADOC_BLOCK_TAG]{@serial, null, null, serial, null, "+this.positions+JAVADOC_RELEVANCE+"}\n" + 
957
		"since[JAVADOC_BLOCK_TAG]{@since, null, null, since, null, "+this.positions+JAVADOC_RELEVANCE+"}\n" + 
958
		"value[JAVADOC_INLINE_TAG]{{@value}, null, null, value, null, "+this.positions+JAVADOC_RELEVANCE+"}\n" + 
959
		"version[JAVADOC_BLOCK_TAG]{@version, null, null, version, null, "+this.positions+JAVADOC_RELEVANCE+"}"
960
	);
961
}
962
public void testBug139621i() throws JavaModelException {
963
	String source =
964
		"package bugs.b139621;\n" + 
965
		"/**\n" + 
966
		" * Compilation unit without any type\n" + 
967
		" * (variation of completion for tags but considered in text as it's in fact tag start character is after a reference )\n" + 
968
		" * @see Object The root class" +  // missing \n
969
		" * @\n" + 
970
		" */\n";
971
	completeInJavadoc("/Completion/src/bugs/b139621/BasicTestBugs.java", source, true, "@", 2);
972
	assertSortedResults(
973
		"docRoot[JAVADOC_INLINE_TAG]{{@docRoot}, null, null, docRoot, null, "+this.positions+JAVADOC_RELEVANCE+"}\n" + 
974
		"link[JAVADOC_INLINE_TAG]{{@link}, null, null, link, null, "+this.positions+JAVADOC_RELEVANCE+"}\n" + 
975
		"linkplain[JAVADOC_INLINE_TAG]{{@linkplain}, null, null, linkplain, null, "+this.positions+JAVADOC_RELEVANCE+"}\n" + 
976
		"value[JAVADOC_INLINE_TAG]{{@value}, null, null, value, null, "+this.positions+JAVADOC_RELEVANCE+"}"
977
	);
978
}
837
979
838
/**
980
/**
839
 * Bug 144866: [assist][javadoc] Wrong completion inside @value tag
981
 * Bug 144866: [assist][javadoc] Wrong completion inside @value tag
(-)compiler/org/eclipse/jdt/internal/compiler/ast/Javadoc.java (-3 / +10 lines)
Lines 180-186 Link Here
180
	}
180
	}
181
181
182
	/*
182
	/*
183
	 * Resolve type javadoc while a class scope
183
	 * Resolve type javadoc
184
	 */
184
	 */
185
	public void resolve(ClassScope scope) {
185
	public void resolve(ClassScope scope) {
186
186
Lines 229-237 Link Here
229
			scope.problemReporter().javadocUnexpectedTag((int)(this.valuePositions>>>32), (int) this.valuePositions);
229
			scope.problemReporter().javadocUnexpectedTag((int)(this.valuePositions>>>32), (int) this.valuePositions);
230
		}
230
		}
231
	}
231
	}
232
	
232
233
	/*
234
	 * Resolve compilation unit javadoc
235
	 */
236
	public void resolve(CompilationUnitScope unitScope) {
237
		// do nothing
238
	}
239
233
	/*
240
	/*
234
	 * Resolve method javadoc while a method scope
241
	 * Resolve method javadoc
235
	 */
242
	 */
236
	public void resolve(MethodScope methScope) {
243
	public void resolve(MethodScope methScope) {
237
		
244
		
(-)compiler/org/eclipse/jdt/internal/compiler/ast/CompilationUnitDeclaration.java (+5 lines)
Lines 344-349 Link Here
344
				this.javadoc.resolve(syntheticTypeDeclaration.staticInitializerScope);
344
				this.javadoc.resolve(syntheticTypeDeclaration.staticInitializerScope);
345
    		}
345
    		}
346
			startingTypeIndex = 1;
346
			startingTypeIndex = 1;
347
		} else {
348
			// resolve compilation unit javadoc package if any
349
			if (this.javadoc != null) {
350
				this.javadoc.resolve(this.scope);
351
    		}
347
		}
352
		}
348
		if (this.currentPackage != null && this.currentPackage.annotations != null && !isPackageInfo) {
353
		if (this.currentPackage != null && this.currentPackage.annotations != null && !isPackageInfo) {
349
			scope.problemReporter().invalidFileNameForPackageAnnotations(this.currentPackage.annotations[0]);
354
			scope.problemReporter().invalidFileNameForPackageAnnotations(this.currentPackage.annotations[0]);
(-)codeassist/org/eclipse/jdt/internal/codeassist/complete/CompletionParser.java (-3 / +28 lines)
Lines 1774-1787 Link Here
1774
 * @see org.eclipse.jdt.internal.compiler.parser.Parser#consumeClassDeclaration()
1774
 * @see org.eclipse.jdt.internal.compiler.parser.Parser#consumeClassDeclaration()
1775
 */
1775
 */
1776
protected void consumeClassDeclaration() {
1776
protected void consumeClassDeclaration() {
1777
	if (this.astPtr >= 0 && this.astStack[this.astPtr] instanceof TypeDeclaration) {
1777
	if (this.astPtr >= 0) {
1778
		TypeDeclaration typeDeclaration = (TypeDeclaration) this.astStack[this.astPtr];
1778
		int length = this.astLengthStack[this.astLengthPtr];
1779
		TypeDeclaration typeDeclaration = (TypeDeclaration) this.astStack[this.astPtr-length];
1779
		this.javadoc = null;
1780
		this.javadoc = null;
1781
		CompletionJavadocParser completionJavadocParser = (CompletionJavadocParser)this.javadocParser;
1782
		completionJavadocParser.allPossibleTags = true;
1780
		checkComment();
1783
		checkComment();
1781
		if (this.javadoc != null && this.cursorLocation > this.javadoc.sourceStart && this.cursorLocation < this.javadoc.sourceEnd) {
1784
		if (this.javadoc != null && this.cursorLocation > this.javadoc.sourceStart && this.cursorLocation < this.javadoc.sourceEnd) {
1782
			// completion is in an orphan javadoc comment => replace type declaration one with it to allow completion resolution
1785
			// completion is in an orphan javadoc comment => replace in last read declaration to allow completion resolution
1783
			typeDeclaration.javadoc = this.javadoc;
1786
			typeDeclaration.javadoc = this.javadoc;
1784
		}
1787
		}
1788
		completionJavadocParser.allPossibleTags = false;
1785
	}
1789
	}
1786
	super.consumeClassDeclaration();
1790
	super.consumeClassDeclaration();
1787
}
1791
}
Lines 1829-1834 Link Here
1829
	super.consumeClassTypeElt();
1833
	super.consumeClassTypeElt();
1830
	popElement(K_NEXT_TYPEREF_IS_EXCEPTION);
1834
	popElement(K_NEXT_TYPEREF_IS_EXCEPTION);
1831
}
1835
}
1836
1837
/* (non-Javadoc)
1838
 * @see org.eclipse.jdt.internal.compiler.parser.Parser#consumeCompilationUnit()
1839
 */
1840
protected void consumeCompilationUnit() {
1841
	this.javadoc = null;
1842
	checkComment();
1843
	if (this.javadoc != null && this.cursorLocation > this.javadoc.sourceStart && this.cursorLocation < this.javadoc.sourceEnd) {
1844
		// completion is in an orphan javadoc comment => replace compilation unit one to allow completion resolution
1845
		compilationUnit.javadoc = this.javadoc;
1846
		// create a fake interface declaration to allow resolution
1847
		if (this.compilationUnit.types == null) {
1848
			this.compilationUnit.types = new TypeDeclaration[1];
1849
			TypeDeclaration declaration = new TypeDeclaration(compilationUnit.compilationResult);
1850
			declaration.name = FAKE_TYPE_NAME;
1851
			declaration.modifiers = ClassFileConstants.AccDefault | ClassFileConstants.AccInterface;
1852
			this.compilationUnit.types[0] = declaration;
1853
		}
1854
	}
1855
	super.consumeCompilationUnit();
1856
}
1832
protected void consumeConditionalExpression(int op) {
1857
protected void consumeConditionalExpression(int op) {
1833
	popElement(K_CONDITIONAL_OPERATOR);
1858
	popElement(K_CONDITIONAL_OPERATOR);
1834
	super.consumeConditionalExpression(op);
1859
	super.consumeConditionalExpression(op);
(-)codeassist/org/eclipse/jdt/internal/codeassist/complete/CompletionOnJavadoc.java (+1 lines)
Lines 20-25 Link Here
20
	int ONLY_INLINE_TAG = 0x0010;
20
	int ONLY_INLINE_TAG = 0x0010;
21
	int REPLACE_TAG = 0x0020;
21
	int REPLACE_TAG = 0x0020;
22
	int FORMAL_REFERENCE = 0x0040;
22
	int FORMAL_REFERENCE = 0x0040;
23
	int ALL_POSSIBLE_TAGS = 0x0080;
23
24
24
	/**
25
	/**
25
	 * Get completion node flags.
26
	 * Get completion node flags.
(-)codeassist/org/eclipse/jdt/internal/codeassist/complete/CompletionOnJavadocTag.java (-5 / +22 lines)
Lines 12-17 Link Here
12
12
13
import org.eclipse.jdt.core.compiler.CharOperation;
13
import org.eclipse.jdt.core.compiler.CharOperation;
14
import org.eclipse.jdt.internal.compiler.ast.JavadocSingleNameReference;
14
import org.eclipse.jdt.internal.compiler.ast.JavadocSingleNameReference;
15
import org.eclipse.jdt.internal.compiler.classfmt.ClassFileConstants;
15
import org.eclipse.jdt.internal.compiler.lookup.ClassScope;
16
import org.eclipse.jdt.internal.compiler.lookup.ClassScope;
16
import org.eclipse.jdt.internal.compiler.lookup.MethodScope;
17
import org.eclipse.jdt.internal.compiler.lookup.MethodScope;
17
import org.eclipse.jdt.internal.compiler.lookup.Scope;
18
import org.eclipse.jdt.internal.compiler.lookup.Scope;
Lines 22-30 Link Here
22
	public final static char[][][] NO_CHAR_CHAR_CHAR = new char[0][][];
23
	public final static char[][][] NO_CHAR_CHAR_CHAR = new char[0][][];
23
	private char[][][] possibleTags = NO_CHAR_CHAR_CHAR;
24
	private char[][][] possibleTags = NO_CHAR_CHAR_CHAR;
24
25
25
	public CompletionOnJavadocTag(char[] source, long pos, int tagStart, int tagEnd, char[][][] possibleTags) {
26
	public CompletionOnJavadocTag(char[] source, long pos, int tagStart, int tagEnd, char[][][] possibleTags, boolean orphan) {
26
		super(source, pos, tagStart, tagEnd);
27
		super(source, pos, tagStart, tagEnd);
27
		this.possibleTags = possibleTags;
28
		this.possibleTags = possibleTags;
29
		if (orphan) this.completionFlags |= ALL_POSSIBLE_TAGS;
28
	}
30
	}
29
31
30
	/**
32
	/**
Lines 80-91 Link Here
80
	}
82
	}
81
83
82
	public void filterPossibleTags(Scope scope) {
84
	public void filterPossibleTags(Scope scope) {
83
		if (this.possibleTags == null || this.possibleTags.length == 0) {
85
		if (this.possibleTags == null || this.possibleTags.length == 0 || (this.completionFlags & ALL_POSSIBLE_TAGS) != 0) {
84
			return;
86
			return;
85
		}
87
		}
86
		int kind = scope.kind;
88
		int kind = scope.kind;
87
		char[][] specifiedTags = null;
89
		char[][] specifiedTags = null;
88
		switch (kind) {
90
		switch (kind) {
91
			case Scope.COMPILATION_UNIT_SCOPE:
89
			case Scope.CLASS_SCOPE:
92
			case Scope.CLASS_SCOPE:
90
				specifiedTags = CLASS_TAGS;
93
				specifiedTags = CLASS_TAGS;
91
				break;
94
				break;
Lines 114-122 Link Here
114
				char[] possibleTag = this.possibleTags[k][i];
117
				char[] possibleTag = this.possibleTags[k][i];
115
				for (int j=0; j<specLenth; j++) {
118
				for (int j=0; j<specLenth; j++) {
116
					if (possibleTag[0] == specifiedTags[j][0] && CharOperation.equals(possibleTag, specifiedTags[j])) {
119
					if (possibleTag[0] == specifiedTags[j][0] && CharOperation.equals(possibleTag, specifiedTags[j])) {
117
						if (scope.kind == Scope.CLASS_SCOPE && possibleTag == TAG_PARAM) {
120
						if (possibleTag == TAG_PARAM) {
118
							if (((ClassScope)scope).referenceContext.binding.isGenericType()) {
121
							switch (scope.kind) {
119
								filteredTags[size++] = possibleTag;
122
								case Scope.CLASS_SCOPE:
123
									if (scope.compilerOptions().sourceLevel >= ClassFileConstants.JDK1_5) {
124
										if (((ClassScope)scope).referenceContext.binding.isGenericType()) {
125
											filteredTags[size++] = possibleTag;
126
										}
127
									}
128
									break;
129
								case Scope.COMPILATION_UNIT_SCOPE:
130
									if (scope.compilerOptions().sourceLevel >= ClassFileConstants.JDK1_5) {
131
										filteredTags[size++] = possibleTag;
132
									}
133
									break;
134
								default:
135
									filteredTags[size++] = possibleTag;
136
									break;
120
							}
137
							}
121
						} else {
138
						} else {
122
							filteredTags[size++] = possibleTag;
139
							filteredTags[size++] = possibleTag;
(-)codeassist/org/eclipse/jdt/internal/codeassist/complete/CompletionJavadocParser.java (-1 / +2 lines)
Lines 51-56 Link Here
51
	int cursorLocation;
51
	int cursorLocation;
52
	CompletionOnJavadoc completionNode = null;
52
	CompletionOnJavadoc completionNode = null;
53
	boolean pushText = false;
53
	boolean pushText = false;
54
	boolean allPossibleTags = false;
54
55
55
	public CompletionJavadocParser(CompletionParser sourceParser) {
56
	public CompletionJavadocParser(CompletionParser sourceParser) {
56
		super(sourceParser);
57
		super(sourceParser);
Lines 557-563 Link Here
557
			System.arraycopy(this.source, this.tagSourceStart, tag, 0, length);
558
			System.arraycopy(this.source, this.tagSourceStart, tag, 0, length);
558
			char[][][] tags = possibleTags(tag, newLine);
559
			char[][][] tags = possibleTags(tag, newLine);
559
			if (tags != null) {
560
			if (tags != null) {
560
				this.completionNode = new CompletionOnJavadocTag(tag, position, startPosition, end, tags);
561
				this.completionNode = new CompletionOnJavadocTag(tag, position, startPosition, end, tags, this.allPossibleTags);
561
			}
562
			}
562
		}
563
		}
563
		return valid;
564
		return valid;
(-)compiler/org/eclipse/jdt/internal/compiler/parser/AbstractCommentParser.java (-2 / +2 lines)
Lines 221-229 Link Here
221
									// for DOM AST node, store tag as text in case of invalid syntax
221
									// for DOM AST node, store tag as text in case of invalid syntax
222
									if (isDomParser) {
222
									if (isDomParser) {
223
										createTag();
223
										createTag();
224
										this.textStart = this.tagSourceEnd+1;
225
										invalidTagLineEnd  = this.lineEnd;
226
									}
224
									}
225
									this.textStart = this.tagSourceEnd+1;
226
									invalidTagLineEnd  = this.lineEnd;
227
								}
227
								}
228
							} catch (InvalidInputException e) {
228
							} catch (InvalidInputException e) {
229
								consumeToken();
229
								consumeToken();

Return to bug 139621