diff --git a/java_console/io/io.iml b/java_console/io/io.iml index 7f5755f081..215de8071e 100644 --- a/java_console/io/io.iml +++ b/java_console/io/io.iml @@ -16,5 +16,6 @@ + \ No newline at end of file diff --git a/java_console/shared_io/src/main/java/com/rusefi/rusEFIVersion.java b/java_console/shared_io/src/main/java/com/rusefi/rusEFIVersion.java index e9740248c7..8c6123343f 100644 --- a/java_console/shared_io/src/main/java/com/rusefi/rusEFIVersion.java +++ b/java_console/shared_io/src/main/java/com/rusefi/rusEFIVersion.java @@ -6,7 +6,7 @@ import java.net.URL; import java.util.concurrent.atomic.AtomicReference; public class rusEFIVersion { - public static final int CONSOLE_VERSION = 20210925; + public static final int CONSOLE_VERSION = 20210926; public static AtomicReference firmwareVersion = new AtomicReference<>("N/A"); public static long classBuildTimeMillis() { diff --git a/java_console/ui/src/main/java/com/rusefi/ui/StatusWindow.java b/java_console/ui/src/main/java/com/rusefi/ui/StatusWindow.java index 1d8da31df2..c96e87c720 100644 --- a/java_console/ui/src/main/java/com/rusefi/ui/StatusWindow.java +++ b/java_console/ui/src/main/java/com/rusefi/ui/StatusWindow.java @@ -1,5 +1,6 @@ package com.rusefi.ui; +import com.rusefi.FileLog; import com.rusefi.ui.util.FrameHelper; import com.rusefi.ui.util.UiUtils; import org.jetbrains.annotations.NotNull; @@ -13,10 +14,10 @@ import java.awt.*; */ public class StatusWindow implements StatusConsumer { // todo: extract driver from console bundle? find a separate driver bundle? - private final JTextArea log = new JTextArea(); + private final JTextArea logTextArea = new JTextArea(); private final JPanel content = new JPanel(new BorderLayout()); private final JLabel bottomStatusLabel = new JLabel(); - private final JScrollPane messagesScroll = new JScrollPane(log, JScrollPane.VERTICAL_SCROLLBAR_ALWAYS, JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED) { + private final JScrollPane messagesScroll = new JScrollPane(logTextArea, JScrollPane.VERTICAL_SCROLLBAR_ALWAYS, JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED) { @Override public Dimension getPreferredSize() { return new Dimension(400, 400); @@ -26,7 +27,7 @@ public class StatusWindow implements StatusConsumer { protected final FrameHelper frameHelper = new FrameHelper(); public StatusWindow() { - log.setLineWrap(true); + logTextArea.setLineWrap(true); content.add(messagesScroll, BorderLayout.CENTER); content.add(bottomStatusLabel, BorderLayout.SOUTH); } @@ -48,17 +49,15 @@ public class StatusWindow implements StatusConsumer { frameHelper.getFrame().setTitle(title); frameHelper.showFrame(content, false); UiUtils.centerWindow(frameHelper.getFrame()); - log.setText(""); // let's remove stuff from previous invocation + logTextArea.setText(""); // let's remove stuff from previous invocation } @Override public void appendMsg(final String s) { - SwingUtilities.invokeLater(new Runnable() { - @Override - public void run() { - log.append(s + "\r\n"); - UiUtils.trueLayout(log); - } + SwingUtilities.invokeLater(() -> { + FileLog.MAIN.logLine(s); + logTextArea.append(s + "\r\n"); + UiUtils.trueLayout(logTextArea); }); }