-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improvements to the JavaFX Error Console #2212
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, only a few minor remarks from my side.
@@ -35,10 +45,29 @@ | |||
private void initialize() { | |||
listViewStyle(); | |||
allMessages.itemsProperty().bind(errorViewModel.allMessagesDataproperty()); | |||
allMessages.scrollTo(errorViewModel.allMessagesDataproperty().getSize() - 1); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let the ViewModel decide to which entry one should scroll (i.e. introduce errorViewModel.scrollTo
property, which should be bound to size() - 1
). If you feel like I'm too pedantic here, just ignore my remark 😄 .
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In my opinion this is not part of the model.. :)
KeyBindingPreferences keyPreferences = Globals.getKeyPrefs(); | ||
if (keyPreferences.checkKeyCombinationEquality(KeyBinding.COPY, event)) { | ||
ObservableList<LogEvent> selectedEntries = allMessages.getSelectionModel().getSelectedItems(); | ||
if (!selectedEntries.isEmpty()) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Try to reuse the copyLog method (i.e. create an overload which accepts a list of LogEvent
s)
Ok, rebase and merge. |
f3794d2
to
a5a404c
Compare
The log messages in the list view of the error console can now be selected and copied. The error message will also automatically scroll to the newest log message. Refs #2210