Skip to content
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

Merged
merged 2 commits into from
Dec 2, 2016

Conversation

boceckts
Copy link
Contributor

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

@boceckts boceckts added stupro status: ready-for-review Pull Requests that are ready to be reviewed by the maintainers labels Oct 29, 2016
Copy link
Member

@tobiasdiez tobiasdiez left a 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);
Copy link
Member

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 😄 .

Copy link
Contributor Author

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()) {
Copy link
Member

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 LogEvents)

@tobiasdiez tobiasdiez removed the status: ready-for-review Pull Requests that are ready to be reviewed by the maintainers label Nov 1, 2016
@tobiasdiez
Copy link
Member

Ok, rebase and merge.

@koppor koppor merged commit e3ff1d9 into JabRef:javafx Dec 2, 2016
@tobiasdiez tobiasdiez mentioned this pull request Dec 12, 2016
6 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants