public class UserPreferences
extends java.lang.Object
implements java.lang.Cloneable
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
EFFORT_DEFAULT |
static java.lang.String |
EFFORT_MAX |
static java.lang.String |
EFFORT_MIN |
static java.lang.String |
KEY_EXCLUDE_BUGS
Key prefix for custom filters, full key consists of a prefix + filter index starting with 0
|
static java.lang.String |
KEY_EXCLUDE_FILTER
Key prefix for custom filters, full key consists of a prefix + filter index starting with 0
|
static java.lang.String |
KEY_INCLUDE_FILTER
Key prefix for custom filters, full key consists of a prefix + filter index starting with 0
|
static java.lang.String |
KEY_PLUGIN
Key prefix for custom plugins, full key consists of a prefix + plugin index starting with 0
|
Modifier and Type | Method and Description |
---|---|
UserPreferences |
clone() |
static UserPreferences |
createDefaultUserPreferences()
Create default UserPreferences.
|
void |
enableAllDetectors(boolean enable)
Enable or disable all known Detectors.
|
void |
enableDetector(DetectorFactory factory,
boolean enable)
Set the enabled/disabled status of given Detector.
|
boolean |
equals(java.lang.Object obj) |
AnalysisFeatureSetting[] |
getAnalysisFeatureSettings()
Returns the effort level as an array of feature settings as expected by
FindBugs.
|
java.lang.String |
getCloudId() |
java.util.Map<java.lang.String,java.lang.Boolean> |
getCustomPlugins()
Additional plugins which could be used by
IFindBugsEngine (if
enabled), or which shouldn't be used (if disabled). |
java.util.Set<java.lang.String> |
getCustomPlugins(boolean enabled)
Additional plugins which could be used or shouldn't be used (depending on
given argument) by
IFindBugsEngine . |
java.lang.String |
getEffort() |
java.util.Map<java.lang.String,java.lang.Boolean> |
getExcludeBugsFiles() |
java.util.Map<java.lang.String,java.lang.Boolean> |
getExcludeFilterFiles() |
ProjectFilterSettings |
getFilterSettings()
Get ProjectFilterSettings.
|
java.util.Map<java.lang.String,java.lang.Boolean> |
getIncludeFilterFiles() |
java.util.List<java.lang.String> |
getRecentProjects()
Get List of recent project filenames.
|
int |
getUserDetectorThreshold()
Get the detector threshold (min severity to report a warning).
|
int |
hashCode() |
boolean |
isDetectorEnabled(DetectorFactory factory)
Get the enabled/disabled status of given Detector.
|
boolean |
isRunAtFullBuild()
Get the enabled/disabled status of runAtFullBuild
|
void |
read()
Read persistent global UserPreferences from file in the user's home
directory.
|
void |
read(java.io.InputStream in)
Read user preferences from given input stream.
|
void |
removeProject(java.lang.String projectName)
Remove project filename from the recently-used project list.
|
void |
setCloudId(java.lang.String cloudId) |
void |
setCustomPlugins(java.util.Map<java.lang.String,java.lang.Boolean> customPlugins)
Additional plugins which could be used by
IFindBugsEngine (if
enabled), or which shouldn't be used (if disabled). |
void |
setEffort(java.lang.String effort) |
void |
setExcludeBugsFiles(java.util.Map<java.lang.String,java.lang.Boolean> excludeBugsFiles) |
void |
setExcludeFilterFiles(java.util.Map<java.lang.String,java.lang.Boolean> excludeFilterFiles) |
void |
setIncludeFilterFiles(java.util.Map<java.lang.String,java.lang.Boolean> includeFilterFiles) |
void |
setProjectFilterSettings(ProjectFilterSettings filterSettings)
Set the ProjectFilterSettings.
|
void |
setRunAtFullBuild(boolean enable)
Set the enabled/disabled status of running findbugs automatically for
full builds.
|
void |
setUserDetectorThreshold(int threshold)
Set the detector threshold (min severity to report a warning).
|
void |
setUserDetectorThreshold(java.lang.String threshold)
Set the detector threshold (min severity to report a warning).
|
void |
useProject(java.lang.String projectName)
Add given project filename to the front of the recently-used project
list.
|
void |
write()
Write persistent global UserPreferences to file in user's home directory.
|
void |
write(java.io.OutputStream out)
Write UserPreferences to given OutputStream.
|
public static final java.lang.String EFFORT_MIN
public static final java.lang.String EFFORT_DEFAULT
public static final java.lang.String EFFORT_MAX
public static final java.lang.String KEY_PLUGIN
public static final java.lang.String KEY_INCLUDE_FILTER
public static final java.lang.String KEY_EXCLUDE_FILTER
public static final java.lang.String KEY_EXCLUDE_BUGS
public static UserPreferences createDefaultUserPreferences()
public void read()
public void read(@WillClose java.io.InputStream in) throws java.io.IOException
in
- the InputStreamjava.io.IOException
public void write()
public void write(@WillClose java.io.OutputStream out) throws java.io.IOException
out
- the OutputStreamjava.io.IOException
public java.util.List<java.lang.String> getRecentProjects()
public void useProject(java.lang.String projectName)
projectName
- project filenamepublic void removeProject(java.lang.String projectName)
projectName
- project filenamepublic void enableDetector(DetectorFactory factory, boolean enable)
factory
- the DetectorFactory for the Detector to be enabled/disabledenable
- true if the Detector should be enabled, false if it should be
Disabledpublic boolean isDetectorEnabled(DetectorFactory factory)
factory
- the DetectorFactory of the Detectorpublic void enableAllDetectors(boolean enable)
enable
- true if all detectors should be enabled, false if they should
all be disabledpublic void setProjectFilterSettings(ProjectFilterSettings filterSettings)
filterSettings
- the ProjectFilterSettingspublic ProjectFilterSettings getFilterSettings()
public int getUserDetectorThreshold()
public void setUserDetectorThreshold(int threshold)
threshold
- the detector thresholdpublic void setRunAtFullBuild(boolean enable)
enable
- true if running FindBugs at full builds should be enabled,
false if it should be Disabledpublic boolean isRunAtFullBuild()
public void setUserDetectorThreshold(java.lang.String threshold)
threshold
- the detector thresholdpublic boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public UserPreferences clone()
clone
in class java.lang.Object
public java.lang.String getEffort()
public void setEffort(java.lang.String effort)
public java.lang.String getCloudId()
public void setCloudId(java.lang.String cloudId)
cloudId
- The cloudId to set.public java.util.Map<java.lang.String,java.lang.Boolean> getIncludeFilterFiles()
public void setIncludeFilterFiles(java.util.Map<java.lang.String,java.lang.Boolean> includeFilterFiles)
public java.util.Map<java.lang.String,java.lang.Boolean> getExcludeBugsFiles()
public void setExcludeBugsFiles(java.util.Map<java.lang.String,java.lang.Boolean> excludeBugsFiles)
public void setExcludeFilterFiles(java.util.Map<java.lang.String,java.lang.Boolean> excludeFilterFiles)
public java.util.Map<java.lang.String,java.lang.Boolean> getExcludeFilterFiles()
public void setCustomPlugins(java.util.Map<java.lang.String,java.lang.Boolean> customPlugins)
IFindBugsEngine
(if
enabled), or which shouldn't be used (if disabled). If a plugin is not
included in the set, it's enablement depends on it's default settings.customPlugins
- map with additional third party plugin locations (as absolute
paths), never null, but might be emptyPlugin.isCorePlugin()
,
Plugin.isGloballyEnabled()
public java.util.Map<java.lang.String,java.lang.Boolean> getCustomPlugins()
IFindBugsEngine
(if
enabled), or which shouldn't be used (if disabled). If a plugin is not
included in the set, it's enablement depends on it's default settings.Plugin.isCorePlugin()
,
Plugin.isGloballyEnabled()
public java.util.Set<java.lang.String> getCustomPlugins(boolean enabled)
IFindBugsEngine
. If a plugin is not included
in the set, it's enablement depends on it's default settings.Plugin.isCorePlugin()
,
Plugin.isGloballyEnabled()
public AnalysisFeatureSetting[] getAnalysisFeatureSettings()
FindBugs™ is licenced under the LGPL. Copyright © 2006 University of Maryland.