Add right click->copy functionality to event logs#11104
Merged
Conversation
koppor
reviewed
Mar 26, 2024
koppor
reviewed
Mar 26, 2024
|
|
||
| if ((event == null) || empty) { | ||
| setGraphic(null); | ||
| setContextMenu(null); |
Member
There was a problem hiding this comment.
Why this call? What is the behavior if this is removed? I would not show any context menu if something is empty.
Then, in src/main/java/org/jabref/gui/errorconsole/ErrorConsoleViewModel.java, you can remove the null check.
koppor
requested changes
Mar 26, 2024
| public void copyLogEntry(LogEventViewModel logEvent) { | ||
| if (logEvent != null) { | ||
| clipBoardManager.setContent(logEvent.getDetailedText()); | ||
| dialogService.notify(Localization.lang("Log entry copied to clipboard.")); |
Member
There was a problem hiding this comment.
Please remove this.
I know that JabRef has notifications for copy operations. I personally find this strange. Moreover, the log scrolls down after copying. Thus, in this case, it is annoying.
I think, we won't have issues when copying to clipboard. Thus, no notification needed.
calixtus
previously approved these changes
Mar 27, 2024
koppor
approved these changes
Mar 27, 2024
Siedlerchr
approved these changes
Mar 27, 2024
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This closes #11100
Users can now right click on a log entry from the event log window to copy the log entry using a context menu:
(Note: Windows screenshots/print screen do not show the mouse cursor location)
Mandatory checks
CHANGELOG.mddescribed in a way that is understandable for the average user (if applicable)[ ] Tests created for changes (if applicable)