public class ReporterSettings
extends java.lang.Object
implements java.io.Serializable
The int array should consist of 6 elements specifying the grouping and sorting prefferences.
When filling the array use the constants GROUP_BY_FIELD
, SORT_GROUPS_BY_FIELD
, SORT_MARKERS_BY_FIRST
,
SORT_MARKERS_BY_SECOND
, SORT_MARKERS_BY_THIRD
, and SORT_MARKERS_BY_FOURTH
to specify the cell of the
array and set it with one of the constants DEFAULT
, GROUP_BY_FILE
, GROUP_BY_TYPE
, SORT_BY_SEVERITY
,
SORT_BY_MESSAGE
, SORT_BY_LOCATION
, SORT_BY_MARKER_TYPE
, SORT_BY_FILE_NAME
, SORT_BY_FILE_TYPE
.
The boolean array should consist of 7 elements specifying what should be shown in the summary.
When filling the array use the constants SHOW_SEVERITY_FIELD
, SHOW_NUM_OF_TEXT_AND_OBJECT_FILES
,
SHOW_NUM_OF_FILES
, SHOW_NUM_OF_TYPES
, SHOW_NUM_OF_MARKERS_PER_FILES
, SHOW_NUM_OF_MARKERS_PER_TYPE
,
and SHOW_TOTAL_NUM_OF_MARKERS
to specify the cell of the array and set it with true or false
depending on whether you want to show the specific element in the summary.
The HashSet should contain all the problem marker types that are to be excluded from the report. The marker types are to be specified by
their unique identifier. For example: to exclude the Java Problem Marker, include in the set the String "org.eclipse.jdt.core.marker".
To display all marker types in the report, pass null to the constructor instead of a HashSet.
The class is Serializable so that it can be saved to disk by ReporterSettingsFrame
and read by
.Reporter
Modifier and Type | Field and Description |
---|---|
static int |
DEFAULT
Unspecified grouping or no sorting.
|
static int |
GROUP_BY_FIELD
Specifies the cell in the int array that controls whether markers are to be grouped by file or marker type.
|
static int |
GROUP_BY_FILE
Specifies to group each marker by the file it is from.
|
static int |
GROUP_BY_TYPE
Specifies to group each marker by its marker type.
|
static int |
SHOW_NUM_OF_FILES
Specifies the cell in the boolean array that controls whether or not to display the total number of files.
|
static int |
SHOW_NUM_OF_MARKERS_PER_FILES
Specifies the cell in the boolean array that controls whether or not to display the number of markers for each
individual file.
|
static int |
SHOW_NUM_OF_MARKERS_PER_TYPE
Specifies the cell in the boolean array that controls whether or not to display the number of markers for each
marker type.
|
static int |
SHOW_NUM_OF_TEXT_AND_OBJECT_FILES
Specifies the cell in the boolean array that controls whether or not to display the total number of aadl files
and the total number of aaxl files.
|
static int |
SHOW_NUM_OF_TYPES
Specifies the cell in the boolean array that controls whether or not to display the total number of marker types.
|
static int |
SHOW_SEVERITY_FIELD
Specifies the cell in the boolean array that controls whether or not to display the total number of errors,
warinings, and info.
|
static int |
SHOW_TOTAL_NUM_OF_MARKERS
Specifies the cell in the boolean array that controls whether or not to display the total number of markers in
the report.
|
static int |
SORT_BY_FILE_NAME
Specifies to sort the groups of markers or the markers in each group by the file that the marker is assosiated with.
|
static int |
SORT_BY_FILE_TYPE
Specifies to sort the groups of markers by file type(.aadl or .aaxl).
|
static int |
SORT_BY_LOCATION
Specifies to sort the markers in each group by location.
|
static int |
SORT_BY_MARKER_TYPE
Specifies to sort the markers in each group by marker type.
|
static int |
SORT_BY_MESSAGE
Specifies to sort the markers in each group by message.
|
static int |
SORT_BY_SEVERITY
Specifies to sort the markers in each group by severity.
|
static int |
SORT_GROUPS_BY_FIELD
Specifies the cell in the int array that controls how groups are to be sorted.
|
static int |
SORT_MARKERS_BY_FIRST
Specifies the cell in the int array that controls how markers are to be sorted.
|
static int |
SORT_MARKERS_BY_FOURTH
Specifies the cell in the int array that controls how markers are to be sorted.
|
static int |
SORT_MARKERS_BY_SECOND
Specifies the cell in the int array that controls how markers are to be sorted.
|
static int |
SORT_MARKERS_BY_THIRD
Specifies the cell in the int array that controls how markers are to be sorted.
|
Constructor and Description |
---|
ReporterSettings()
Creates a new
ReporterSettings object with the default settings. |
ReporterSettings(int[] groupByAndSortBy,
boolean[] showInSummary,
java.util.HashSet problemMarkersToExclude)
Creates a new
ReporterSettings object with custom settings specified by the two arrays and the HashSet. |
Modifier and Type | Method and Description |
---|---|
int |
getGroupByAndSortBy(int field)
Gets the grouping or sorting setting for the field specified.
|
java.util.HashSet |
getProblemMarkersToExclude()
Gets all the unique identifiers of problem markers to exclude from the report.
|
boolean |
getShowInSummary(int field)
Gets the summary setting for the field specified.
|
boolean |
showSummary()
Determines whether or not to show a summary by searching for true elements in the boolean array.
|
public static final int DEFAULT
GROUP_BY_FIELD
is GROUP_BY_FILES
.public static final int GROUP_BY_FILE
GROUP_BY_FIELD
cell in
the int array.public static final int GROUP_BY_TYPE
GROUP_BY_FIELD
cell in the
int array.public static final int SORT_BY_SEVERITY
SORT_MARKERS_BY_FIRST
through
SORT_MARKERS_BY_FOURTH
cells in the int array.public static final int SORT_BY_MESSAGE
SORT_MARKERS_BY_FIRST
through
SORT_MARKERS_BY_FOURTH
cells in the int array.public static final int SORT_BY_LOCATION
SORT_MARKERS_BY_FIRST
through
SORT_MARKERS_BY_FOURTH
cells in the int array.public static final int SORT_BY_MARKER_TYPE
SORT_MARKERS_BY_FIRST
through
SORT_MARKERS_BY_FOURTH
cell in the int array. This value should only be used when grouping markers by file.public static final int SORT_BY_FILE_NAME
SORT_GROUPS_BY_FIELD
when grouping by file. Also used as a value for SORT_MARKERS_BY_FIRST
through SORT_MARKERS_BY_FOURTH
when grouping by marker type.public static final int SORT_BY_FILE_TYPE
SORT_GROUPS_BY_FIELD
when grouping by file.public static final int GROUP_BY_FIELD
GROUP_BY_FILE
or GROUP_BY_TYPE
.public static final int SORT_GROUPS_BY_FIELD
SORT_BY_FILE_NAME
or SORT_BY_FILE_TYPE
. When grouping by marker type, the value of this cell has no affect.public static final int SORT_MARKERS_BY_FIRST
DEFAULT
,
SORT_BY_SEVERITY
, SORT_BY_MESSAGE
, and SORT_BY_LOCATION
. When grouping by file, SORT_BY_MARKER_TYPE
can be
used and when grouping by marker type, SORT_BY_FILE_NAME
can be used.public static final int SORT_MARKERS_BY_SECOND
DEFAULT
,
SORT_BY_SEVERITY
, SORT_BY_MESSAGE
, and SORT_BY_LOCATION
. When grouping by file, SORT_BY_MARKER_TYPE
can be
used and when grouping by marker type, SORT_BY_FILE_NAME
can be used.public static final int SORT_MARKERS_BY_THIRD
DEFAULT
,
SORT_BY_SEVERITY
, SORT_BY_MESSAGE
, and SORT_BY_LOCATION
. When grouping by file, SORT_BY_MARKER_TYPE
can be
used and when grouping by marker type, SORT_BY_FILE_NAME
can be used.public static final int SORT_MARKERS_BY_FOURTH
DEFAULT
,
SORT_BY_SEVERITY
, SORT_BY_MESSAGE
, and SORT_BY_LOCATION
. When grouping by file, SORT_BY_MARKER_TYPE
can be
used and when grouping by marker type, SORT_BY_FILE_NAME
can be used.public static final int SHOW_SEVERITY_FIELD
public static final int SHOW_NUM_OF_TEXT_AND_OBJECT_FILES
public static final int SHOW_NUM_OF_FILES
public static final int SHOW_NUM_OF_TYPES
public static final int SHOW_NUM_OF_MARKERS_PER_FILES
public static final int SHOW_NUM_OF_MARKERS_PER_TYPE
public static final int SHOW_TOTAL_NUM_OF_MARKERS
public ReporterSettings()
ReporterSettings
object with the default settings.public ReporterSettings(int[] groupByAndSortBy, boolean[] showInSummary, java.util.HashSet problemMarkersToExclude)
ReporterSettings
object with custom settings specified by the two arrays and the HashSet.groupByAndSortBy
- 6 elements specifying how the markers should be grouped by, how the
groups should be sorted, and how the markers should be sorted.showInSummary
- 7 elements specifying what should be shown in the report's summary.problemMarkersToExclude
- Set of Strings. Unique identifiers of the problem markers to exclude in the report.
For example: to exclude the Java Problem, include the String "org.eclipse.jdt.core.problem" in the set.
To include all problem markers in the report, pass null to this constructor.public int getGroupByAndSortBy(int field)
field
- Specifies the element in the int array. Use GROUP_BY_FIELD
, SORT_GROUPS_BY_FIELD
,
SORT_MARKERS_BY_FIRST
, SORT_MARKERS_BY_SECOND
, SORT_MARKERS_BY_THIRD
, or SORT_MARKERS_BY_FOURTH
.DEFAULT
,
GROUP_BY_FILE
, GROUP_BY_TYPE
, SORT_BY_SEVERITY
, SORT_BY_MESSAGE
, SORT_BY_LOCATION
, SORT_BY_MARKER_TYPE
,
SORT_BY_FILE_NAME
, or SORT_BY_FILE_TYPE
.public boolean getShowInSummary(int field)
field
- Specifies the element in the boolean array. Use SHOW_SEVERITY_FIELD
, SHOW_NUM_OF_TEXT_AND_OBJECT_FILES
,
SHOW_NUM_OF_FILES
, SHOW_NUM_OF_TYPES
, SHOW_NUM_OF_MARKERS_PER_FILES
, SHOW_NUM_OF_MARKERS_PER_TYPE
, or
SHOW_TOTAL_NUM_OF_MARKERS
.public boolean showSummary()
public java.util.HashSet getProblemMarkersToExclude()