Package edu.umd.cs.findbugs.anttask
Class FindBugsViewerTask
- java.lang.Object
-
- org.apache.tools.ant.ProjectComponent
-
- org.apache.tools.ant.Task
-
- edu.umd.cs.findbugs.anttask.AbstractFindBugsTask
-
- edu.umd.cs.findbugs.anttask.FindBugsViewerTask
-
- All Implemented Interfaces:
java.lang.Cloneable
public class FindBugsViewerTask extends AbstractFindBugsTask
FindBugsViewerTask.java -- Ant Task to launch the FindBugsFrame To use, create a new task that references the ant task (such as "findbugs-viewer"). Then call this task while passing in parameters to modify it's behaviour. It supports several options that are the same as the findbugs task: -projectFile -debug -jvmargs -home -classpath -pluginList -timeout It also adds some new options: -look: string name representing look and feel. Can be "native", "plastic" or "gtk" -loadbugs: file name of bug report to load The below is an example of how this could be done in an ant script: <taskdef name="findbugs" classname="edu.umd.cs.findbugs.anttask.FindBugsTask" classpath="C:\dev\cvs.sourceforge.net\findbugs\lib\findbugs-ant.jar" /> <taskdef name="findbugs-viewer" classname="edu.umd.cs.findbugs.anttask.FindBugsViewerTask" classpath="C:\dev\cvs.sourceforge.net\findbugs\lib\findbugs-ant.jar" /> <property name="findbugs.home" location="C:\dev\cvs.sourceforge.net\findbugs" /> <property name="findbugs.bugReport" location="bcel-fb.xml" /> <target name="findbugs-viewer" depends="jar"> <findbugs-viewer home="${findbugs.home}" look="native" loadbugs="${findbugs.bugReport}"/> </target> Created on March 21, 2006, 12:57 PM
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class edu.umd.cs.findbugs.anttask.AbstractFindBugsTask
AbstractFindBugsTask.SystemProperty
-
-
Field Summary
Fields Modifier and Type Field Description private java.io.Fileloadbugsprivate java.lang.Stringlookprivate static longNO_TIMEOUTprivate java.io.FileprojectFile-
Fields inherited from class edu.umd.cs.findbugs.anttask.AbstractFindBugsTask
DEFAULT_TIMEOUT, errorProperty, execResultProperty, FINDBUGS_JAR, RESULT_PROPERTY_SUFFIX
-
-
Constructor Summary
Constructors Constructor Description FindBugsViewerTask()Creates a new instance of FindBugsViewerTask
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidbeforeExecuteJavaProcess()protected voidconfigureFindbugsEngine()voidsetLoadbugs(java.io.File loadbugs)Sets the file that contains the XML output of a findbugs report.voidsetLook(java.lang.String look)Set look.voidsetProjectFile(java.io.File projectFile)Set the project file-
Methods inherited from class edu.umd.cs.findbugs.anttask.AbstractFindBugsTask
addArg, afterExecuteJavaProcess, checkParameters, createClasspath, createFindbugsEngine, createPluginList, createSystemProperty, execute, getDebug, getFindbugsEngine, setClasspath, setClasspathRef, setDebug, setErrorProperty, setFailOnError, setHome, setInputString, setJvm, setJvmargs, setPluginList, setPluginListRef, setTimeout
-
Methods inherited from class org.apache.tools.ant.Task
bindToOwner, getOwningTarget, getRuntimeConfigurableWrapper, getTaskName, getTaskType, getWrapper, handleErrorFlush, handleErrorOutput, handleFlush, handleInput, handleOutput, init, isInvalid, log, log, log, log, maybeConfigure, perform, reconfigure, setOwningTarget, setRuntimeConfigurableWrapper, setTaskName, setTaskType
-
-
-
-
Field Detail
-
NO_TIMEOUT
private static final long NO_TIMEOUT
- See Also:
- Constant Field Values
-
projectFile
private java.io.File projectFile
-
loadbugs
private java.io.File loadbugs
-
look
private java.lang.String look
-
-
Method Detail
-
setLoadbugs
public void setLoadbugs(java.io.File loadbugs)
Sets the file that contains the XML output of a findbugs report.- Parameters:
loadbugs- XML output from a findbugs session
-
setProjectFile
public void setProjectFile(java.io.File projectFile)
Set the project file- Parameters:
projectFile- project file
-
setLook
public void setLook(java.lang.String look)
Set look. One of "native", "gtk" or "plastic"- Parameters:
look- One of "native", "gtk" or "plastic
-
configureFindbugsEngine
protected void configureFindbugsEngine()
- Specified by:
configureFindbugsEnginein classAbstractFindBugsTask
-
beforeExecuteJavaProcess
protected void beforeExecuteJavaProcess()
- Specified by:
beforeExecuteJavaProcessin classAbstractFindBugsTask
-
-