Package io.jenkins.plugins.prism
Class SourceCodeViewModel
java.lang.Object
io.jenkins.plugins.prism.SourceCodeViewModel
- All Implemented Interfaces:
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.
- Author:
- Ullrich Hafner
-
Constructor Summary
ConstructorsConstructorDescriptionSourceCodeViewModel
(Run<?, ?> owner, String fileName, Reader sourceCodeReader, Marker marker) Creates a new source code view model instance. -
Method Summary
-
Constructor Details
-
SourceCodeViewModel
Creates a new source code view model instance.- Parameters:
owner
- the current build as owner of this viewfileName
- the file name of the shown contentsourceCodeReader
- the source code file to show, provided by aReader
instancemarker
- a block of lines (or a part of a line) to mark in the source code view
-
-
Method Details
-
getPrismConfiguration
-
getDisplayName
- Specified by:
getDisplayName
in interfaceModelObject
-
getOwner
Returns the build as owner of this view.- Returns:
- the build
-
getSourceCode
Returns the colorized source code.- Returns:
- the source code
-