提交 5b309c1d 编写于 作者: E Evgeny Fradkin

#1599 A wizard processing errors are red now in the log.

上级 ff707658
......@@ -20,6 +20,7 @@ package org.jkiss.dbeaver.ui.dialogs.tools;
import org.eclipse.jface.wizard.WizardPage;
import org.eclipse.osgi.util.NLS;
import org.eclipse.swt.SWT;
import org.eclipse.swt.custom.StyleRange;
import org.eclipse.swt.custom.StyledText;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.widgets.Composite;
......@@ -82,10 +83,18 @@ public class DatabaseWizardPageLog extends WizardPage {
public void run() {
synchronized (DatabaseWizardPageLog.this) {
if (!dumpLogText.isDisposed()) {
int caretOffset = dumpLogText.getCaretOffset();
dumpLogText.append(line);
//dumpLogText.append(ContentUtils.getDefaultLineSeparator());
dumpLogText.setCaretOffset(dumpLogText.getCharCount());
dumpLogText.showSelection();
if (error) {
StyleRange style1Range = new StyleRange();
style1Range.start = caretOffset;
style1Range.length = line.length();
style1Range.foreground = dumpLogText.getDisplay().getSystemColor(SWT.COLOR_RED);
dumpLogText.setStyleRange(style1Range);
}
}
}
}
......
......@@ -66,7 +66,7 @@ public class MockDataWizardPageSettings extends AbstractToolWizardPage<MockDataE
this.rowsText = UIUtils.createLabelText(
settingsGroup, "Rows", String.valueOf(mockDataSettings.getRowsNumber()), SWT.BORDER,
new GridData(120, SWT.DEFAULT));
new GridData(110, SWT.DEFAULT));
rowsText.addSelectionListener(changeListener);
rowsText.addVerifyListener(UIUtils.getLongVerifyListener(rowsText));
rowsText.addModifyListener(new ModifyListener() {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册