Skip to content
This repository has been archived by the owner. It is now read-only.
Permalink
Browse files
[JENKINS-10027] Fixed type of action.
  • Loading branch information
uhafner committed Jul 6, 2011
1 parent 5b1b2c0 commit a5cf897657630e53b8c6bf3e36dfb0f9fcd329ff
@@ -24,7 +24,7 @@
<dependency>
<groupId>org.jvnet.hudson.plugins</groupId>
<artifactId>analysis-core</artifactId>
<version>1.23</version>
<version>1.24-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.jvnet.hudson.plugins</groupId>
@@ -0,0 +1,22 @@
package hudson.plugins.analysis.collector.tokens;

import hudson.Extension;
import hudson.plugins.analysis.collector.AnalysisResultAction;
import hudson.plugins.analysis.tokens.AbstractFixedAnnotationsTokenMacro;

/**
* Provides a token that evaluates to the number of new warnings.
*
* @author Ulli Hafner
*/
@Extension(optional = true)
public class FixedWarningsCountTokenMacro extends AbstractFixedAnnotationsTokenMacro {
/**
* Creates a new instance of {@link FixedWarningsCountTokenMacro}.
*/
@SuppressWarnings("unchecked")
public FixedWarningsCountTokenMacro() {
super("ANALYSIS_FIXED", AnalysisResultAction.class);
}
}

@@ -0,0 +1,22 @@
package hudson.plugins.analysis.collector.tokens;

import hudson.Extension;
import hudson.plugins.analysis.collector.AnalysisResultAction;
import hudson.plugins.analysis.tokens.AbstractNewAnnotationsTokenMacro;

/**
* Provides a token that evaluates to the number of new warnings.
*
* @author Ulli Hafner
*/
@Extension(optional = true)
public class NewWarningsCountTokenMacro extends AbstractNewAnnotationsTokenMacro {
/**
* Creates a new instance of {@link NewWarningsCountTokenMacro}.
*/
@SuppressWarnings("unchecked")
public NewWarningsCountTokenMacro() {
super("ANALYSIS_NEW", AnalysisResultAction.class);
}
}

@@ -2,20 +2,21 @@

import hudson.Extension;
import hudson.plugins.analysis.collector.AnalysisResultAction;
import hudson.plugins.analysis.tokens.AbstractResultTokenMacro;
import hudson.plugins.analysis.tokens.AbstractAnnotationsCountTokenMacro;

/**
* Provides a token that evaluates to the number of warnings.
*
* @author Ulli Hafner
*/
@Extension(optional = true)
public class WarningsCountTokenMacro extends AbstractResultTokenMacro {
public class WarningsCountTokenMacro extends AbstractAnnotationsCountTokenMacro {
/**
* Creates a new instance of {@link WarningsCountTokenMacro}.
*/
@SuppressWarnings("unchecked")
public WarningsCountTokenMacro() {
super(AnalysisResultAction.class, "ANALYSIS_COUNT");
super("ANALYSIS_COUNT", AnalysisResultAction.class);
}
}

@@ -1,8 +1,8 @@
package hudson.plugins.analysis.collector.tokens;

import hudson.Extension;
import hudson.plugins.analysis.collector.AnalysisResultAction;
import hudson.plugins.analysis.tokens.AbstractResultTokenMacro;
import hudson.plugins.warnings.WarningsResultAction;

/**
* Provides a token that evaluates to the warnings collector build result.
@@ -14,8 +14,9 @@ public class WarningsResultTokenMacro extends AbstractResultTokenMacro {
/**
* Creates a new instance of {@link WarningsResultTokenMacro}.
*/
@SuppressWarnings("unchecked")
public WarningsResultTokenMacro() {
super(WarningsResultAction.class, "ANALYSIS_RESULT");
super("ANALYSIS_RESULT", AnalysisResultAction.class);
}
}

@@ -0,0 +1,8 @@
<j:jelly xmlns:j="jelly:core">

<dt>$${ANALYSIS_FIXED}</dt>
<dd>
Expands to the total number of new warnings in a build.
</dd>

</j:jelly>
@@ -0,0 +1,8 @@
<j:jelly xmlns:j="jelly:core">

<dt>$${ANALYSIS_NEW}</dt>
<dd>
Expands to the total number of new warnings in a build.
</dd>

</j:jelly>

0 comments on commit a5cf897

Please sign in to comment.