Klasse SourceCodeFacade
java.lang.Object
io.jenkins.plugins.coverage.model.visualization.code.SourceCodeFacade
Facade to the source code file structure in Jenkins build folder. Access of those files should be done using an
instance of this class only.
- Autor:
- Ullrich Hafner, Florian Orendi
-
Konstruktorübersicht
-
Methodenübersicht
Modifizierer und TypMethodeBeschreibungcalculateChangeCoverageSourceCode
(String content, FileCoverageNode fileNode) Filters the sourcecode coverage highlighting for analyzing the change coverage only.calculateIndirectCoverageChangesSourceCode
(String content, FileCoverageNode fileNode) Filters the sourcecode coverage highlighting for analyzing indirect coverage changes only.createFileInBuildFolder
(File buildResults, String id, String path) Returns a file to the sources in release 2.1.0 and newer.boolean
hasStoredSourceCode
(File buildResults, String id) Checks whether any source files has been stored.Reads the contents of the source file of the given coverage node into a String.
-
Konstruktordetails
-
SourceCodeFacade
public SourceCodeFacade()
-
-
Methodendetails
-
read
public String read(File buildResults, String id, String path) throws IOException, InterruptedException Reads the contents of the source file of the given coverage node into a String.- Parameter:
buildResults
- Jenkins directory for build resultsid
- if of the coverage resultspath
- relative path to the coverage node base filename of the coverage node- Gibt zurück:
- the file content as String
- Löst aus:
IOException
InterruptedException
-
createFileInBuildFolder
Returns a file to the sources in release 2.1.0 and newer. Note that the file might not exist.- Parameter:
buildResults
- Jenkins directory for build resultsid
- if of the coverage resultspath
- relative path to the coverage node base filename of the coverage node- Gibt zurück:
- the file
-
hasStoredSourceCode
Checks whether any source files has been stored. Even if it is wanted, there might have been errors which cause the absence of any source files.- Parameter:
buildResults
- Jenkins directory for build resultsid
- id of the coverage results- Gibt zurück:
true
whether source files has been stored, elsefalse
-
calculateChangeCoverageSourceCode
Filters the sourcecode coverage highlighting for analyzing the change coverage only.- Parameter:
content
- The original HTML contentfileNode
- Thenode
which represents the coverage of the file- Gibt zurück:
- the filtered HTML sourcecode view
-
calculateIndirectCoverageChangesSourceCode
Filters the sourcecode coverage highlighting for analyzing indirect coverage changes only.- Parameter:
content
- The original HTML contentfileNode
- Thenode
which represents the coverage of the file- Gibt zurück:
- the filtered HTML sourcecode view
-