Fix Export to clipbaord action#4286
Conversation
tobiasdiez
left a comment
There was a problem hiding this comment.
Looks good. I've only a small suggestion for improvement concerning the BackgroundWorker.
|
|
||
| String content = readFileToString(tmp); | ||
|
|
||
| DefaultTaskExecutor.runInJavaFXThread(() -> { |
There was a problem hiding this comment.
It is slightly better if you return the content here at this point and put it in the clipboard in the onSuccess method of the BackgroundTask (which is always executed on the JavaFX thread).
| .getEncoding() | ||
| .orElse(Globals.prefs.getDefaultEncoding()), | ||
| entries); | ||
| panel.getBibDatabaseContext() |
There was a problem hiding this comment.
Do we really need to export to a tmp file? The exporter should be able to work on a output stream and then we can simply pass a StringOutputBuffer here. I know this may be a bigger task, so take it as a suggestion and not requirement for merge ;-)
There was a problem hiding this comment.
It's out of scope and I think we have some other more important bugs to fix atm.
* upstream/master: (129 commits) Fix Export to clipbaord action (#4286) Add minimal height for entry editor (#4283) Fix exceptions when trying to change settings (#4284) Added a comment for the purpose of the class (#4282) Fix NPE when importing from CLI (#4281) Fix display of key patterns convert bibtexkeypatterndlg to javafx as well (#4277) Style preference sections using css Fix a few style issues Changed the behavior of the field formatting dialog (#4275) Fix checkbox display Remove small font size Style side pane in preferences Wrap preference tabs in scrollpane Fix NPE with bibdatabasecontext in preview style dialog update xmlunit and log4j jul and checkstyle Update mysql driver to 8.0.12 Rework preference dialog main class Move preferences stuff to gui.preferences Implement drag and drop for maintable (#3765) ... # Conflicts: # src/main/java/org/jabref/gui/shared/ConnectToSharedDatabaseDialog.java
* upstream/master: (468 commits) Fix error prone warnings (#4290) Fix freeze on import into current library (#4299) Upgrade gradle to 4.10 update xmlunit and postgres update xmlunit-matchers from 2.6.0 -> 2.6.1 update gradle build-scan from 1.15.2 -> 1.16 checkstyle execute changes only if disk db present Fix Export to clipbaord action (#4286) fix npe in Merge entries dialog Add minimal height for entry editor (#4283) Fix exceptions when trying to change settings (#4284) Added a comment for the purpose of the class (#4282) Fix NPE when importing from CLI (#4281) Fix display of key patterns convert bibtexkeypatterndlg to javafx as well (#4277) Style preference sections using css Fix a few style issues Changed the behavior of the field formatting dialog (#4275) Fix checkbox display Remove small font size ...
Fixes #4286
The content is correctly put, but I can't paste it in Notepad++ or wherever