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 22390 - Syntax-highlight Javadoc summary sentences
Summary: Syntax-highlight Javadoc summary sentences
Status: RESOLVED DUPLICATE of bug 25509
Alias: None
Product: editor
Classification: Unclassified
Component: Painting & Printing (show other bugs)
Version: 3.x
Hardware: PC Linux
: P4 blocker (vote)
Assignee: issues@editor
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-04-12 18:24 UTC by Jesse Glick
Modified: 2007-11-05 13:45 UTC (History)
1 user (show)

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments
Emacs syntax highlighting config (1004 bytes, text/plain)
2002-04-12 18:25 UTC, Jesse Glick
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jesse Glick 2002-04-12 18:24:14 UTC
I think it would be great to add some specific
syntax highlighting for Javadoc comments in the
text/x-java editor. For example, highlighting of
@-tags. More interestingly, highlight (by default,
using boldface) the summary sentence of Javadoc
comments. (Even nicer is to only do so for
comments applicable to public or protected
members, i.e. summaries which would actually show
up in generated API Javadoc.)

I used to highlight the summary sentence in
Emacs's Java Mode, and it was very useful when
editing API classes for their Javadoc, since you
could spot the relevant descriptions very quickly.

I will attach a portion of the
java-font-lock-keywords-3 that I used in Emacs,
for purposes of comparison. (I stopped using it
for performance reasons; the regular expressions
were not well optimized.) Basic syntax: list of
highlight matchers; each is a list of a regexp
(quoted string, Emacs-style RE so \( not ( is the
grouping operator etc.), then list of highlights,
each being a regexp group number, then a font
modifier, then prepend and override flags (adjust
precedence rules).

Note that in JDK 1.4 the summary sentence is no
longer computed by a simple English-only
algorithm, but using BreakIterator and a
locale-sensitive algorithm. So I think the
highlighting should follow the semantics of
BreakIterator, to ensure that Javadoc comments
written using the NB editor will appear correctly
in generated HTML.
Comment 1 Jesse Glick 2002-04-12 18:25:56 UTC
Created attachment 5404 [details]
Emacs syntax highlighting config
Comment 2 Jesse Glick 2002-06-25 17:46:19 UTC
See also issue #23474.
Comment 3 Marek Grummich 2002-07-22 12:10:19 UTC
Set target milestone to TBD
Comment 4 Marek Grummich 2002-07-22 12:13:24 UTC
Set target milestone to TBD
Comment 5 psuk 2004-03-23 20:22:48 UTC
Changing subcomponent to syntax coloring
Comment 6 Roman Strobl 2004-12-06 15:49:24 UTC
Marking as duplicate of 25509, this issue is very similar and has
higher priority, thus it is more likely to be processed. 

*** This issue has been marked as a duplicate of 25509 ***