Skip to content
This repository has been archived by the owner. It is now read-only.
Permalink
Browse files
[JENKINS-31202] Provide empty list of project actions for pipelines.
  • Loading branch information
uhafner committed Jun 1, 2016
1 parent 43c6179 commit b0f1a2c18dcff86c3d2e1e836b8616f352f1eb74
Showing with 17 additions and 2 deletions.
  1. +17 −2 src/main/java/hudson/plugins/analysis/core/AbstractResultAction.java
@@ -1,5 +1,7 @@
package hudson.plugins.analysis.core;

import java.util.Collection;
import java.util.Collections;
import java.util.List;
import java.util.Map;

@@ -12,10 +14,12 @@

import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
import jenkins.model.Jenkins;
import jenkins.tasks.SimpleBuildStep.LastBuildAction;

import hudson.maven.MavenBuild;
import hudson.maven.MavenModule;
import hudson.model.AbstractBuild;
import hudson.model.Action;
import hudson.model.HealthReport;
import hudson.model.HealthReportingAction;
import hudson.model.Run;
@@ -36,8 +40,8 @@
*/
//CHECKSTYLE:COUPLING-OFF
@ExportedBean
public abstract class AbstractResultAction<T extends BuildResult> implements StaplerProxy, HealthReportingAction, ToolTipProvider, ResultAction<T> {
/** The associated build of this action. */
public abstract class AbstractResultAction<T extends BuildResult> implements StaplerProxy, HealthReportingAction, ToolTipProvider, ResultAction<T>, LastBuildAction {
/** The associated run of this action. */
private final Run<?, ?> owner;
/** Parameters for the health report. */
private final AbstractHealthDescriptor healthDescriptor;
@@ -118,6 +122,17 @@ public ToolTipProvider getToolTipProvider() {
return owner;
}

/**
* Returns the project actions if this action is used in a pipeline.
*
* @return default implementation returns empty collection, plug-in must override if they want to contribute to the UI
*/
// FIXME: See JENKINS-31202. Currently the whole graphing is based around AbstractBuild (large refactoring required)
@Override
public Collection<? extends Action> getProjectActions() {
return Collections.emptyList();
}

/**
* Added for backward compatibility. It generates <pre>AbstractBuild getOwner()</pre> bytecode during the build
* process, so old implementations can use that signature.

0 comments on commit b0f1a2c

Please sign in to comment.