Skip to content

Commit

Permalink
Merge branch 'master' into jacoco-toolversion
Browse files Browse the repository at this point in the history
  • Loading branch information
stefan-kolb committed Feb 6, 2018
2 parents ca503a3 + 5eda399 commit 866e07d
Show file tree
Hide file tree
Showing 64 changed files with 1,884 additions and 2,083 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,16 @@ For more details refer to the [field mapping help page](http://help.jabref.org/e
- We added Facebook and Twitter icons in the toolbar to link to our [Facebook](https://www.facebook.com/JabRef/) and [Twitter](https://twitter.com/jabref_org) pages.
- We no longer print empty lines when exporting an entry in RIS format [#3634](https://github.com/JabRef/jabref/issues/3634)
- We improved file saving so that hard links are now preserved when a save is performed [#2633](https://github.com/JabRef/jabref/issues/2633)
- We changed the default dialog option when removing a [file link](http://help.jabref.org/en/FileLinks#adding-external-links-to-an-entry) from an entry.
The new default removes the linked file from the entry instead of deleting the file from disk. [#3679](https://github.com/JabRef/jabref/issues/3679)

### Fixed
- We fixed the missing dot in the name of an exported file. [#3576](https://github.com/JabRef/jabref/issues/3576)
- Autocompletion in the search bar can now be disabled via the preferences. [#3598](https://github.com/JabRef/jabref/issues/3598)
- We fixed and extended the RIS import functionality to cover more fields. [#3634](https://github.com/JabRef/jabref/issues/3634) [#2607](https://github.com/JabRef/jabref/issues/2607)
- Chaining modifiers in BibTeX key pattern now works as described in the documentation. [#3648](https://github.com/JabRef/jabref/issues/3648)
- We fixed an issue where not all bibtex/biblatex fields would be exported as latex-free to MS-Office XML [koppor#284](https://github.com/koppor/jabref/issues/284)
- We fixed an issue where linked files would be deleted from bibliography entries despite choosing the "Cancel" option in the dialog menu.

### Removed
- We removed the [Look and Feels from JGoodies](http://www.jgoodies.com/freeware/libraries/looks/), because the open source version is not compatible with Java 9.
Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ You can see the result in `build\resources\main\help\en\About.html` or when clic


### When making an architectural decision
In case you add a library or do mayor code rewrites, we ask you to document your decision.
In case you add a library or do major code rewrites, we ask you to document your decision.
Recommended reading: <https://adr.github.io/>.

We simply ask to create a new markdown file in `docs/adr` following the template presented at <https://adr.github.io/madr/>.
Expand Down
2 changes: 0 additions & 2 deletions DEVELOPERS
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
Oliver Kopp (since 2011)
Simon Harrer (since 2014)
Jörg Lenhard (since 2015)
Stefan Kolb (since 2015)
Matthias Geiger (since 2015)
Oscar Gustafsson (since 2015)
Tobias Diez (since 2015)
Christoph Schwentker (since 2016)
Linus Dietz (since 2017)
16 changes: 8 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Stay on top of your literature: JabRef helps you to collect and organize sources
## Features

JabRef is a cross-platform application that works on Windows, Linux and Mac OS X. It is available free of charge and is actively developed.
JabRef supports you every step of your research work.
JabRef supports you in every step of your research work.

#### Collect

Expand All @@ -21,7 +21,7 @@ JabRef supports you every step of your research work.
- Easily retrieve and link full-text articles
- Fetch complete bibliographic information based on ISBN, DOI, PubMed-ID and arXiv-ID
- Extract metadata from PDFs
- [Firefox Add-on](https://addons.mozilla.org/en-US/firefox/addon/jabfox/) that lets you import new references directly from the browser with one click
- [JabFox Firefox Add-on](https://addons.mozilla.org/en-US/firefox/addon/jabfox/) lets you import new references directly from the browser with one click

#### Organize

Expand All @@ -32,21 +32,21 @@ JabRef supports you every step of your research work.
- Customize and add new metadata fields or reference types
- Find and merge duplicates
- Attach related documents: 20 different kinds of documents supported out of the box, completely customizable and extendable
- Automatically rename and moves associated documents according to customizable rules
- Automatically rename and move associated documents according to customizable rules
- Keep track of what you read: ranking, priority, printed, quality-assured

#### Cite

- Native [BibTeX] and [Biblatex] support
- Cite-as-you-write functionality for external applications such as Emacs, Kile, LyX, Texmaker, TeXstudio, Vim and WinEdt.
- Format references in one of the many thousand built-in citation styles or create your own style
- Support for Word and LibreOffice/OpenOffice to insert and format citations
- Support for Word and LibreOffice/OpenOffice for inserting and formatting citations

#### Share

- Many built-in export options or create your own export format
- Library is saved as a simple text file and thus easy to share with others via Dropbox and is version-control friendly
- Work in a team: sync the contents of your library with a SQL database
- Library is saved as a simple text file and thus it is easy to share with others via Dropbox and is version-control friendly
- Work in a team: sync the contents of your library via a SQL database

## Installation

Expand All @@ -70,9 +70,9 @@ Try to double click the `jar` file or execute the following command:
We are thankful for any bug reports or other feedback.
If you have ideas for new features you want to be included in JabRef, [tell us in our forum](http://discourse.jabref.org/c/features)!
If you need support in using JabRef, please read [the documentation](https://help.jabref.org/) first and have a look at our [community forum](http://discourse.jabref.org/c/help).
You can use our [GitHub issue tracker](https://github.com/JabRef/jabref/issues) to send in bug reports.
You can use our [GitHub issue tracker](https://github.com/JabRef/jabref/issues) to file bug reports.

Explanation of donation possibilities and usage of donations is available at our [donations page](https://donations.jabref.org).
An explanation of donation possibilities and usage of donations is available at our [donations page](https://donations.jabref.org).

## Contributing

Expand Down
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ dependencies {

compile 'net.java.dev.glazedlists:glazedlists_java15:1.9.1'

compile 'com.google.guava:guava:23.6-jre'
compile 'com.google.guava:guava:24.0-jre'

// JavaFX stuff
compile 'com.airhacks:afterburner.fx:1.7.0'
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/org/jabref/gui/BasePanel.java
Original file line number Diff line number Diff line change
Expand Up @@ -1510,7 +1510,7 @@ public void showAndEdit(BibEntry entry) {
entryEditor.setEntry(entry);
newEntryShowing(entry);
}
entryEditor.requestFocus();
DefaultTaskExecutor.runInJavaFXThread(() -> entryEditor.requestFocus());
adjustSplitter();
}

Expand Down
16 changes: 12 additions & 4 deletions src/main/java/org/jabref/gui/fieldeditors/LinkedFileViewModel.java
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import static javafx.scene.control.ButtonBar.ButtonData;

public class LinkedFileViewModel extends AbstractViewModel {

private static final Logger LOGGER = LoggerFactory.getLogger(LinkedFileViewModel.class);
Expand All @@ -54,15 +56,21 @@ public class LinkedFileViewModel extends AbstractViewModel {
private final BooleanProperty downloadOngoing = new SimpleBooleanProperty(false);
private final BooleanProperty isAutomaticallyFound = new SimpleBooleanProperty(false);
private final BooleanProperty canWriteXMPMetadata = new SimpleBooleanProperty(false);
private final DialogService dialogService = new FXDialogService();
private final DialogService dialogService;
private final BibEntry entry;
private final TaskExecutor taskExecutor;

public LinkedFileViewModel(LinkedFile linkedFile, BibEntry entry, BibDatabaseContext databaseContext, TaskExecutor taskExecutor) {
this(linkedFile, entry, databaseContext, taskExecutor, new FXDialogService());
}

protected LinkedFileViewModel(LinkedFile linkedFile, BibEntry entry, BibDatabaseContext databaseContext,
TaskExecutor taskExecutor, DialogService dialogService) {
this.linkedFile = linkedFile;
this.databaseContext = databaseContext;
this.entry = entry;
this.taskExecutor = taskExecutor;
this.dialogService = dialogService;

downloadOngoing.bind(downloadProgress.greaterThanOrEqualTo(0).and(downloadProgress.lessThan(100)));
canWriteXMPMetadata.setValue(!linkedFile.isOnlineLink() && linkedFile.getFileType().equalsIgnoreCase("pdf"));
Expand Down Expand Up @@ -274,14 +282,14 @@ public void moveToDefaultDirectory() {

public boolean delete() {
Optional<Path> file = linkedFile.findIn(databaseContext, Globals.prefs.getFileDirectoryPreferences());
ButtonType removeFromEntry = new ButtonType(Localization.lang("Remove from entry"));
ButtonType removeFromEntry = new ButtonType(Localization.lang("Remove from entry"), ButtonData.YES);

if (file.isPresent()) {
ButtonType deleteFromEntry = new ButtonType(Localization.lang("Delete from disk"));
Optional<ButtonType> buttonType = dialogService.showCustomButtonDialogAndWait(AlertType.INFORMATION,
Localization.lang("Delete '%0'", file.get().toString()),
Localization.lang("Delete the selected file permanently from disk, or just remove the file from the entry? Pressing Delete will delete the file permanently from disk."),
deleteFromEntry, removeFromEntry, ButtonType.CANCEL);
removeFromEntry, deleteFromEntry, ButtonType.CANCEL);

if (buttonType.isPresent()) {
if (buttonType.get().equals(removeFromEntry)) {
Expand All @@ -304,7 +312,7 @@ public boolean delete() {
} else {
LOGGER.warn("Could not find file " + linkedFile.getLink());
}
return true;
return false;
}

public void edit() {
Expand Down
Loading

0 comments on commit 866e07d

Please sign in to comment.