Klasse SourceCodeViewModel

java.lang.Object
io.jenkins.plugins.prism.SourceCodeViewModel
Alle implementierten Schnittstellen:
ModelObject

public class SourceCodeViewModel extends Object implements ModelObject
Renders a source code file with Prism syntax highlighting in a separate Jenkins view. Optionally, highlights a marker in the source code: either a line, some characters in a line, or a multi-line block.
Autor:
Ullrich Hafner
  • Konstruktordetails

    • SourceCodeViewModel

      public SourceCodeViewModel(Run<?,?> owner, String fileName, Reader sourceCodeReader, Marker marker)
      Creates a new source code view model instance.
      Parameter:
      owner - the current build as owner of this view
      fileName - the file name of the shown content
      sourceCodeReader - the source code file to show, provided by a Reader instance
      marker - a block of lines (or a part of a line) to mark in the source code view
  • Methodendetails

    • getPrismConfiguration

      public PrismConfiguration getPrismConfiguration()
    • getDisplayName

      public String getDisplayName()
      Angegeben von:
      getDisplayName in Schnittstelle ModelObject
    • getOwner

      public Run<?,?> getOwner()
      Returns the build as owner of this view.
      Gibt zurück:
      the build
    • getSourceCode

      public String getSourceCode()
      Returns the colorized source code.
      Gibt zurück:
      the source code