private static final Comparator<ITimeGraphEntry>[] COLUMN_COMPARATORS;
+ private static final int INITIAL_SORT_COLUMN_INDEX = 3;
+
static {
ImmutableList.Builder<Comparator<ITimeGraphEntry>> builder = ImmutableList.builder();
builder.add(ControlFlowColumnComparators.PROCESS_NAME_COLUMN_COMPARATOR)
*/
public ControlFlowView() {
super(ID, new ControlFlowPresentationProvider());
- setTreeColumns(COLUMN_NAMES, COLUMN_COMPARATORS, 3);
+ setTreeColumns(COLUMN_NAMES, COLUMN_COMPARATORS, INITIAL_SORT_COLUMN_INDEX);
setTreeLabelProvider(new ControlFlowTreeLabelProvider());
setFilterColumns(FILTER_COLUMN_NAMES);
setFilterLabelProvider(new ControlFlowFilterLabelProvider());
*/
public final class ControlFlowColumnComparators {
+ /**
+ * Default constructor
+ */
+ private ControlFlowColumnComparators() {}
+
/**
* Process Name comparator. This compares first the trace, then the process name, then the
* birth time, then the TID finally the parent TID.
*/
- public static ITimeGraphEntryComparator PROCESS_NAME_COLUMN_COMPARATOR = new ITimeGraphEntryComparator() {
+ public static final ITimeGraphEntryComparator PROCESS_NAME_COLUMN_COMPARATOR = new ITimeGraphEntryComparator() {
private final List<Comparator<ITimeGraphEntry>> SECONDARY_COMPARATORS = init();
private int fDirection = SWT.DOWN;
* Process TID comparator. This compares first the trace, then the process TID, then the
* birth time, then the process name finally the parent TID.
*/
- public static ITimeGraphEntryComparator TID_COLUMN_COMPARATOR = new ITimeGraphEntryComparator() {
+ public static final ITimeGraphEntryComparator TID_COLUMN_COMPARATOR = new ITimeGraphEntryComparator() {
private final List<Comparator<ITimeGraphEntry>> SECONDARY_COMPARATORS = init();
private int fDirection = SWT.DOWN;
* Process PTID comparator. This compares first the trace, then the process
* parent TID, then the birth time, then the process name finally the TID.
*/
- public static ITimeGraphEntryComparator PTID_COLUMN_COMPARATOR = new ITimeGraphEntryComparator() {
+ public static final ITimeGraphEntryComparator PTID_COLUMN_COMPARATOR = new ITimeGraphEntryComparator() {
private final List<Comparator<ITimeGraphEntry>> SECONDARY_COMPARATORS = init();
private int fDirection = SWT.DOWN;
* Process birth time comparator. This compares first the trace, then the
* birth time, then the process name, then the TID finally the parent TID.
*/
- public static ITimeGraphEntryComparator BIRTH_TIME_COLUMN_COMPARATOR = new ITimeGraphEntryComparator() {
+ public static final ITimeGraphEntryComparator BIRTH_TIME_COLUMN_COMPARATOR = new ITimeGraphEntryComparator() {
private final List<Comparator<ITimeGraphEntry>> SECONDARY_COMPARATORS = init();
private int fDirection = SWT.DOWN;
* time, the process name, the process TID and finally the process's parent
* TID.
*/
- public static ITimeGraphEntryComparator TRACE_COLUMN_COMPARATOR = new ITimeGraphEntryComparator() {
+ public static final ITimeGraphEntryComparator TRACE_COLUMN_COMPARATOR = new ITimeGraphEntryComparator() {
private final List<Comparator<ITimeGraphEntry>> SECONDARY_COMPARATORS = init();
private int fDirection = SWT.DOWN;