Klasse StaticAnalysisLabelProvider
java.lang.Object
io.jenkins.plugins.analysis.core.model.StaticAnalysisLabelProvider
- Alle implementierten Schnittstellen:
DescriptionProvider
- Bekannte direkte Unterklassen:
IconLabelProvider
,SvgIconLabelProvider
,SymbolIconLabelProvider
A generic label provider for static analysis results. Creates pre-defined labels that are parameterized with a string
placeholder, that will be replaced with the actual name of the static analysis tool. Moreover, such a default label
provider decorates the links and summary boxes with the default icon of the warnings plug-in.
- Autor:
- Ullrich Hafner
-
Verschachtelte Klassen - Übersicht
Modifizierer und TypKlasseBeschreibungstatic interface
Functional interface that maps the age of a build from an integer value to a String value.static class
Computes the age of a build as a hyperlink. -
Feldübersicht
Modifizierer und TypFeldBeschreibungstatic final String
Default icon for all tools.protected static final DescriptionProvider
Provides an empty description. -
Konstruktorübersicht
KonstruktorBeschreibungStaticAnalysisLabelProvider
(String id, String name) Creates a newStaticAnalysisLabelProvider
with the specified ID.StaticAnalysisLabelProvider
(String id, String name, DescriptionProvider descriptionProvider) Creates a newStaticAnalysisLabelProvider
with the specified ID. -
Methodenübersicht
Modifizierer und TypMethodeBeschreibunggetAgeBuilder
(Run<?, ?> owner, String url) Creates aStaticAnalysisLabelProvider.DefaultAgeBuilder
for the specified run and url.getDescription
(edu.hm.hafner.analysis.Issue issue) Returns a detailed description of the specified issue.protected FileNameRenderer
getFileNameRenderer
(Run<?, ?> owner) Creates aFileNameRenderer
for the specified run.getId()
Returns the ID of the tool.getIssuesModel
(Run<?, ?> build, String url, edu.hm.hafner.analysis.Report report) Returns the model for the issues details table.Returns the absolute URL to the large icon for the tool.Returns the name of the link to the results.getName()
Returns the human-readable name of the tool.Returns the absolute URL to the small icon for the tool.getSourceCodeDescription
(Run<?, ?> build, edu.hm.hafner.analysis.Issue issue) Returns an additional description of the specified issue that will be shown with the source code.getToolTip
(int numberOfItems) Returns a short description describing the total number of issues.Returns the legend for the trend chart in the project overview.Sets the human-readable name of the tool.toString()
-
Felddetails
-
ANALYSIS_SVG_ICON
Default icon for all tools.- Siehe auch:
-
EMPTY_DESCRIPTION
Provides an empty description.
-
-
Konstruktordetails
-
StaticAnalysisLabelProvider
Creates a newStaticAnalysisLabelProvider
with the specified ID.- Parameter:
id
- the IDname
- the name of the static analysis tool
-
StaticAnalysisLabelProvider
public StaticAnalysisLabelProvider(String id, @CheckForNull String name, DescriptionProvider descriptionProvider) Creates a newStaticAnalysisLabelProvider
with the specified ID.- Parameter:
id
- the IDname
- the name of the static analysis tooldescriptionProvider
- provides additional descriptions for an issue
-
-
Methodendetails
-
getIssuesModel
public DetailsTableModel getIssuesModel(Run<?, ?> build, String url, edu.hm.hafner.analysis.Report report) Returns the model for the issues details table.- Parameter:
build
- the build of the resultsurl
- the URL of the resultsreport
- the report to show- Gibt zurück:
- the table model
-
getAgeBuilder
Creates aStaticAnalysisLabelProvider.DefaultAgeBuilder
for the specified run and url.- Parameter:
owner
- the run to get the age fromurl
- the url to the results- Gibt zurück:
- the age builder
-
getFileNameRenderer
Creates aFileNameRenderer
for the specified run.- Parameter:
owner
- the run to get the file names for- Gibt zurück:
- the age builder
-
getId
Returns the ID of the tool.- Gibt zurück:
- the ID
-
getName
Returns the human-readable name of the tool. If the name has not been set, then the default name is returned.- Gibt zurück:
- the name
-
setName
Sets the human-readable name of the tool.- Parameter:
name
- the name of the tool- Gibt zurück:
- the name
-
toString
-
getLinkName
Returns the name of the link to the results.- Gibt zurück:
- the name of the side panel link
-
getTrendName
Returns the legend for the trend chart in the project overview.- Gibt zurück:
- the legend of the trend chart
-
getSmallIconUrl
Returns the absolute URL to the small icon for the tool.- Gibt zurück:
- absolute URL
-
getLargeIconUrl
Returns the absolute URL to the large icon for the tool.- Gibt zurück:
- absolute URL
-
getToolTip
Returns a short description describing the total number of issues.- Parameter:
numberOfItems
- the number of issues to report- Gibt zurück:
- the description
-
getDescription
Beschreibung aus Schnittstelle kopiert:DescriptionProvider
Returns a detailed description of the specified issue.- Angegeben von:
getDescription
in SchnittstelleDescriptionProvider
- Parameter:
issue
- the issue to get the description for- Gibt zurück:
- the description
-
getSourceCodeDescription
Returns an additional description of the specified issue that will be shown with the source code.- Parameter:
build
- the current buildissue
- the issue- Gibt zurück:
- the additional description
-