Package io.jenkins.plugins.prism
Class Marker
java.lang.Object
io.jenkins.plugins.prism.Marker
Marks a line, some characters in a line, or a multi-line block in the source code. A marker can optionally be
enriched with a message, description, and icon. Additionally, a marker has a severity that defines the color of
the marked lines and of the box that shows the details. The box can show a list of badges (short labels like the
name of a tool or a category) and a list of links to related pages.
- Author:
- Ullrich Hafner
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classA short label that is shown in the header of the box of a marker.static final classA link to a related page that is shown in the footer of the box of a marker.static classCreatesmarkersusing the builder pattern.static enumThe severity of a marker. -
Method Summary
Modifier and TypeMethodDescriptionReturns the badges of this marker.intintgetData()Returns additional data of this marker.getIcon()getId()Returns the ID of this marker.intintgetLinks()Returns the links of this marker.Returns the severity of this marker.getTitle()booleanReturns whether this marker is part of the navigation between the markers (keys, floating buttons, and overview ruler), even if it has neither a title nor a description.
-
Method Details
-
getId
Returns the ID of this marker. The ID is used as ID of the HTML element that shows the marker in the source code view, so it can be used as fragment of a URL to select and scroll to the marker.- Returns:
- the ID of the marker, or an empty string if no ID has been defined
-
getTitle
-
getIcon
-
getDescription
-
getLineStart
public int getLineStart() -
getLineEnd
public int getLineEnd() -
getColumnStart
public int getColumnStart() -
getColumnEnd
public int getColumnEnd() -
getSeverity
Returns the severity of this marker. The severity defines the color of the marked lines and of the box that shows the details of the marker.- Returns:
- the severity
-
getBadges
Returns the badges of this marker. Badges are short labels that are shown in the header of the box, e.g., the name of a tool, a category, or a state like "new".- Returns:
- the badges, the list may be empty
-
getLinks
Returns the links of this marker. Links are shown in the footer of the box and refer to related pages.- Returns:
- the links, the list may be empty
-
getData
Returns additional data of this marker. Each entry is rendered as an attributedata-marker-<name>of the box of the marker, so client side scripts can use the data, e.g., to filter the markers.- Returns:
- the data of the marker, the map may be empty
-