Skip to content

Commit 74921e8

Browse files
committedJan 31, 2022
8280738: Minor cleanup for HtmlStyle
Reviewed-by: hannesw
1 parent 3916561 commit 74921e8

File tree

1 file changed

+56
-28
lines changed
  • src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/markup

1 file changed

+56
-28
lines changed
 

‎src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/markup/HtmlStyle.java

+56-28
Original file line numberDiff line numberDiff line change
@@ -48,20 +48,14 @@
4848
* or {@link javax.lang.model.element.Element "language model elements"}.
4949
* The usage is made explicit when it is not clear from the surrounding context.
5050
*
51+
* @apiNote
52+
* The stylized use of {@code editor-fold} comments and line comments (beginning {@code //})
53+
* is to support extracting details of declarations with external tools. Edit with care!
54+
*
5155
* @see <a href="https://html.spec.whatwg.org/#classes">WhatWG: {@code class} attribute</a>
5256
*/
5357
public enum HtmlStyle {
5458

55-
/**
56-
* The class of the {@code div} element containing a snippet element.
57-
*/
58-
snippetContainer,
59-
60-
/**
61-
* The class of the {@code a} element to copy snippet content to the clipboard.
62-
*/
63-
snippetCopy,
64-
6559
//<editor-fold desc="navigation bar">
6660
//
6761
// The following constants are used for the main navigation bar that appears in the
@@ -324,17 +318,6 @@ public enum HtmlStyle {
324318
*/
325319
propertyDetails,
326320

327-
/**
328-
* The class for the list containing the {@code @see} tags of an element.
329-
*/
330-
seeList,
331-
332-
/**
333-
* The class for the list containing the {@code @see} tags of an element
334-
* when some of the tags have longer labels.
335-
*/
336-
seeListLong,
337-
338321
/**
339322
* The class for a {@code section} element containing details of the
340323
* serialized form of an element, on the "Serialized Form" page.
@@ -391,6 +374,17 @@ public enum HtmlStyle {
391374
*/
392375
previewLabel,
393376

377+
/**
378+
* The class for the list containing the {@code @see} tags of an element.
379+
*/
380+
seeList,
381+
382+
/**
383+
* The class for the list containing the {@code @see} tags of an element
384+
* when some of the tags have longer labels.
385+
*/
386+
seeListLong,
387+
394388
//</editor-fold>
395389

396390
//<editor-fold desc="tables">
@@ -844,6 +838,44 @@ public enum HtmlStyle {
844838

845839
//</editor-fold>
846840

841+
//<editor-fold desc="snippets">
842+
//
843+
// The following constants are used for the contents of snippets.
844+
// In addition, the translation of a snippet may use the class
845+
// {@code language-LANG} where LANG is either specified explicitly
846+
// by the "lang" attribute in a snippet tag, or can be inferred
847+
// from the kind of an external snippet.
848+
849+
/**
850+
* The class of the {@code pre} element presenting a snippet.
851+
*/
852+
snippet,
853+
854+
/**
855+
* The class of the {@code div} element containing a snippet element.
856+
*/
857+
snippetContainer,
858+
859+
/**
860+
* The class of the UI element to copy snippet content to the clipboard.
861+
*/
862+
snippetCopy,
863+
864+
/**
865+
* The class of text highlighted with the type {@code bold}.
866+
*/
867+
bold,
868+
869+
/**
870+
* The class of text highlighted with the type {@code italic}.
871+
*/
872+
italic,
873+
874+
/**
875+
* The class of text highlighted with the type {@code highlighted}.
876+
*/
877+
highlighted,
878+
847879
//<editor-fold desc="miscellaneous">
848880
//
849881
// The following constants are used in various places across a variety of pages.
@@ -908,7 +940,8 @@ public enum HtmlStyle {
908940
inheritedList,
909941

910942
/**
911-
* The class of an element that acts as a notification for an invalid tag.
943+
* The class of an element that acts as a notification for an invalid tag
944+
* or other invalid items.
912945
*/
913946
invalidTag,
914947

@@ -923,7 +956,7 @@ public enum HtmlStyle {
923956
memberNameLink,
924957

925958
/**
926-
* The class for a {@code dl} element containing serial UID information in
959+
* The class of a {@code dl} element containing serial UID information in
927960
* the serialized form page.
928961
*/
929962
nameValue,
@@ -964,11 +997,6 @@ public enum HtmlStyle {
964997
*/
965998
sourceLineNo,
966999

967-
/**
968-
* The class of the {@code pre} element presenting a snippet.
969-
*/
970-
snippet,
971-
9721000
/**
9731001
* The class of an {@code a} element for a link to a class or interface.
9741002
*/

1 commit comments

Comments
 (1)

openjdk-notifier[bot] commented on Jan 31, 2022

@openjdk-notifier[bot]
Please sign in to comment.