Commit 75ea76b2 authored by Johannes Roith's avatar Johannes Roith

- Show "no conflicts" (and number of conflicts otherwise) on conflicts view.

- Fix crash due to statistics module.
parent aadaf51b
......@@ -56,6 +56,7 @@ public class CupConflictsView extends FailableView implements ICupEditorPageVisi
private CupTextEditor editor;
private boolean isVisible;
private List<ConflictPanel> conflictPanels;
private Label countConflictsLabel;
private ScrolledComposite scrolled;
private Composite list;
......@@ -354,6 +355,8 @@ public class CupConflictsView extends FailableView implements ICupEditorPageVisi
gl.makeColumnsEqualWidth = true;
list.setLayout(gl);
this.countConflictsLabel = new Label(list, SWT.NONE);
refreshScrolledLayout();
}
......@@ -382,7 +385,10 @@ public class CupConflictsView extends FailableView implements ICupEditorPageVisi
conflictPanels.add(new ConflictPanel(list, SWT.NONE));
}
}
System.out.println("conflictPanels size: " + this.conflictPanels.size());
if (number == 0)
this.countConflictsLabel.setText("There are no conflicts! :-)");
else
this.countConflictsLabel.setText("Detected " + number + " conflicts:");
}
private void refreshScrolledLayout() {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment