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

Fix Export to clipbaord action #4286

Merged
merged 3 commits into from
Aug 23, 2018
Merged

Fix Export to clipbaord action #4286

merged 3 commits into from
Aug 23, 2018

Conversation

Siedlerchr
Copy link
Member

@Siedlerchr Siedlerchr commented Aug 23, 2018

Fixes #4286

The content is correctly put, but I can't paste it in Notepad++ or wherever


  • Change in CHANGELOG.md described
  • Tests created for changes
  • Manually tested changed features in running JabRef
  • Screenshots added in PR description (for bigger UI changes)
  • Ensured that the git commit message is a good one
  • Check documentation status (Issue created for outdated help page at help.jabref.org?)

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.

Looks good. I've only a small suggestion for improvement concerning the BackgroundWorker.


String content = readFileToString(tmp);

DefaultTaskExecutor.runInJavaFXThread(() -> {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's out of scope and I think we have some other more important bugs to fix atm.

@tobiasdiez tobiasdiez merged commit fe06310 into master Aug 23, 2018
@tobiasdiez tobiasdiez deleted the exportToClipboard branch August 23, 2018 13:44
Siedlerchr added a commit that referenced this pull request Aug 24, 2018
* 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
Siedlerchr added a commit that referenced this pull request Aug 29, 2018
* 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
  ...
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.

2 participants