This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 25509 - JavaDoc comments syntax coloring
Summary: JavaDoc comments syntax coloring
Status: RESOLVED FIXED
Alias: None
Product: java
Classification: Unclassified
Component: Javadoc (show other bugs)
Version: 3.x
Hardware: All All
: P3 blocker with 1 vote (vote)
Assignee: Jan Becicka
URL:
Keywords: PLAN
: 22390 23474 35679 (view as bug list)
Depends on:
Blocks:
 
Reported: 2002-07-10 17:17 UTC by William McArthur
Modified: 2011-06-01 13:26 UTC (History)
3 users (show)

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments
Original javadoc (99.76 KB, image/png)
2011-05-12 13:17 UTC, Jan Becicka
Details
Improved coloring (81.94 KB, image/png)
2011-05-12 13:27 UTC, Jan Becicka
Details
patch (20.06 KB, patch)
2011-05-12 13:56 UTC, Jan Becicka
Details | Diff
First sentence in bold via new highliting layer. Parameters highlighted (via modified lexer and lexer based highlighting. (29.58 KB, patch)
2011-05-19 08:56 UTC, Jan Becicka
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description William McArthur 2002-07-10 17:17:18 UTC
It would be nice if there was a coloring scheme
for JavaDoc block comments. Vim is the other
editor I commonly use and it's syntax highlighting
is such that:

1: The first sentence is in a slightly lighter
color then the rest of the comment block so it's
easy to see what will be in the summary lines of
the JavaDoc output.
2: The @tags are shown in a slightly darker color.
3: The @tags variable name if it exists is a
slightly lighter color with the description the
normal comment block color.

vim will also color html tags a different color
but personally I don't care as much about that.
Comment 1 Marek Grummich 2002-07-22 12:08:08 UTC
Set target milestone to TBD
Comment 2 Marek Grummich 2002-07-22 12:11:21 UTC
Set target milestone to TBD
Comment 3 psuk 2004-03-23 20:22:53 UTC
Changing subcomponent to syntax coloring
Comment 4 Martin Roskanin 2004-07-26 10:47:29 UTC
*** Issue 35679 has been marked as a duplicate of this issue. ***
Comment 5 Roman Strobl 2004-12-06 15:49:24 UTC
*** Issue 22390 has been marked as a duplicate of this issue. ***
Comment 6 Roman Strobl 2004-12-06 15:50:34 UTC
See issue #22390 for additional requirements on javadoc coloring.
Comment 7 Roman Strobl 2004-12-06 16:03:54 UTC
*** Issue 23474 has been marked as a duplicate of this issue. ***
Comment 8 Roman Strobl 2004-12-06 16:05:13 UTC
As mentioned in #23474, the color of javadoc comments could differ
from non-javadoc comments. Take this into account when working on this
RFE.
Comment 9 Vitezslav Stejskal 2007-06-08 09:10:30 UTC
We have already colorings for javadoc tags and html tags in javadoc comments.
Still need first sentence highlighting and parameter names highlighting. There
is contrib/JavadocFirstSentence which shows first sentence in bold, but it
should be incorporated in javadoc module and exposed as a proper coloring in
Tools-Options, so that users could customize it.
Comment 10 Jan Becicka 2011-05-12 13:16:13 UTC
I did some improvements, see attached snapshots
Comment 11 Jan Becicka 2011-05-12 13:17:03 UTC
Created attachment 108252 [details]
Original javadoc
Comment 12 Jan Becicka 2011-05-12 13:27:10 UTC
Created attachment 108253 [details]
Improved coloring

html tags are bold and in different color (153,153,255)
first javadoc sentence is bold

Parameters are still not highlighted. BTW I think, that Javadoc lexer does not work correctly. Regular javadoc text is JavadocTokenId.IDENT which is wrong imo. Regular comment should be OTHER_TEXT and IDENT can be used for instance for parameters (single word behind @param tag) or for words inside {@link some words}. So we can use different colors for it.
Comment 13 Jan Becicka 2011-05-12 13:28:32 UTC
Honzo L, what do you think about my lexer issue?
Comment 14 Jan Becicka 2011-05-12 13:56:59 UTC
Created attachment 108254 [details]
patch
Comment 15 Jan Becicka 2011-05-19 08:56:27 UTC
Created attachment 108383 [details]
First sentence in bold via new highliting layer. Parameters highlighted (via modified lexer and lexer based highlighting.
Comment 16 Jan Becicka 2011-05-31 09:42:07 UTC
Changeset: http://hg.netbeans.org/jet-main/rev/a131af4aee42
Author:    Jan Becicka <jbecicka@netbeans.org>
Date:      2011-05-31 11:34
Message:   
Issue #25509 - JavaDoc comments syntax coloring
Comment 17 Jan Becicka 2011-05-31 09:42:14 UTC
Changeset: http://hg.netbeans.org/jet-main/rev/c46fedce0c56
Author:    Jan Becicka <jbecicka@netbeans.org>
Date:      2011-05-31 11:39
Message:   
Issue #25509 - JavaDoc comments syntax coloring
Comment 18 Quality Engineering 2011-06-01 13:26:29 UTC
Integrated into 'main-golden', will be available in build *201106010401* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main/rev/a131af4aee42
User: Jan Becicka <jbecicka@netbeans.org>
Log: Issue #25509 - JavaDoc comments syntax coloring