Class Marker

java.lang.Object
io.jenkins.plugins.prism.Marker

public class Marker extends Object
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
  • Method Details

    • getId

      public String 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

      public String getTitle()
    • getIcon

      public String getIcon()
    • getDescription

      public String getDescription()
    • getLineStart

      public int getLineStart()
    • getLineEnd

      public int getLineEnd()
    • getColumnStart

      public int getColumnStart()
    • getColumnEnd

      public int getColumnEnd()
    • getSeverity

      public Marker.Severity 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

      public List<Marker.Badge> 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

      public List<Marker.Link> 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

      public Map<String,String> getData()
      Returns additional data of this marker. Each entry is rendered as an attribute data-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
    • isNavigable

      public boolean isNavigable()
      Returns 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. Markers with a title or a description are always part of the navigation.
      Returns:
      true if the marker has been added to the navigation explicitly, false otherwise
      See Also: