Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,6 @@ public class CheckResultDialog extends Dialog {
private Shell shell;
private final PropsUi props;

private Color red;
private Color yellow;

private boolean showSuccessfulResults = false;

private String transformName;
Expand All @@ -82,8 +79,9 @@ public String open() {
Shell parent = getParent();
Display display = parent.getDisplay();

red = display.getSystemColor(SWT.COLOR_RED);
yellow = display.getSystemColor(SWT.COLOR_YELLOW);
// Show successful results by default when there are no errors
showSuccessfulResults =
remarks.stream().noneMatch(cr -> cr.getType() == ICheckResult.TYPE_RESULT_ERROR);

shell = new Shell(parent, SWT.DIALOG_TRIM | SWT.RESIZE | SWT.MAX);
PropsUi.setLook(shell);
Expand Down Expand Up @@ -115,6 +113,7 @@ public String open() {

wNoOK = new Button(shell, SWT.CHECK);
wNoOK.setText(STRING_SHOW_SUCESSFUL);
wNoOK.setSelection(showSuccessfulResults);
PropsUi.setLook(wNoOK);
FormData fd = new FormData();
fd.left = new FormAttachment(0, 0);
Expand Down Expand Up @@ -220,10 +219,10 @@ public void getData() {
Color col = null;
switch (cr.getType()) {
case ICheckResult.TYPE_RESULT_ERROR:
col = red;
col = GuiResource.getInstance().getColorLightRed();
break;
case ICheckResult.TYPE_RESULT_WARNING:
col = yellow;
col = GuiResource.getInstance().getColorLight();
break;
default:
break;
Expand Down
Loading