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

Collapse All | Expand All

(-)codeassist/org/eclipse/jdt/internal/codeassist/complete/CompletionJavadocParser.java (-1 lines)
Lines 57-63 Link Here
57
		super(sourceParser);
57
		super(sourceParser);
58
		this.scanner = new CompletionScanner(ClassFileConstants.JDK1_3);
58
		this.scanner = new CompletionScanner(ClassFileConstants.JDK1_3);
59
		this.kind = COMPLETION_PARSER | TEXT_PARSE;
59
		this.kind = COMPLETION_PARSER | TEXT_PARSE;
60
		this.reportProblems = false;
61
		initLevelTags();
60
		initLevelTags();
62
	}
61
	}
63
62
(-)compiler/org/eclipse/jdt/internal/compiler/parser/Parser.java (-3 / +6 lines)
Lines 1111-1119 Link Here
1111
		// check deprecation in last comment if javadoc (can be followed by non-javadoc comments which are simply ignored)	
1111
		// check deprecation in last comment if javadoc (can be followed by non-javadoc comments which are simply ignored)	
1112
		while (lastComment >= 0 && this.scanner.commentStops[lastComment] < 0) lastComment--; // non javadoc comment have negative end positions
1112
		while (lastComment >= 0 && this.scanner.commentStops[lastComment] < 0) lastComment--; // non javadoc comment have negative end positions
1113
		if (lastComment >= 0 && this.javadocParser != null) {
1113
		if (lastComment >= 0 && this.javadocParser != null) {
1114
			int commentEnd = this.scanner.commentStops[lastComment] - 1; //stop is one over,
1114
			int commentEnd = this.scanner.commentStops[lastComment] - 1; //stop is one over
1115
			// do not report problem before last parsed comment while recovering code...
1115
			if (this.javadocParser.shouldReportProblems) {
1116
			this.javadocParser.reportProblems = this.currentElement == null || commentEnd > this.lastJavadocEnd;
1116
				// do not report problem before last parsed comment while recovering code...
1117
				this.javadocParser.reportProblems = this.currentElement == null || commentEnd > this.lastJavadocEnd;
1118
			}
1117
			if (this.javadocParser.checkDeprecation(lastComment)) {
1119
			if (this.javadocParser.checkDeprecation(lastComment)) {
1118
				checkAndSetModifiers(ClassFileConstants.AccDeprecated);
1120
				checkAndSetModifiers(ClassFileConstants.AccDeprecated);
1119
			}
1121
			}
Lines 10387-10390 Link Here
10387
	exp.sourceEnd = this.intStack[this.intPtr--];
10389
	exp.sourceEnd = this.intStack[this.intPtr--];
10388
	exp.sourceStart = this.intStack[this.intPtr--];
10390
	exp.sourceStart = this.intStack[this.intPtr--];
10389
}
10391
}
10392
10390
}
10393
}
(-)compiler/org/eclipse/jdt/internal/compiler/parser/AbstractCommentParser.java (+3 lines)
Lines 47-52 Link Here
47
	
47
	
48
	// Options
48
	// Options
49
	public boolean checkDocComment = false;
49
	public boolean checkDocComment = false;
50
	// returns whether this comment parser is reporting error or not (overrides reportProblems)
51
	// see "https://bugs.eclipse.org/bugs/show_bug.cgi?id=192449"
52
	public boolean shouldReportProblems = true;
50
	public boolean reportProblems;
53
	public boolean reportProblems;
51
	protected long complianceLevel;
54
	protected long complianceLevel;
52
	protected long sourceLevel;
55
	protected long sourceLevel;
(-)model/org/eclipse/jdt/internal/compiler/SourceElementParser.java (-3 / +5 lines)
Lines 176-184 Link Here
176
		// check deprecation in last comment if javadoc (can be followed by non-javadoc comments which are simply ignored)	
176
		// check deprecation in last comment if javadoc (can be followed by non-javadoc comments which are simply ignored)	
177
		while (lastComment >= 0 && this.scanner.commentStops[lastComment] < 0) lastComment--; // non javadoc comment have negative end positions
177
		while (lastComment >= 0 && this.scanner.commentStops[lastComment] < 0) lastComment--; // non javadoc comment have negative end positions
178
		if (lastComment >= 0 && this.javadocParser != null) {
178
		if (lastComment >= 0 && this.javadocParser != null) {
179
			int commentEnd = this.scanner.commentStops[lastComment] - 1; //stop is one over,
179
			int commentEnd = this.scanner.commentStops[lastComment] - 1; //stop is one over
180
			// do not report problem before last parsed comment while recovering code...
180
			if (this.javadocParser.shouldReportProblems) {
181
			this.javadocParser.reportProblems = this.currentElement == null || commentEnd > this.lastJavadocEnd;
181
				// do not report problem before last parsed comment while recovering code...
182
				this.javadocParser.reportProblems = this.currentElement == null || commentEnd > this.lastJavadocEnd;
183
			}
182
			if (this.javadocParser.checkDeprecation(lastComment)) {
184
			if (this.javadocParser.checkDeprecation(lastComment)) {
183
				checkAndSetModifiers(ClassFileConstants.AccDeprecated);
185
				checkAndSetModifiers(ClassFileConstants.AccDeprecated);
184
			}
186
			}
(-)model/org/eclipse/jdt/internal/core/util/CommentRecorderParser.java (-2 / +5 lines)
Lines 64-73 Link Here
64
			checkDeprecated = true;
64
			checkDeprecated = true;
65
			int commentSourceEnd = this.scanner.commentStops[lastCommentIndex] - 1; //stop is one over
65
			int commentSourceEnd = this.scanner.commentStops[lastCommentIndex] - 1; //stop is one over
66
			
66
			
67
			// do not report problem before last parsed comment while recovering code...
67
			if (this.javadocParser.shouldReportProblems) {
68
			this.javadocParser.reportProblems = this.currentElement == null || commentSourceEnd > this.lastJavadocEnd;
68
				// do not report problem before last parsed comment while recovering code...
69
				this.javadocParser.reportProblems = this.currentElement == null || commentSourceEnd > this.lastJavadocEnd;
70
			}
69
			deprecated = this.javadocParser.checkDeprecation(lastCommentIndex);
71
			deprecated = this.javadocParser.checkDeprecation(lastCommentIndex);
70
			this.javadoc = this.javadocParser.docComment;
72
			this.javadoc = this.javadocParser.docComment;
73
			if (currentElement == null) this.lastJavadocEnd = commentSourceEnd;
71
			break nextComment;
74
			break nextComment;
72
		}
75
		}
73
		if (deprecated) {
76
		if (deprecated) {
(-)codeassist/org/eclipse/jdt/internal/codeassist/select/SelectionJavadocParser.java (+1 lines)
Lines 28-33 Link Here
28
28
29
	public SelectionJavadocParser(SelectionParser sourceParser) {
29
	public SelectionJavadocParser(SelectionParser sourceParser) {
30
		super(sourceParser);
30
		super(sourceParser);
31
		this.shouldReportProblems = false;
31
		this.kind = SELECTION_PARSER | TEXT_PARSE;
32
		this.kind = SELECTION_PARSER | TEXT_PARSE;
32
	}
33
	}
33
34

Return to bug 192449