View | Details | Raw Unified | Return to bug 118105
Collapse All | Expand All

(-)compiler/org/eclipse/jdt/internal/compiler/parser/AbstractCommentParser.java (-1 / +9 lines)
Lines 942-952 Link Here
942
942
943
				default :
943
				default :
944
					if (iToken == 0) {
944
					if (iToken == 0) {
945
						if (this.identifierPtr>=0) {
946
							this.lastIdentifierEndPosition = (int) this.identifierPositionStack[this.identifierPtr];
947
						}
945
						return null;
948
						return null;
946
					}
949
					}
947
					if ((iToken % 2) == 0) { // cannot leave on a dot
950
					if ((iToken % 2) == 0) { // cannot leave on a dot
948
						switch (parserKind) {
951
						switch (parserKind) {
949
							case COMPLETION_PARSER:
952
							case COMPLETION_PARSER:
953
								if (this.identifierPtr>=0) {
954
									this.lastIdentifierEndPosition = (int) this.identifierPositionStack[this.identifierPtr];
955
								}
950
								return syntaxRecoverQualifiedName(primitiveToken);
956
								return syntaxRecoverQualifiedName(primitiveToken);
951
							case DOM_PARSER:
957
							case DOM_PARSER:
952
								if (this.currentTokenType != -1) {
958
								if (this.currentTokenType != -1) {
Lines 968-974 Link Here
968
			this.scanner.currentPosition = this.tokenPreviousPosition;
974
			this.scanner.currentPosition = this.tokenPreviousPosition;
969
			this.currentTokenType = -1;
975
			this.currentTokenType = -1;
970
		}
976
		}
971
		this.lastIdentifierEndPosition = (int) this.identifierPositionStack[this.identifierPtr];
977
		if (this.identifierPtr>=0) {
978
			this.lastIdentifierEndPosition = (int) this.identifierPositionStack[this.identifierPtr];
979
		}
972
		return createTypeReference(primitiveToken);
980
		return createTypeReference(primitiveToken);
973
	}
981
	}
974
982
(-)src/org/eclipse/jdt/core/tests/model/JavadocBugsCompletionModelTest.java (-3 / +21 lines)
Lines 528-534 Link Here
528
}
528
}
529
529
530
/**
530
/**
531
 * Bug 115662: [javadoc][assist] range of the qualified type completion in javadoc text isn't corect
531
 * Bug 115662: [javadoc][assist] link completion in types
532
 * @see "https://bugs.eclipse.org/bugs/show_bug.cgi?id=115662"
532
 * @see "https://bugs.eclipse.org/bugs/show_bug.cgi?id=115662"
533
 */
533
 */
534
public void testBug115662a() throws JavaModelException {
534
public void testBug115662a() throws JavaModelException {
Lines 569-575 Link Here
569
		"/**\n" + 
569
		"/**\n" + 
570
		" * {@link #toString()\n" + 
570
		" * {@link #toString()\n" + 
571
		" */\n" + 
571
		" */\n" + 
572
		"public class Tests {\n" + 
572
		"public class Test {\n" + 
573
		"	int toto;\n" +
573
		"	int toto;\n" +
574
		"}\n";
574
		"}\n";
575
	completeInJavadoc("/Completion/src/bugs/b115662/Test.java", source, true, "toString");
575
	completeInJavadoc("/Completion/src/bugs/b115662/Test.java", source, true, "toString");
Lines 579-585 Link Here
579
}
579
}
580
580
581
/**
581
/**
582
 * Bug 117183: [javadoc][assist] range of the qualified type completion in javadoc text isn't corect
582
 * Bug 117183: [javadoc][assist] No completion in text when cursor location is followed by a '.'
583
 * @see "https://bugs.eclipse.org/bugs/show_bug.cgi?id=117183"
583
 * @see "https://bugs.eclipse.org/bugs/show_bug.cgi?id=117183"
584
 */
584
 */
585
public void testBug117183a() throws JavaModelException {
585
public void testBug117183a() throws JavaModelException {
Lines 658-661 Link Here
658
		"String[TYPE_REF]{String, java.lang, Ljava.lang.String;, null, null, "+this.positions+R_DICUNR+"}"
658
		"String[TYPE_REF]{String, java.lang, Ljava.lang.String;, null, null, "+this.positions+R_DICUNR+"}"
659
	);
659
	);
660
}
660
}
661
662
/**
663
 * Bug 118105: [javadoc][assist] Hang with 100% CPU during code assist on comment
664
 * @see "https://bugs.eclipse.org/bugs/show_bug.cgi?id=118105"
665
 */
666
public void testBug118105() throws JavaModelException {
667
	String source =
668
		"package bugs.b118105;\n" + 
669
		"/**\n" + 
670
		" * Some words here {@link Str.\n" + 
671
		" */\n" + 
672
		"public class Test {\n" + 
673
		"}\n";
674
	completeInJavadoc("/Completion/src/bugs/b118105/BasicTestBugs.java", source, true, "Str");
675
	assertSortedResults(
676
		"String[TYPE_REF]{String, java.lang, Ljava.lang.String;, null, null, "+this.positions+R_DICUNR+"}"
677
	);
678
}
661
}
679
}

Return to bug 118105