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
(-)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) {
(-)model/org/eclipse/jdt/internal/compiler/SourceElementParser.java (-3 / +5 lines)
Lines 177-185 Link Here
177
		// check deprecation in last comment if javadoc (can be followed by non-javadoc comments which are simply ignored)	
177
		// check deprecation in last comment if javadoc (can be followed by non-javadoc comments which are simply ignored)	
178
		while (lastComment >= 0 && this.scanner.commentStops[lastComment] < 0) lastComment--; // non javadoc comment have negative end positions
178
		while (lastComment >= 0 && this.scanner.commentStops[lastComment] < 0) lastComment--; // non javadoc comment have negative end positions
179
		if (lastComment >= 0 && this.javadocParser != null) {
179
		if (lastComment >= 0 && this.javadocParser != null) {
180
			int commentEnd = this.scanner.commentStops[lastComment] - 1; //stop is one over,
180
			int commentEnd = this.scanner.commentStops[lastComment] - 1; //stop is one over
181
			// do not report problem before last parsed comment while recovering code...
181
			if (this.javadocParser.shouldReportProblems) {
182
			this.javadocParser.reportProblems = this.currentElement == null || commentEnd > this.lastJavadocEnd;
182
				// do not report problem before last parsed comment while recovering code...
183
				this.javadocParser.reportProblems = this.currentElement == null || commentEnd > this.lastJavadocEnd;
184
			}
183
			if (this.javadocParser.checkDeprecation(lastComment)) {
185
			if (this.javadocParser.checkDeprecation(lastComment)) {
184
				checkAndSetModifiers(ClassFileConstants.AccDeprecated);
186
				checkAndSetModifiers(ClassFileConstants.AccDeprecated);
185
			}
187
			}
(-)compiler/org/eclipse/jdt/internal/compiler/parser/Parser.java (-3 / +6 lines)
Lines 1108-1116 Link Here
1108
		// check deprecation in last comment if javadoc (can be followed by non-javadoc comments which are simply ignored)	
1108
		// check deprecation in last comment if javadoc (can be followed by non-javadoc comments which are simply ignored)	
1109
		while (lastComment >= 0 && this.scanner.commentStops[lastComment] < 0) lastComment--; // non javadoc comment have negative end positions
1109
		while (lastComment >= 0 && this.scanner.commentStops[lastComment] < 0) lastComment--; // non javadoc comment have negative end positions
1110
		if (lastComment >= 0 && this.javadocParser != null) {
1110
		if (lastComment >= 0 && this.javadocParser != null) {
1111
			int commentEnd = this.scanner.commentStops[lastComment] - 1; //stop is one over,
1111
			int commentEnd = this.scanner.commentStops[lastComment] - 1; //stop is one over
1112
			// do not report problem before last parsed comment while recovering code...
1112
			if (this.javadocParser.shouldReportProblems) {
1113
			this.javadocParser.reportProblems = this.currentElement == null || commentEnd > this.lastJavadocEnd;
1113
				// do not report problem before last parsed comment while recovering code...
1114
				this.javadocParser.reportProblems = this.currentElement == null || commentEnd > this.lastJavadocEnd;
1115
			}
1114
			if (this.javadocParser.checkDeprecation(lastComment)) {
1116
			if (this.javadocParser.checkDeprecation(lastComment)) {
1115
				checkAndSetModifiers(ClassFileConstants.AccDeprecated);
1117
				checkAndSetModifiers(ClassFileConstants.AccDeprecated);
1116
			}
1118
			}
Lines 10204-10207 Link Here
10204
	exp.sourceEnd = this.intStack[this.intPtr--];
10206
	exp.sourceEnd = this.intStack[this.intPtr--];
10205
	exp.sourceStart = this.intStack[this.intPtr--];
10207
	exp.sourceStart = this.intStack[this.intPtr--];
10206
}
10208
}
10209
10207
}
10210
}
(-)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;
(-)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