diff --git a/CHANGELOG.md b/CHANGELOG.md index d0936001ed5..97bf1f7b1b6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -18,6 +18,7 @@ We refer to [GitHub issues](https://github.com/JabRef/jabref/issues) by using `# - Redesigned about dialog. - Redesigned key bindings dialog. - Redesigned journal abbreviations dialog. + - Redesigned error console. ### Changed - Implemented [#825](https://github.com/JabRef/jabref/issues/825): Search Bar across all bib files instead each having its own diff --git a/src/main/java/net/sf/jabref/gui/FXAlert.java b/src/main/java/net/sf/jabref/gui/FXAlert.java index d8b00d88980..e44d9544195 100644 --- a/src/main/java/net/sf/jabref/gui/FXAlert.java +++ b/src/main/java/net/sf/jabref/gui/FXAlert.java @@ -23,6 +23,7 @@ import javafx.fxml.FXMLLoader; import javafx.scene.control.Alert; import javafx.scene.image.Image; +import javafx.stage.Modality; import javafx.stage.Stage; import net.sf.jabref.Globals; @@ -71,30 +72,43 @@ public void windowGainedFocus(WindowEvent e) { } }; + public FXAlert(AlertType type, String title, Image image, boolean isModal) { + this(type, title, isModal); + setDialogIcon(image); + } public FXAlert(AlertType type, String title, Image image) { - this(type, title); + this(type, title, true); setDialogIcon(image); } + public FXAlert(AlertType type, String title, boolean isModal) { + this(type, isModal); + setTitle(title); + } + public FXAlert(AlertType type, String title) { this(type); setTitle(title); } - public FXAlert(AlertType type) { + public FXAlert(AlertType type, boolean isModal) { super(type); Image image = new Image(IconTheme.getIconUrl("jabrefIcon48").toString()); setDialogIcon(image); Stage fxDialogWindow = getDialogWindow(); - + fxDialogWindow.setOnCloseRequest(evt -> this.close()); + if (isModal) { + initModality(Modality.APPLICATION_MODAL); + } else { + initModality(Modality.NONE); + } fxDialogWindow.setOnShown(evt -> { - setSwingWindowsEnabledAndFocusable(false); + setSwingWindowsEnabledAndFocusable(!isModal); setLocationRelativeToMainWindow(); }); - fxDialogWindow.setOnHiding(evt -> setSwingWindowsEnabledAndFocusable(true)); fxDialogWindow.setOnCloseRequest(evt -> this.close()); @@ -107,6 +121,10 @@ public FXAlert(AlertType type) { }); } + public FXAlert(AlertType type) { + this(type, true); + } + public void setDialogStyle(String pathToStyleSheet) { getDialogPane().getScene().getStylesheets().add(pathToStyleSheet); } diff --git a/src/main/java/net/sf/jabref/gui/FXDialogs.java b/src/main/java/net/sf/jabref/gui/FXDialogs.java index 25fcec6fd52..f8403e94ab6 100644 --- a/src/main/java/net/sf/jabref/gui/FXDialogs.java +++ b/src/main/java/net/sf/jabref/gui/FXDialogs.java @@ -126,7 +126,7 @@ public static Optional showCustomDialogAndWait(String title, DialogP } private static FXAlert createDialog(AlertType type, String title, String content) { - FXAlert alert = new FXAlert(type, title); + FXAlert alert = new FXAlert(type, title, true); alert.setHeaderText(null); alert.setContentText(content); return alert; diff --git a/src/main/java/net/sf/jabref/gui/JabRefFrame.java b/src/main/java/net/sf/jabref/gui/JabRefFrame.java index eb2e88c46ea..4f97ced3147 100644 --- a/src/main/java/net/sf/jabref/gui/JabRefFrame.java +++ b/src/main/java/net/sf/jabref/gui/JabRefFrame.java @@ -114,7 +114,6 @@ import net.sf.jabref.logic.importer.OutputPrinter; import net.sf.jabref.logic.importer.ParserResult; import net.sf.jabref.logic.l10n.Localization; -import net.sf.jabref.logic.logging.GuiAppender; import net.sf.jabref.logic.search.SearchQuery; import net.sf.jabref.logic.undo.AddUndoableActionEvent; import net.sf.jabref.logic.undo.UndoChangeEvent; @@ -438,7 +437,7 @@ public void actionPerformed(ActionEvent e) { private final AbstractAction manageJournals = new ManageJournalsAction(); private final AbstractAction databaseProperties = new DatabasePropertiesAction(); private final AbstractAction bibtexKeyPattern = new BibtexKeyPatternAction(); - private final AbstractAction errorConsole = new ErrorConsoleAction(this, Globals.getStreamEavesdropper(), GuiAppender.CACHE); + private final AbstractAction errorConsole = new ErrorConsoleAction(); private final AbstractAction cleanupEntries = new GeneralAction(Actions.CLEANUP, Localization.menuTitle("Cleanup entries") + ELLIPSES, diff --git a/src/main/java/net/sf/jabref/gui/actions/ErrorConsoleAction.java b/src/main/java/net/sf/jabref/gui/actions/ErrorConsoleAction.java index f0ae0568511..b91151c1cc1 100644 --- a/src/main/java/net/sf/jabref/gui/actions/ErrorConsoleAction.java +++ b/src/main/java/net/sf/jabref/gui/actions/ErrorConsoleAction.java @@ -1,19 +1,14 @@ package net.sf.jabref.gui.actions; -import java.awt.Dimension; import java.awt.event.ActionEvent; import javax.swing.AbstractAction; import javax.swing.Action; -import javax.swing.JFrame; -import javax.swing.JOptionPane; -import javax.swing.JScrollPane; -import javax.swing.JTabbedPane; -import javax.swing.JTextArea; -import net.sf.jabref.logic.error.StreamEavesdropper; +import javafx.application.Platform; + +import net.sf.jabref.gui.errorconsole.ErrorConsoleView; import net.sf.jabref.logic.l10n.Localization; -import net.sf.jabref.logic.logging.Cache; /** * Such an error console can be @@ -24,57 +19,14 @@ */ public class ErrorConsoleAction extends AbstractAction { - private final JFrame frame; - private final StreamEavesdropper streamEavesdropper; - private final Cache cache; - - public ErrorConsoleAction(JFrame frame, StreamEavesdropper streamEavesdropper, Cache cache) { - super(Localization.menuTitle("Show error console")); - this.streamEavesdropper = streamEavesdropper; - this.cache = cache; + public ErrorConsoleAction() { + super(Localization.menuTitle("View event log")); putValue(Action.SHORT_DESCRIPTION, Localization.lang("Display all error messages")); - this.frame = frame; } @Override public void actionPerformed(ActionEvent e) { - displayErrorConsole(frame); - } - - private void displayErrorConsole(JFrame parent) { - JTabbedPane tabbed = new JTabbedPane(); - - addTextArea(tabbed, Localization.lang("Log"), cache.get()); - addTextArea(tabbed, Localization.lang("Exceptions"), streamEavesdropper.getErrorMessages(), - Localization.lang("No exceptions have occurred.")); - addTextArea(tabbed, Localization.lang("Output"), streamEavesdropper.getOutput()); - - tabbed.setPreferredSize(new Dimension(500, 500)); - - JOptionPane.showMessageDialog(parent, tabbed, - Localization.lang("Program output"), JOptionPane.ERROR_MESSAGE); + Platform.runLater(() -> new ErrorConsoleView().show()); } - /** - * @param tabbed the tabbed pane to add the tab to - * @param output the text to display in the tab - * @param ifEmpty Text to output if textbox is emtpy. may be null - */ - private static void addTextArea(JTabbedPane tabbed, String title, String output, String ifEmpty) { - JTextArea ta = new JTextArea(output); - ta.setEditable(false); - if ((ifEmpty != null) && (ta.getText().isEmpty())) { - ta.setText(ifEmpty); - } - JScrollPane sp = new JScrollPane(ta); - tabbed.addTab(title, sp); - } - - /** - * @param tabbed the tabbed pane to add the tab to - * @param output the text to display in the tab - */ - private static void addTextArea(JTabbedPane tabbed, String title, String output) { - addTextArea(tabbed, title, output, null); - } } diff --git a/src/main/java/net/sf/jabref/gui/errorconsole/ErrorConsoleView.java b/src/main/java/net/sf/jabref/gui/errorconsole/ErrorConsoleView.java new file mode 100644 index 00000000000..98ba578dc35 --- /dev/null +++ b/src/main/java/net/sf/jabref/gui/errorconsole/ErrorConsoleView.java @@ -0,0 +1,130 @@ +/* Copyright (C) 2016 JabRef contributors. + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along + with this program; if not, write to the Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. +*/ +package net.sf.jabref.gui.errorconsole; + +import javafx.fxml.FXML; +import javafx.scene.control.Alert.AlertType; +import javafx.scene.control.Button; +import javafx.scene.control.DialogPane; +import javafx.scene.control.Label; +import javafx.scene.control.ListCell; +import javafx.scene.control.ListView; +import javafx.stage.Stage; +import javafx.util.Callback; + +import net.sf.jabref.gui.FXAlert; +import net.sf.jabref.gui.IconTheme; +import net.sf.jabref.logic.l10n.Localization; + +import com.airhacks.afterburner.views.FXMLView; +import org.apache.logging.log4j.Level; +import org.apache.logging.log4j.core.LogEvent; + +public class ErrorConsoleView extends FXMLView { + + private final ErrorConsoleViewModel errorViewModel = new ErrorConsoleViewModel(); + + @FXML + private Button closeButton; + @FXML + private Button copyLogButton; + @FXML + private Button createIssueButton; + @FXML + private ListView allMessages; + @FXML + private Label descriptionLabel; + + public ErrorConsoleView() { + super(); + bundle = Localization.getMessages(); + } + + public void show() { + FXAlert errorConsole = new FXAlert(AlertType.ERROR, Localization.lang("Event log"), false); + DialogPane pane = (DialogPane) this.getView(); + errorConsole.setDialogPane(pane); + errorConsole.setResizable(true); + errorConsole.show(); + } + + @FXML + private void initialize() { + listViewStyle(); + allMessages.itemsProperty().bind(errorViewModel.allMessagesDataproperty()); + descriptionLabel.setGraphic(IconTheme.JabRefIcon.CONSOLE.getGraphicNode()); + } + + @FXML + private void copyLogButton() { + errorViewModel.copyLog(); + } + + @FXML + private void createIssueButton() { + errorViewModel.reportIssue(); + } + + @FXML + private void closeErrorDialog() { + Stage stage = (Stage) closeButton.getScene().getWindow(); + stage.close(); + } + + /** + * Style the list view with icon and message color + */ + private void listViewStyle() { + // Handler for listCell appearance (example for exception Cell) + allMessages.setCellFactory( + new Callback, ListCell>() { + @Override + public ListCell call( + ListView listView) { + return new ListCell() { + + @Override + public void updateItem(LogEvent logMessage, boolean empty) { + super.updateItem(logMessage, empty); + if (logMessage != null) { + setText(logMessage.getMessage().toString()); + + Level logLevel = logMessage.getLevel(); + switch (logLevel.getStandardLevel()) { + case ERROR: + getStyleClass().add("exception"); + setGraphic(IconTheme.JabRefIcon.INTEGRITY_FAIL.getGraphicNode()); + break; + case WARN: + getStyleClass().add("output"); + setGraphic(IconTheme.JabRefIcon.INTEGRITY_WARN.getGraphicNode()); + break; + case INFO: + getStyleClass().add("log"); + setGraphic(IconTheme.JabRefIcon.INTEGRITY_INFO.getGraphicNode()); + break; + default: + setText(null); + setGraphic(null); + break; + } + } + } + }; + } + }); + } +} diff --git a/src/main/java/net/sf/jabref/gui/errorconsole/ErrorConsoleViewModel.java b/src/main/java/net/sf/jabref/gui/errorconsole/ErrorConsoleViewModel.java new file mode 100644 index 00000000000..f972d17e3dc --- /dev/null +++ b/src/main/java/net/sf/jabref/gui/errorconsole/ErrorConsoleViewModel.java @@ -0,0 +1,98 @@ +/* Copyright (C) 2016 JabRef contributors. + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along + with this program; if not, write to the Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. +*/ +package net.sf.jabref.gui.errorconsole; + +import java.io.IOException; +import java.net.URISyntaxException; +import java.text.DateFormat; +import java.text.SimpleDateFormat; +import java.util.Date; + +import javafx.beans.property.ListProperty; + +import net.sf.jabref.Globals; +import net.sf.jabref.JabRefGUI; +import net.sf.jabref.gui.ClipBoardManager; +import net.sf.jabref.gui.FXDialogs; +import net.sf.jabref.gui.desktop.JabRefDesktop; +import net.sf.jabref.logic.l10n.Localization; +import net.sf.jabref.logic.logging.LogMessages; +import net.sf.jabref.logic.util.BuildInfo; + +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; +import org.apache.http.client.utils.URIBuilder; +import org.apache.logging.log4j.core.LogEvent; + +public class ErrorConsoleViewModel { + + private static final Log LOGGER = LogFactory.getLog(ErrorConsoleViewModel.class); + private final DateFormat dateFormat = new SimpleDateFormat("yyyyMMddHHmmss"); + private final Date date = new Date(); + private ListProperty allMessagesData = LogMessages.getInstance().messagesProperty(); + + public ListProperty allMessagesDataproperty() { + return this.allMessagesData; + } + + /** + * Handler for get of log messages in listview + * + * @return all messages as String + */ + private String getLogMessagesAsString() { + StringBuilder logMessagesContent = new StringBuilder(); + for (LogEvent message : allMessagesDataproperty()) { + logMessagesContent.append(message.getMessage().getFormattedMessage() + System.lineSeparator()); + } + return logMessagesContent.toString(); + } + + /** + * Handler for copy of Log Entry in clipboard by click of Copy Log Button + */ + public void copyLog() { + new ClipBoardManager().setClipboardContents(getLogMessagesAsString()); + JabRefGUI.getMainFrame().output(Localization.lang("Log copied to clipboard.")); + } + + /** + * Handler for report Issues on GitHub by click of Report Issue Button + */ + public void reportIssue() { + try { + String issueTitle = "Automatic Bug Report-" + dateFormat.format(date); + String issueBody = String.format("JabRef %s%n%s %s %s %nJava %s\n\n", Globals.BUILD_INFO.getVersion(), BuildInfo.OS, + BuildInfo.OS_VERSION, BuildInfo.OS_ARCH, BuildInfo.JAVA_VERSION); + JabRefGUI.getMainFrame().output(Localization.lang("Issue on GitHub successfully reported.")); + FXDialogs.showInformationDialogAndWait(Localization.lang("Issue report successful"), + Localization.lang("Your issue was reported in your browser.") + "\n\n" + + Localization.lang("The log and exception information was copied to your clipboard.") + "\n\n" + + Localization.lang("Please paste this information (with Ctrl+V) in the issue description.")); + URIBuilder uriBuilder = new URIBuilder().setScheme("https").setHost("github.com").setPath("/JabRef/jabref/issues/new") + .setParameter("title", issueTitle).setParameter("body", issueBody); + JabRefDesktop.openBrowser(uriBuilder.build().toString()); + // Format the contents of listview in Issue Description + String issueDetails = ("
\n" + "" + "Detail information:" + "\n```\n" + getLogMessagesAsString() + "\n```\n
"); + new ClipBoardManager().setClipboardContents(issueDetails); + } catch (IOException e) { + LOGGER.error(e); + } catch (URISyntaxException e) { + LOGGER.error(e); + } + + } +} diff --git a/src/main/java/net/sf/jabref/logic/error/StreamEavesdropper.java b/src/main/java/net/sf/jabref/logic/error/StreamEavesdropper.java index 8017f1af5ec..6aa66113d4c 100644 --- a/src/main/java/net/sf/jabref/logic/error/StreamEavesdropper.java +++ b/src/main/java/net/sf/jabref/logic/error/StreamEavesdropper.java @@ -1,8 +1,16 @@ package net.sf.jabref.logic.error; -import java.io.ByteArrayOutputStream; import java.io.PrintStream; +import javafx.application.Platform; + +import net.sf.jabref.logic.logging.LogMessages; + +import org.apache.logging.log4j.Level; +import org.apache.logging.log4j.core.LogEvent; +import org.apache.logging.log4j.core.impl.Log4jLogEvent; +import org.apache.logging.log4j.message.SimpleMessage; + /** * Allows to eavesdrop on an out and an err stream. *

@@ -10,13 +18,15 @@ */ public class StreamEavesdropper { - private final ByteArrayOutputStream errByteStream = new ByteArrayOutputStream(); - private final ByteArrayOutputStream outByteStream = new ByteArrayOutputStream(); - private final PrintStream systemOut; private final PrintStream systemErr; + public StreamEavesdropper(PrintStream systemOut, PrintStream systemErr) { + this.systemOut = systemOut; + this.systemErr = systemErr; + } + public static StreamEavesdropper eavesdropOnSystem() { StreamEavesdropper streamEavesdropper = new StreamEavesdropper(System.out, System.err); System.setOut(streamEavesdropper.getOutStream()); @@ -24,27 +34,50 @@ public static StreamEavesdropper eavesdropOnSystem() { return streamEavesdropper; } - public StreamEavesdropper(PrintStream systemOut, PrintStream systemErr) { - this.systemOut = systemOut; - this.systemErr = systemErr; - } - + /** + * Return a new {@code PrintStream} which also creates a new log event with {@link Level#WARN} for each message and forwards it to the {@link LogMessages} archive. + * + * @return a PrintStream + */ public PrintStream getOutStream() { - PrintStream consoleOut = new PrintStream(outByteStream); - return new TeeStream(consoleOut, systemOut); + return new PrintStream(systemOut) { + @Override + public void write(byte[] buf, int off, int len) { + super.write(buf, off, len); + String message = new String(buf, off, len); + addToLog(message, Level.WARN); + } + }; } + /** + * Return a new {@code PrintStream} which also creates a new log event with {@link Level#ERROR} for each message and forwards it to the {@link LogMessages} archive. + * + * @return a PrintStream + */ public PrintStream getErrStream() { - PrintStream consoleErr = new PrintStream(errByteStream); - return new TeeStream(consoleErr, systemErr); - } - - public String getErrorMessages() { - return errByteStream.toString(); + return new PrintStream(systemErr) { + @Override + public void write(byte[] buf, int off, int len) { + super.write(buf, off, len); + String message = new String(buf, off, len); + addToLog(message, Level.ERROR); + } + }; } - public String getOutput() { - return outByteStream.toString(); + /** + * Creates a new log event with the given parameters and forwards it to the {@link LogMessages} archive. + * + * @param message message of log event + * @param level level of log event + */ + private void addToLog(String message, Level level) { + if (!message.equals(System.lineSeparator())) { + String messageFormat = message.replaceAll(System.lineSeparator(), ""); + LogEvent messageWithLevel = Log4jLogEvent.newBuilder().setMessage(new SimpleMessage(messageFormat)).setLevel(level).build(); + Platform.runLater(() -> LogMessages.getInstance().add(messageWithLevel)); + } } } diff --git a/src/main/java/net/sf/jabref/logic/error/TeeStream.java b/src/main/java/net/sf/jabref/logic/error/TeeStream.java deleted file mode 100644 index a9ded79b08a..00000000000 --- a/src/main/java/net/sf/jabref/logic/error/TeeStream.java +++ /dev/null @@ -1,34 +0,0 @@ -package net.sf.jabref.logic.error; - -import java.io.PrintStream; - -/** - * All writes to this print stream are copied to two print streams - *

- * Is based on the command line tool tee - */ -public class TeeStream extends PrintStream { - - private final PrintStream outStream; - - public TeeStream(PrintStream out1, PrintStream out2) { - super(out1); - this.outStream = out2; - } - - @Override - public void write(byte[] buf, int off, int len) { - try { - super.write(buf, off, len); - outStream.write(buf, off, len); - } catch (Exception ignored) { - // Ignored - } - } - - @Override - public void flush() { - super.flush(); - outStream.flush(); - } -} diff --git a/src/main/java/net/sf/jabref/logic/logging/Cache.java b/src/main/java/net/sf/jabref/logic/logging/Cache.java deleted file mode 100644 index e435390f06b..00000000000 --- a/src/main/java/net/sf/jabref/logic/logging/Cache.java +++ /dev/null @@ -1,62 +0,0 @@ -package net.sf.jabref.logic.logging; - -import java.util.LinkedList; -import java.util.Queue; - -/** - * Enables caching of messages - */ -public class Cache { - - public static final int DEFAULT_CAPACITY = 500; - private final int capacity; - private final Queue queue = new LinkedList<>(); - - private String cache = ""; - private boolean cacheRefreshNeeded = true; - - public Cache() { - this(DEFAULT_CAPACITY); - } - - public Cache(int capacity) { - this.capacity = capacity; - } - - public synchronized String get() { - ensureCacheIsFresh(); - return cache; - } - - private void ensureCacheIsFresh() { - if (cacheRefreshNeeded) { - cache = String.join("", queue); - } - } - - public synchronized void add(String message) { - queue.add(message); - - if (isCapacityExceeded()) { - // if we reached capacity, we switch to the "real" caching method and remove old lines - cacheRefreshNeeded = true; - truncateLog(); - } else { - // if we did not yet reach capacity, we just append the string to the cache - // cache is still up to date - cache = cache + message; - } - } - - private void truncateLog() { - while (isCapacityExceeded()) { - // if log is too large, remove first line - // we need a while loop as the formatter may output more than one line - queue.poll(); - } - } - - private boolean isCapacityExceeded() { - return queue.size() > capacity; - } -} diff --git a/src/main/java/net/sf/jabref/logic/logging/GuiAppender.java b/src/main/java/net/sf/jabref/logic/logging/GuiAppender.java index e0843b04587..3ef09d50d1f 100644 --- a/src/main/java/net/sf/jabref/logic/logging/GuiAppender.java +++ b/src/main/java/net/sf/jabref/logic/logging/GuiAppender.java @@ -1,7 +1,9 @@ package net.sf.jabref.logic.logging; import java.io.Serializable; +import java.util.Arrays; +import org.apache.logging.log4j.Level; import org.apache.logging.log4j.core.Filter; import org.apache.logging.log4j.core.Layout; import org.apache.logging.log4j.core.LogEvent; @@ -10,13 +12,13 @@ import org.apache.logging.log4j.core.config.plugins.PluginAttribute; import org.apache.logging.log4j.core.config.plugins.PluginElement; import org.apache.logging.log4j.core.config.plugins.PluginFactory; +import org.apache.logging.log4j.core.impl.Log4jLogEvent; import org.apache.logging.log4j.core.layout.PatternLayout; +import org.apache.logging.log4j.message.SimpleMessage; @Plugin(name = "GuiAppender", category = "Core", elementType = "appender", printObject = true) public class GuiAppender extends AbstractAppender { - public static final Cache CACHE = new Cache(); - protected GuiAppender(String name, Filter filter, Layout layout) { super(name, filter, layout); } @@ -37,10 +39,26 @@ public static GuiAppender createAppender(@PluginAttribute("name") String name, return new GuiAppender(name, filter, layout); } - + /** + * The log event will be forwarded to the {@link LogMessages} archive. + *

+ * All logged messages will pass this method. For each line in the messages of the log event a new log event will be created. + * + * @param event log event + */ @Override public void append(LogEvent event) { - CACHE.add(new String(this.getLayout().toByteArray(event))); + String message = new String(this.getLayout().toByteArray(event)); + message = message.replace("\n\r", "\n").replace("\r", "\n"); + // stack traces logged by 'Log.error("message"), e' will be split by new lines so we can create a new log event for each line as 'e.printStackTrace()' would do. + if (event.getLevel() == Level.ERROR) { + Arrays.asList(message.split("\n")).stream().filter(s -> !s.isEmpty()).forEach(log -> { + LogEvent messageWithLevel = Log4jLogEvent.newBuilder().setMessage(new SimpleMessage(log.replace("\n", ""))).setLevel(event.getLevel()).build(); + LogMessages.getInstance().add(messageWithLevel); + }); + } else { + LogEvent messageWithLevel = Log4jLogEvent.newBuilder().setMessage(new SimpleMessage(message.replace("\n", ""))).setLevel(event.getLevel()).build(); + LogMessages.getInstance().add(messageWithLevel); + } } - } diff --git a/src/main/java/net/sf/jabref/logic/logging/LogMessages.java b/src/main/java/net/sf/jabref/logic/logging/LogMessages.java new file mode 100644 index 00000000000..9c08ccd1cc9 --- /dev/null +++ b/src/main/java/net/sf/jabref/logic/logging/LogMessages.java @@ -0,0 +1,34 @@ +package net.sf.jabref.logic.logging; + +import javafx.beans.property.ListProperty; +import javafx.beans.property.SimpleListProperty; +import javafx.collections.FXCollections; + +import org.apache.logging.log4j.core.LogEvent; + +/** + * This class is used for storing and archiving all message output of JabRef as log events. + * To listen to changes on the stored logs one can bind to the {@code messagesProperty}. + */ +public class LogMessages { + + private static LogMessages instance = new LogMessages(); + + private LogMessages() { + } + + public static LogMessages getInstance() { + return instance; + } + + private final ListProperty messages = new SimpleListProperty<>(FXCollections.observableArrayList()); + + public ListProperty messagesProperty() { + return messages; + } + + public void add(LogEvent s) { + messages.add(s); + } + +} diff --git a/src/main/resources/l10n/JabRef_da.properties b/src/main/resources/l10n/JabRef_da.properties index 8cdbe78419b..b1a9be181e6 100644 --- a/src/main/resources/l10n/JabRef_da.properties +++ b/src/main/resources/l10n/JabRef_da.properties @@ -1705,6 +1705,13 @@ Loading_built_in_lists= An_error_occurred= JabRef_built_in_list= IEEE_built_in_list= + +Copy_Log= +Report_Issue= +Issue_on_GitHub_successfully_reported.= + +Event_log= +Log_copied_to_clipboard.= Connection= Host= Port= @@ -1791,4 +1798,10 @@ Remember_password?= shared= +Issue_report_successful= +Your_issue_was_reported_in_your_browser.= +The_log_and_exception_information_was_copied_to_your_clipboard.= +Please_paste_this_information_(with_Ctrl+V)_in_the_issue_description.= + +We_now_give_you_insight_into_the_inner_workings_of_JabRef\'s_internals._This_information_might_be_helpful_to_diagnose_the_root_cause_of_a_problem._Please_feel_free_to_inform_the_developers_about_an_issue.= Tools= diff --git a/src/main/resources/l10n/JabRef_de.properties b/src/main/resources/l10n/JabRef_de.properties index 95c4560d505..4682411db05 100644 --- a/src/main/resources/l10n/JabRef_de.properties +++ b/src/main/resources/l10n/JabRef_de.properties @@ -2517,6 +2517,12 @@ An_error_occurred= JabRef_built_in_list= IEEE_built_in_list= +Copy_Log= +Report_Issue= +Issue_on_GitHub_successfully_reported.= + +Event_log= +Log_copied_to_clipboard.= Non-ASCII_encoded_character_found=Nicht_ASCII-kodiertes_Zeichen_gefunden Toggle_web_search_interface=Websuche_ein-/ausschalten @@ -2563,4 +2569,10 @@ should_have_the_first_letter_capitalized= Download= Download_completed= +Issue_report_successful= +Your_issue_was_reported_in_your_browser.= +The_log_and_exception_information_was_copied_to_your_clipboard.= +Please_paste_this_information_(with_Ctrl+V)_in_the_issue_description.= + +We_now_give_you_insight_into_the_inner_workings_of_JabRef\'s_internals._This_information_might_be_helpful_to_diagnose_the_root_cause_of_a_problem._Please_feel_free_to_inform_the_developers_about_an_issue.= Tools= diff --git a/src/main/resources/l10n/JabRef_en.properties b/src/main/resources/l10n/JabRef_en.properties index f47a16a49ac..fd6dc9617bc 100644 --- a/src/main/resources/l10n/JabRef_en.properties +++ b/src/main/resources/l10n/JabRef_en.properties @@ -2240,6 +2240,18 @@ An_error_occurred=An_error_occurred JabRef_built_in_list=JabRef_built_in_list IEEE_built_in_list=IEEE_built_in_list + +Event_log=Event_log +We_now_give_you_insight_into_the_inner_workings_of_JabRef\'s_internals._This_information_might_be_helpful_to_diagnose_the_root_cause_of_a_problem._Please_feel_free_to_inform_the_developers_about_an_issue.=We_now_give_you_insight_into_the_inner_workings_of_JabRef\'s_internals._This_information_might_be_helpful_to_diagnose_the_root_cause_of_a_problem._Please_feel_free_to_inform_the_developers_about_an_issue. +Log_copied_to_clipboard.=Log_copied_to_clipboard. +Copy_Log=Copy_Log +Report_Issue=Report_Issue +Issue_on_GitHub_successfully_reported.=Issue_on_GitHub_successfully_reported. +Issue_report_successful=Issue_report_successful +Your_issue_was_reported_in_your_browser.=Your_issue_was_reported_in_your_browser. +The_log_and_exception_information_was_copied_to_your_clipboard.=The_log_and_exception_information_was_copied_to_your_clipboard. +Please_paste_this_information_(with_Ctrl+V)_in_the_issue_description.=Please_paste_this_information_(with_Ctrl+V)_in_the_issue_description. + Connection=Connection Connecting...=Connecting... Host=Host diff --git a/src/main/resources/l10n/JabRef_es.properties b/src/main/resources/l10n/JabRef_es.properties index 9b99b78ff47..3f13ff02047 100644 --- a/src/main/resources/l10n/JabRef_es.properties +++ b/src/main/resources/l10n/JabRef_es.properties @@ -1608,6 +1608,13 @@ An_error_occurred= JabRef_built_in_list= IEEE_built_in_list= + +Copy_Log= +Report_Issue= +Issue_on_GitHub_successfully_reported.= + +Event_log= +Log_copied_to_clipboard.= Connection= Host= Database= @@ -1692,4 +1699,10 @@ Remember_password?= shared= +Issue_report_successful= +Your_issue_was_reported_in_your_browser.= +The_log_and_exception_information_was_copied_to_your_clipboard.= +Please_paste_this_information_(with_Ctrl+V)_in_the_issue_description.= + +We_now_give_you_insight_into_the_inner_workings_of_JabRef\'s_internals._This_information_might_be_helpful_to_diagnose_the_root_cause_of_a_problem._Please_feel_free_to_inform_the_developers_about_an_issue.= Tools= diff --git a/src/main/resources/l10n/JabRef_fa.properties b/src/main/resources/l10n/JabRef_fa.properties index 07d4570b621..c22ef26dbf0 100644 --- a/src/main/resources/l10n/JabRef_fa.properties +++ b/src/main/resources/l10n/JabRef_fa.properties @@ -2384,6 +2384,13 @@ An_error_occurred= JabRef_built_in_list= IEEE_built_in_list= + +Copy_Log= +Report_Issue= +Issue_on_GitHub_successfully_reported.= + +Event_log= +Log_copied_to_clipboard.= Connection= Host= Port= @@ -2472,4 +2479,10 @@ shared= Download= Download_completed= +Issue_report_successful= +Your_issue_was_reported_in_your_browser.= +The_log_and_exception_information_was_copied_to_your_clipboard.= +Please_paste_this_information_(with_Ctrl+V)_in_the_issue_description.= + +We_now_give_you_insight_into_the_inner_workings_of_JabRef\'s_internals._This_information_might_be_helpful_to_diagnose_the_root_cause_of_a_problem._Please_feel_free_to_inform_the_developers_about_an_issue.= Tools= diff --git a/src/main/resources/l10n/JabRef_fr.properties b/src/main/resources/l10n/JabRef_fr.properties index c2e3b997b93..207ccaa9eb5 100644 --- a/src/main/resources/l10n/JabRef_fr.properties +++ b/src/main/resources/l10n/JabRef_fr.properties @@ -1644,6 +1644,13 @@ An_error_occurred= JabRef_built_in_list= IEEE_built_in_list= + +Copy_Log= +Report_Issue= +Issue_on_GitHub_successfully_reported.= + +Event_log= +Log_copied_to_clipboard.= Connection=Connection Host=Hôte Port=Port @@ -1739,4 +1746,10 @@ should_have_the_first_letter_capitalized= Error_downloading_file_'%0'= Download_failed= %0_databases_will_be_imported= +Issue_report_successful= +Your_issue_was_reported_in_your_browser.= +The_log_and_exception_information_was_copied_to_your_clipboard.= +Please_paste_this_information_(with_Ctrl+V)_in_the_issue_description.= + +We_now_give_you_insight_into_the_inner_workings_of_JabRef\'s_internals._This_information_might_be_helpful_to_diagnose_the_root_cause_of_a_problem._Please_feel_free_to_inform_the_developers_about_an_issue.= Tools= diff --git a/src/main/resources/l10n/JabRef_in.properties b/src/main/resources/l10n/JabRef_in.properties index 712c3d75de7..cc6bc2169a2 100644 --- a/src/main/resources/l10n/JabRef_in.properties +++ b/src/main/resources/l10n/JabRef_in.properties @@ -1620,6 +1620,13 @@ An_error_occurred= JabRef_built_in_list= IEEE_built_in_list= + +Copy_Log= +Report_Issue= +Issue_on_GitHub_successfully_reported.= + +Event_log= +Log_copied_to_clipboard.= Connection= Host= Port= @@ -1708,4 +1715,10 @@ shared= Error_downloading_file_'%0'= Download_failed= %0_databases_will_be_imported= +Issue_report_successful= +Your_issue_was_reported_in_your_browser.= +The_log_and_exception_information_was_copied_to_your_clipboard.= +Please_paste_this_information_(with_Ctrl+V)_in_the_issue_description.= + +We_now_give_you_insight_into_the_inner_workings_of_JabRef\'s_internals._This_information_might_be_helpful_to_diagnose_the_root_cause_of_a_problem._Please_feel_free_to_inform_the_developers_about_an_issue.= Tools= diff --git a/src/main/resources/l10n/JabRef_it.properties b/src/main/resources/l10n/JabRef_it.properties index cd57cc7999d..4f61b317d82 100644 --- a/src/main/resources/l10n/JabRef_it.properties +++ b/src/main/resources/l10n/JabRef_it.properties @@ -1722,6 +1722,13 @@ An_error_occurred= JabRef_built_in_list= IEEE_built_in_list= + +Copy_Log= +Report_Issue= +Issue_on_GitHub_successfully_reported.= + +Event_log= +Log_copied_to_clipboard.= Connection= Host= Port= @@ -1810,4 +1817,10 @@ shared= Error_downloading_file_'%0'= Download_failed= %0_databases_will_be_imported= +Issue_report_successful= +Your_issue_was_reported_in_your_browser.= +The_log_and_exception_information_was_copied_to_your_clipboard.= +Please_paste_this_information_(with_Ctrl+V)_in_the_issue_description.= + +We_now_give_you_insight_into_the_inner_workings_of_JabRef\'s_internals._This_information_might_be_helpful_to_diagnose_the_root_cause_of_a_problem._Please_feel_free_to_inform_the_developers_about_an_issue.= Tools= diff --git a/src/main/resources/l10n/JabRef_ja.properties b/src/main/resources/l10n/JabRef_ja.properties index 6b3b9619278..f0f763311bd 100644 --- a/src/main/resources/l10n/JabRef_ja.properties +++ b/src/main/resources/l10n/JabRef_ja.properties @@ -2368,6 +2368,13 @@ An_error_occurred= Remove_list= JabRef_built_in_list= IEEE_built_in_list= + +Copy_Log= +Report_Issue= +Issue_on_GitHub_successfully_reported.= + +Event_log= +Log_copied_to_clipboard.= Connection= Host= Database= @@ -2455,4 +2462,10 @@ shared= Download= Download_completed= %0_databases_will_be_imported= +Issue_report_successful= +Your_issue_was_reported_in_your_browser.= +The_log_and_exception_information_was_copied_to_your_clipboard.= +Please_paste_this_information_(with_Ctrl+V)_in_the_issue_description.= + +We_now_give_you_insight_into_the_inner_workings_of_JabRef\'s_internals._This_information_might_be_helpful_to_diagnose_the_root_cause_of_a_problem._Please_feel_free_to_inform_the_developers_about_an_issue.= Tools= diff --git a/src/main/resources/l10n/JabRef_nl.properties b/src/main/resources/l10n/JabRef_nl.properties index 5b0ab38974c..d6530f546a1 100644 --- a/src/main/resources/l10n/JabRef_nl.properties +++ b/src/main/resources/l10n/JabRef_nl.properties @@ -2392,6 +2392,13 @@ An_error_occurred= JabRef_built_in_list= IEEE_built_in_list= + +Copy_Log= +Report_Issue= +Issue_on_GitHub_successfully_reported.= + +Event_log= +Log_copied_to_clipboard.= Connection= Host= Database= @@ -2481,4 +2488,10 @@ Download_completed= Error_downloading_file_'%0'= Download_failed= %0_databases_will_be_imported= +Issue_report_successful= +Your_issue_was_reported_in_your_browser.= +The_log_and_exception_information_was_copied_to_your_clipboard.= +Please_paste_this_information_(with_Ctrl+V)_in_the_issue_description.= + +We_now_give_you_insight_into_the_inner_workings_of_JabRef\'s_internals._This_information_might_be_helpful_to_diagnose_the_root_cause_of_a_problem._Please_feel_free_to_inform_the_developers_about_an_issue.= Tools= diff --git a/src/main/resources/l10n/JabRef_no.properties b/src/main/resources/l10n/JabRef_no.properties index 71edcccd737..3c6e51c5034 100644 --- a/src/main/resources/l10n/JabRef_no.properties +++ b/src/main/resources/l10n/JabRef_no.properties @@ -2784,6 +2784,13 @@ An_error_occurred= JabRef_built_in_list= IEEE_built_in_list= + +Copy_Log= +Report_Issue= +Issue_on_GitHub_successfully_reported.= + +Event_log= +Log_copied_to_clipboard.= Connection= Host= Port= @@ -2874,4 +2881,10 @@ Download_completed= Error_downloading_file_'%0'= Download_failed= %0_databases_will_be_imported= +Issue_report_successful= +Your_issue_was_reported_in_your_browser.= +The_log_and_exception_information_was_copied_to_your_clipboard.= +Please_paste_this_information_(with_Ctrl+V)_in_the_issue_description.= + +We_now_give_you_insight_into_the_inner_workings_of_JabRef\'s_internals._This_information_might_be_helpful_to_diagnose_the_root_cause_of_a_problem._Please_feel_free_to_inform_the_developers_about_an_issue.= Tools= diff --git a/src/main/resources/l10n/JabRef_pt_BR.properties b/src/main/resources/l10n/JabRef_pt_BR.properties index bbb4af3a3fd..c54f52cf169 100644 --- a/src/main/resources/l10n/JabRef_pt_BR.properties +++ b/src/main/resources/l10n/JabRef_pt_BR.properties @@ -1620,6 +1620,13 @@ An_error_occurred= JabRef_built_in_list= IEEE_built_in_list= + +Copy_Log= +Report_Issue= +Issue_on_GitHub_successfully_reported.= + +Event_log= +Log_copied_to_clipboard.= Connection= Host= Port= @@ -1706,4 +1713,10 @@ Remember_password?= shared= %0_databases_will_be_imported= +Issue_report_successful= +Your_issue_was_reported_in_your_browser.= +The_log_and_exception_information_was_copied_to_your_clipboard.= +Please_paste_this_information_(with_Ctrl+V)_in_the_issue_description.= + +We_now_give_you_insight_into_the_inner_workings_of_JabRef\'s_internals._This_information_might_be_helpful_to_diagnose_the_root_cause_of_a_problem._Please_feel_free_to_inform_the_developers_about_an_issue.= Tools= diff --git a/src/main/resources/l10n/JabRef_ru.properties b/src/main/resources/l10n/JabRef_ru.properties index dbd3daf4f8c..abcdf6ef014 100644 --- a/src/main/resources/l10n/JabRef_ru.properties +++ b/src/main/resources/l10n/JabRef_ru.properties @@ -2364,6 +2364,13 @@ An_error_occurred= JabRef_built_in_list= IEEE_built_in_list= + +Copy_Log= +Report_Issue= +Issue_on_GitHub_successfully_reported.= + +Event_log= +Log_copied_to_clipboard.= Connection= Host= Database= @@ -2450,4 +2457,10 @@ shared= Download= Download_completed= +Issue_report_successful= +Your_issue_was_reported_in_your_browser.= +The_log_and_exception_information_was_copied_to_your_clipboard.= +Please_paste_this_information_(with_Ctrl+V)_in_the_issue_description.= + +We_now_give_you_insight_into_the_inner_workings_of_JabRef\'s_internals._This_information_might_be_helpful_to_diagnose_the_root_cause_of_a_problem._Please_feel_free_to_inform_the_developers_about_an_issue.= Tools= diff --git a/src/main/resources/l10n/JabRef_sv.properties b/src/main/resources/l10n/JabRef_sv.properties index 701f33983d3..36b1916ec7d 100644 --- a/src/main/resources/l10n/JabRef_sv.properties +++ b/src/main/resources/l10n/JabRef_sv.properties @@ -1567,6 +1567,13 @@ An_error_occurred= JabRef_built_in_list= IEEE_built_in_list= + +Copy_Log= +Report_Issue= +Issue_on_GitHub_successfully_reported.= + +Event_log= +Log_copied_to_clipboard.= Connection=Anslutning Host=Värd Port=Port @@ -1658,4 +1665,10 @@ should_have_the_first_letter_capitalized= Error_downloading_file_'%0'= %0_databases_will_be_imported= +Issue_report_successful= +Your_issue_was_reported_in_your_browser.= +The_log_and_exception_information_was_copied_to_your_clipboard.= +Please_paste_this_information_(with_Ctrl+V)_in_the_issue_description.= + +We_now_give_you_insight_into_the_inner_workings_of_JabRef\'s_internals._This_information_might_be_helpful_to_diagnose_the_root_cause_of_a_problem._Please_feel_free_to_inform_the_developers_about_an_issue.= Tools= diff --git a/src/main/resources/l10n/JabRef_tr.properties b/src/main/resources/l10n/JabRef_tr.properties index a5e1031e092..9a551ab69c7 100644 --- a/src/main/resources/l10n/JabRef_tr.properties +++ b/src/main/resources/l10n/JabRef_tr.properties @@ -1644,6 +1644,13 @@ An_error_occurred= JabRef_built_in_list= IEEE_built_in_list= + +Copy_Log= +Report_Issue= +Issue_on_GitHub_successfully_reported.= + +Event_log= +Log_copied_to_clipboard.= Connection=Bağlantı Host=Makine Database=Veritabanı @@ -1731,5 +1738,11 @@ Remember_password?=Parola_hatırlansın_mı? shared= +Issue_report_successful= +Your_issue_was_reported_in_your_browser.= +The_log_and_exception_information_was_copied_to_your_clipboard.= +Please_paste_this_information_(with_Ctrl+V)_in_the_issue_description.= + +We_now_give_you_insight_into_the_inner_workings_of_JabRef\'s_internals._This_information_might_be_helpful_to_diagnose_the_root_cause_of_a_problem._Please_feel_free_to_inform_the_developers_about_an_issue.= Tools= shared=paylaşıldı diff --git a/src/main/resources/l10n/JabRef_vi.properties b/src/main/resources/l10n/JabRef_vi.properties index b33e6100430..0cfa57cc05b 100644 --- a/src/main/resources/l10n/JabRef_vi.properties +++ b/src/main/resources/l10n/JabRef_vi.properties @@ -2386,6 +2386,13 @@ An_error_occurred= JabRef_built_in_list= IEEE_built_in_list= + +Copy_Log= +Report_Issue= +Issue_on_GitHub_successfully_reported.= + +Event_log= +Log_copied_to_clipboard.= Connection= Host= Port= @@ -2476,4 +2483,10 @@ Download_completed= Error_downloading_file_'%0'= Download_failed= %0_databases_will_be_imported= +Issue_report_successful= +Your_issue_was_reported_in_your_browser.= +The_log_and_exception_information_was_copied_to_your_clipboard.= +Please_paste_this_information_(with_Ctrl+V)_in_the_issue_description.= + +We_now_give_you_insight_into_the_inner_workings_of_JabRef\'s_internals._This_information_might_be_helpful_to_diagnose_the_root_cause_of_a_problem._Please_feel_free_to_inform_the_developers_about_an_issue.= Tools= diff --git a/src/main/resources/l10n/JabRef_zh.properties b/src/main/resources/l10n/JabRef_zh.properties index fc5f51a2ff9..1315dacff33 100644 --- a/src/main/resources/l10n/JabRef_zh.properties +++ b/src/main/resources/l10n/JabRef_zh.properties @@ -1630,6 +1630,13 @@ An_error_occurred= JabRef_built_in_list= IEEE_built_in_list= + +Copy_Log= +Report_Issue= +Issue_on_GitHub_successfully_reported.= + +Event_log= +Log_copied_to_clipboard.= Connection= Host= Database= @@ -1717,4 +1724,10 @@ shared= Error_downloading_file_'%0'= Download_failed= %0_databases_will_be_imported= +Issue_report_successful= +Your_issue_was_reported_in_your_browser.= +The_log_and_exception_information_was_copied_to_your_clipboard.= +Please_paste_this_information_(with_Ctrl+V)_in_the_issue_description.= + +We_now_give_you_insight_into_the_inner_workings_of_JabRef\'s_internals._This_information_might_be_helpful_to_diagnose_the_root_cause_of_a_problem._Please_feel_free_to_inform_the_developers_about_an_issue.= Tools= diff --git a/src/main/resources/l10n/Menu_da.properties b/src/main/resources/l10n/Menu_da.properties index 4d1d4d34aa0..b6f667b349f 100644 --- a/src/main/resources/l10n/Menu_da.properties +++ b/src/main/resources/l10n/Menu_da.properties @@ -53,7 +53,6 @@ Save_selected_as...=Gem_&valgte_poster_som_... Search=&Søg Select_all=&Vælg_alle Set_up_general_fields=Administrer_&generelle_felter -Show_error_console=Vis_fejlkonsol Sort_tabs=Sorter_faneblade Switch_preview_layout=&Skift_layout_på_forhåndsvisning Toggle_entry_preview=&Vis/skjul_forhåndsvisning @@ -108,11 +107,13 @@ Quality=Kvalitet New_%0_database=Ny_%0-database Disable_highlight_groups_matching_entries=Deaktiver_fremhævningen_af_grupperede_indgange +Show_developer_information= Online_help_forum= Manage_protected_terms= +View_event_log= Website= Blog= JabRef_resources= diff --git a/src/main/resources/l10n/Menu_de.properties b/src/main/resources/l10n/Menu_de.properties index 33721fd9f30..38a5780ee5f 100644 --- a/src/main/resources/l10n/Menu_de.properties +++ b/src/main/resources/l10n/Menu_de.properties @@ -130,7 +130,6 @@ Select_all=&Alle_ausw\u00e4hlen Set_up_general_fields=Allgemeine_&Felder_festlegen -Show_error_console=Fehlerkonsole_anzeigen Sort_tabs=Tabs_&sortieren @@ -207,9 +206,13 @@ Quality=Qualität New_%0_database=Neue_%0_Datenbank Disable_highlight_groups_matching_entries=Keine_Gruppen_hervorheben +Show_developer_information= Online_help_forum=Online-Hilfeforum +Manage_protected_terms= + +View_event_log= Manage_protected_terms=Geschützte_Terme_verwalten View_change_log=Changelog_öffnen diff --git a/src/main/resources/l10n/Menu_en.properties b/src/main/resources/l10n/Menu_en.properties index dff936e3a0a..4a10bb4fc1e 100644 --- a/src/main/resources/l10n/Menu_en.properties +++ b/src/main/resources/l10n/Menu_en.properties @@ -31,6 +31,7 @@ Disable_highlight_groups_matching_entries=Disable_highlight_groups_matching_entr # Help Online_help=Online_help +Show_developer_information=Show_developer_information Donate_to_JabRef=Donate_to_JabRef Manage_content_selectors=Manage_&content_selectors Manage_custom_exports=&Manage_custom_exports @@ -67,7 +68,7 @@ Search=&Search Global_Search=Global_Search Select_all=Select_&all Set_up_general_fields=Set_up_&general_fields -Show_error_console=Show_error_console +View_event_log=View_event_log Sort_tabs=&Sort_tabs Switch_preview_layout=&Switch_preview_layout # Export menu diff --git a/src/main/resources/l10n/Menu_es.properties b/src/main/resources/l10n/Menu_es.properties index e6c9addbbd7..b7c8b7fe200 100644 --- a/src/main/resources/l10n/Menu_es.properties +++ b/src/main/resources/l10n/Menu_es.properties @@ -66,7 +66,6 @@ Search=&Buscar Select_all=Seleccionar_&todos Set_up_general_fields=Establecer_&campos_generales -Show_error_console=Mostrar_consola_de_error Sort_tabs=&Ordenar_pestañas Switch_preview_layout=&Intercambiar_vista_anterior @@ -135,11 +134,13 @@ Quality=Calidad New_%0_database=Nueva_base_de_datos_%0 Disable_highlight_groups_matching_entries=Inhabilitar_grupos_destacados_coincidentes_con_las_entradas +Show_developer_information= Online_help_forum= Manage_protected_terms= +View_event_log= Website= Blog= JabRef_resources= diff --git a/src/main/resources/l10n/Menu_fa.properties b/src/main/resources/l10n/Menu_fa.properties index 4afabc1793d..f55729ab322 100644 --- a/src/main/resources/l10n/Menu_fa.properties +++ b/src/main/resources/l10n/Menu_fa.properties @@ -63,7 +63,6 @@ Save_selected_as...=ذخیره‌ی_انتخاب_شده_در Search=جستجو Select_all=انتخاب_همه Set_up_general_fields=نصب_کردن_حوزه‌های_کلی -Show_error_console=نمایش_میزفرمان_خطاها Sort_tabs=دسته‌بندی_کردن_سربرگ‌ها Switch_preview_layout=جهش_به_آرایش_قبلی @@ -132,12 +131,13 @@ Quality=کیفیت New_%0_database=پایگاه‌داده‌ی_%0_جدید Disable_highlight_groups_matching_entries=گروه‌های_مشخص_شده‌ی_مطابق_با_مدخل‌ها_را_حذف_کن - +Show_developer_information= Online_help_forum= Manage_protected_terms= +View_event_log= Website= Blog= JabRef_resources= diff --git a/src/main/resources/l10n/Menu_fr.properties b/src/main/resources/l10n/Menu_fr.properties index 72e48122ca5..0c498f6beda 100644 --- a/src/main/resources/l10n/Menu_fr.properties +++ b/src/main/resources/l10n/Menu_fr.properties @@ -54,7 +54,6 @@ Save_selected_as...=Enregistrer_la_s\u00e9&lection_sous_... Search=&Recherche Select_all=&Tout_s\u00e9lectionner Set_up_general_fields=Configurer_les_champs_&g\u00e9n\u00e9raux -Show_error_console=Afficher_la_console_d'erreur Sort_tabs=Trier_les_onglets Switch_preview_layout=Aper\u00e7u_1/Aper\u00e7u_2 Toggle_entry_preview=&Afficher/masquer_l'aper\u00e7u @@ -121,9 +120,13 @@ Quality=Qualité New_%0_database=Nouvelle_base_%0 Disable_highlight_groups_matching_entries=Désactiver_le_surlignement_des_groupes_correspondant_à_des_entrées +Show_developer_information= Online_help_forum=Forum_d'aide_en_ligne +Manage_protected_terms= + +View_event_log= Manage_protected_terms=Gérer_les_termes_protégés Website=Site_Internet diff --git a/src/main/resources/l10n/Menu_in.properties b/src/main/resources/l10n/Menu_in.properties index 8b5bbe991c9..79aeae8ad1c 100644 --- a/src/main/resources/l10n/Menu_in.properties +++ b/src/main/resources/l10n/Menu_in.properties @@ -69,7 +69,6 @@ Search=Cari Select_all=Pilih_semua Set/clear/rename_fields=Tetapkan/bersihkan/namai_bidang Set_up_general_fields=Penetapan_bidang_umum -Show_error_console=Tampilkan_pesan_kesalahan Sort_tabs=Urutkan_tab Switch_preview_layout=Ubah_tataletak_tampilan Toggle_entry_preview=Tampilkan_entri @@ -106,11 +105,13 @@ Quality=Kualitas New_%0_database=Basisdata_%0_baru Disable_highlight_groups_matching_entries=Pewarnaan_grup_entri_yang_sesuai_tidak_aktif +Show_developer_information= Online_help_forum= Manage_protected_terms= +View_event_log= Website= Blog= JabRef_resources= diff --git a/src/main/resources/l10n/Menu_it.properties b/src/main/resources/l10n/Menu_it.properties index 5b2e09d4c97..bd88045846d 100644 --- a/src/main/resources/l10n/Menu_it.properties +++ b/src/main/resources/l10n/Menu_it.properties @@ -63,7 +63,6 @@ Save_selected_as...=Sal&va_la_selezione_come_... Search=&Ricerca Select_all=Sele&ziona_tutto Set_up_general_fields=Configura_i_campi_generali -Show_error_console=Mostra_la_console_d'errore Sort_tabs=Ordina_le_schede Switch_preview_layout=S&cambia_layout_anteprima # Export menu @@ -127,9 +126,13 @@ Quality=Qualità New_%0_database=Nuovo_database_%0 Disable_highlight_groups_matching_entries=Disattiva_l'evidenziazione_dei_gruppi_corrispondenti_alle_voci +Show_developer_information= Online_help_forum=Forum_di_aiuto_online +Manage_protected_terms= + +View_event_log= Manage_protected_terms=Gestione_dei_termini_protetti Website= diff --git a/src/main/resources/l10n/Menu_ja.properties b/src/main/resources/l10n/Menu_ja.properties index 6bce914a19d..fd61e470a7b 100644 --- a/src/main/resources/l10n/Menu_ja.properties +++ b/src/main/resources/l10n/Menu_ja.properties @@ -63,7 +63,6 @@ Save_selected_as...=選択部に名前を付けて保存(&L)… Search=検索(&S) Select_all=全て選択(&A) Set_up_general_fields=汎用フィールドを設定(&G) -Show_error_console=エラーコンソールを表示 Sort_tabs=タブを整序(&S) Switch_preview_layout=プレビューのレイアウトを切替(&S) @@ -134,11 +133,13 @@ Quality=品質 New_%0_database=新しい%0データベース Disable_highlight_groups_matching_entries=項目に一致するグループの着色を無効化 +Show_developer_information= Online_help_forum= Manage_protected_terms= +View_event_log= Website= Blog= JabRef_resources= diff --git a/src/main/resources/l10n/Menu_nl.properties b/src/main/resources/l10n/Menu_nl.properties index 608e30e73bd..c5b399a1471 100644 --- a/src/main/resources/l10n/Menu_nl.properties +++ b/src/main/resources/l10n/Menu_nl.properties @@ -131,7 +131,6 @@ Select_all=Selecteer_alles Set_up_general_fields=Stel_algemene_velden_in -Show_error_console=Toon_foutenconsole Sort_tabs=Tabbladen_sorteren @@ -215,11 +214,13 @@ Quality=Kwaliteit New_%0_database=Nieuwe_%0_database Disable_highlight_groups_matching_entries=Overeenkomende_groepen_van_invoer_oplichten_uitschakelen +Show_developer_information= Online_help_forum= Manage_protected_terms= +View_event_log= Website= Blog= JabRef_resources= diff --git a/src/main/resources/l10n/Menu_no.properties b/src/main/resources/l10n/Menu_no.properties index b1eff6fd8bc..cf79c4eaea2 100644 --- a/src/main/resources/l10n/Menu_no.properties +++ b/src/main/resources/l10n/Menu_no.properties @@ -60,7 +60,6 @@ Save_selected_as...=Lagre_&valgte_oppføringer_som_... Search=&Søk Select_all=&Velg_alle Set_up_general_fields=Sett_opp_&generelle_felter -Show_error_console=Vis_feilkonsoll Sort_tabs=Sorter_tabs Switch_preview_layout=&Skift_layout_på_forhåndsvisning # Export menu @@ -127,9 +126,13 @@ Quality=Kvalitet New_%0_database=Ny %0-database Disable_highlight_groups_matching_entries=Deaktiver markerte samsvarende oppføringer +Show_developer_information= Online_help_forum=Online_hjelpforum +Manage_protected_terms= + +View_event_log= Manage_protected_terms=Administrere_beskyttet_ord Website=Nettsted diff --git a/src/main/resources/l10n/Menu_pt_BR.properties b/src/main/resources/l10n/Menu_pt_BR.properties index 35e19819387..04927a4432a 100644 --- a/src/main/resources/l10n/Menu_pt_BR.properties +++ b/src/main/resources/l10n/Menu_pt_BR.properties @@ -53,7 +53,6 @@ Save_selected_as...=Salvar_os_se&lecionados_como... Search=&Pesquisar Select_all=Selecionar_&tudo Set_up_general_fields=Configurar_&campos_gerais -Show_error_console=Exibir_console_de_erros Sort_tabs=&Ordenar_abas Switch_preview_layout=&Trocar_layout_da_previsualização Toggle_entry_preview=&Mostrar/Esconder_previsualização_de_referências @@ -108,11 +107,13 @@ Quality=Qualidade New_%0_database=%0_novas_bases_de_dados Disable_highlight_groups_matching_entries=Desabilitar_destacar_grupos_contendo_referências +Show_developer_information= Online_help_forum= Manage_protected_terms= +View_event_log= Website= Blog= JabRef_resources= diff --git a/src/main/resources/l10n/Menu_ru.properties b/src/main/resources/l10n/Menu_ru.properties index 2124665c415..90c0f25484b 100644 --- a/src/main/resources/l10n/Menu_ru.properties +++ b/src/main/resources/l10n/Menu_ru.properties @@ -63,7 +63,6 @@ Save_selected_as...=Сохранить_выбранное_как... Search=Поиск Select_all=Выбрать_все Set_up_general_fields=Настройка_общих_полей -Show_error_console=Показать_консоль_ошибок Sort_tabs=Сортировать_вкладки Switch_preview_layout=Переключить_макет_предпросмотра @@ -131,11 +130,13 @@ Quality=Качество New_%0_database=Новая_база_данных_%0 Disable_highlight_groups_matching_entries=Отключить_выделение_групп,_соответствующих_выделенным_записям +Show_developer_information= Online_help_forum= Manage_protected_terms= +View_event_log= Website= Blog= JabRef_resources= diff --git a/src/main/resources/l10n/Menu_sv.properties b/src/main/resources/l10n/Menu_sv.properties index a12f89e184b..f245c4c064f 100644 --- a/src/main/resources/l10n/Menu_sv.properties +++ b/src/main/resources/l10n/Menu_sv.properties @@ -54,7 +54,6 @@ Save_selected_as...=Spara_&valda_som... Search=&Sök Select_all=Välj_&alla Set_up_general_fields=Hantera_generella_fält -Show_error_console=Visa_felmeddelanden Sort_tabs=Sortera_flikar Switch_preview_layout=&Byt_postvisningsstil Toggle_entry_preview=Växla_&postvisning @@ -97,11 +96,13 @@ Groups=&Grupper Delete_entry=Radera_post Check_integrity=Testa_&integriteten Quality=&Kvalitet +Show_developer_information= Online_help_forum=Onlineforum Manage_protected_terms=Hantera_skyddade_ord +View_event_log= Website=Hemsida Blog=Blogg JabRef_resources=JabRef-resurser diff --git a/src/main/resources/l10n/Menu_tr.properties b/src/main/resources/l10n/Menu_tr.properties index 467cdc028a7..caa728f69ae 100644 --- a/src/main/resources/l10n/Menu_tr.properties +++ b/src/main/resources/l10n/Menu_tr.properties @@ -53,7 +53,6 @@ Save_selected_as...=Seçimi_fark&lı_kaydet... Search=A&ra Select_all=T&ümünü_seç Set_up_general_fields=&Genel_alanları_ayarla -Show_error_console=Hata_konsolunu_göster Sort_tabs=&Sekmeleri_sırala Switch_preview_layout=Önizleme_yerleşimini_de&ğiştir Toggle_entry_preview=Girdi_önzilemesini_aç/kapa&t @@ -110,9 +109,13 @@ Quality=Kalite New_%0_database=Yeni_%0_veri_tabanı Disable_highlight_groups_matching_entries=Vurgulu_gruplarla_eşleşen_girdileri_etkisizleştir +Show_developer_information= Online_help_forum=Çevrimiçi_yardım_forumu +Manage_protected_terms= + +View_event_log= Manage_protected_terms=Korunmuş_terimleri_yönet Website=Web_sitesi diff --git a/src/main/resources/l10n/Menu_vi.properties b/src/main/resources/l10n/Menu_vi.properties index a51aac0c54d..f91f4a877b1 100644 --- a/src/main/resources/l10n/Menu_vi.properties +++ b/src/main/resources/l10n/Menu_vi.properties @@ -88,7 +88,6 @@ Select_all=Chọn_tất_&cả Set/clear/rename_fields=Thiết_lập/Xóa/Đổi_tên_trường Set_up_general_fields=Thiết_lập_các_trường_tổng_&quát -Show_error_console=Hiển_thị_cửa_&sổ_báo_lỗi Sort_tabs=Phân_loại_t&hẻ Switch_preview_layout=&Bật_trình_bày_xem_trước @@ -133,11 +132,13 @@ Quality= New_%0_database= Disable_highlight_groups_matching_entries= +Show_developer_information= Online_help_forum= Manage_protected_terms= +View_event_log= Website= Blog= JabRef_resources= diff --git a/src/main/resources/l10n/Menu_zh.properties b/src/main/resources/l10n/Menu_zh.properties index 8346cb36878..f20af69fe0b 100644 --- a/src/main/resources/l10n/Menu_zh.properties +++ b/src/main/resources/l10n/Menu_zh.properties @@ -63,7 +63,6 @@ Save_selected_as...=选中记录另存为_(&L)... Search=查找_(&S) Select_all=全选_(&A) Set_up_general_fields=配置_&general_域 -Show_error_console=打开错误显示终端 Sort_tabs=标签页排序_(&S) Switch_preview_layout=切换记录预览方式_(&S) @@ -132,11 +131,13 @@ Quality=质量 New_%0_database=新建_%0_数据库 Disable_highlight_groups_matching_entries=禁用高亮显示包含选中记录的分组 +Show_developer_information= Online_help_forum= Manage_protected_terms= +View_event_log= Website= Blog= JabRef_resources= diff --git a/src/main/resources/net/sf/jabref/gui/errorconsole/ErrorConsole.css b/src/main/resources/net/sf/jabref/gui/errorconsole/ErrorConsole.css new file mode 100644 index 00000000000..107a7255248 --- /dev/null +++ b/src/main/resources/net/sf/jabref/gui/errorconsole/ErrorConsole.css @@ -0,0 +1,54 @@ +.list-content { + -fx-padding: 10.0px; +} + +.info-section { + -fx-padding: 10.0px; +} + +.info-section .icon { + -fx-font-size: 48.0; +} + +.list-cell { + -fx-background-color: white; + } + + .icon { + -fx-font-family: 'Material Design Icons'; + -fx-font-size: 16.0; + -fx-fill : #5e5f5e; +} + +.exception{ + -fx-text-fill: red; +} + +.exception .icon { + -fx-fill: #FF0000; +} + +.log { + -fx-text-fill: blue; +} + +.log .icon { + -fx-fill: #00008B; +} + +.output { + -fx-text-fill: black; +} + +.output .icon { + -fx-fill: #000000; +} + +.custom-buttons { + -fx-padding: 5.0px; +} + +.dialog-pane *.button-bar { + -fx-max-height: 0.0; + -fx-pref-height: 0.0; +} diff --git a/src/main/resources/net/sf/jabref/gui/errorconsole/ErrorConsole.fxml b/src/main/resources/net/sf/jabref/gui/errorconsole/ErrorConsole.fxml new file mode 100644 index 00000000000..91b59161a3a --- /dev/null +++ b/src/main/resources/net/sf/jabref/gui/errorconsole/ErrorConsole.fxml @@ -0,0 +1,33 @@ + + + + + + + + + + + + + + + + + + +