Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master' into sharelatex
Browse files Browse the repository at this point in the history
* upstream/master:
  Add preference migration for keybdingings (#3007)
  Shutdown previus AutosaveManager and BackupManager during SaveAs  (#2994)
  Run Checkstyle task after Test task (#3010)
  Mark LibraryOfCongressTest as a fetcher test (#3012)
  When browsing through the MainTable remember which EntryEditor tab was open (#3011)
  Improve performance of journal abbreviation loader (#3009)
  Update checkstyle 7.6.1 -> 8.0
  Don't abort build when there are checkstyle violations (#3006)
  Reimplement content selectors (#3003)
  Only do a back up for bigger changes or if a different field is edited (#3004)
  Listen to change events for setting dirty status of database (#3001)
  Fix #2967: MathSciNet tab works again
  Fix #2902: Tab in entry editor moves to next text area
  Fix #2946: external changes are now correctly shown in the entry editor
  Fix #2998: improve auto completion (#3002)
  Fix mac keybinding by replacing ctrl it with meta key (#3000)
  Less backups (#2995)
  [WIP] Complete rework of the auto completion (#2965)
  • Loading branch information
Siedlerchr committed Jul 15, 2017
2 parents 0386bfd + ad9ca95 commit 6512fc6
Show file tree
Hide file tree
Showing 130 changed files with 2,334 additions and 3,677 deletions.
5 changes: 4 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ We refer to [GitHub issues](https://github.com/JabRef/jabref/issues) by using `#
- The buttons were changed to icons.
- Completely new interface to add or modify linked files.
- Removed the hidden feature that a double click in the editor inserted the current date.
- Complete new implementation of the the auto complete feature.
- All authors and editors are separated using semicolons when exporting to csv. [#2762](https://github.com/JabRef/jabref/issues/2762)
- Improved wording of "Show recommendations: into "Show 'Related Articles' tab" in the preferences
- We added integration of the Library of Congress catalog as a fetcher based on the [LCCN identifier](https://en.wikipedia.org/wiki/Library_of_Congress_Control_Number). [Feature request 636 in the forum](http://discourse.jabref.org/t/loc-marc-mods-connection/636)
Expand All @@ -29,6 +30,7 @@ We refer to [GitHub issues](https://github.com/JabRef/jabref/issues) by using `#
- We improved the duplicate checker such that different editions of the same publication are not marked as duplicates. [2960](https://github.com/JabRef/jabref/issues/2960)

### Fixed
- We fixed a bug that leaves .sav file after SaveAs [#2947](https://github.com/JabRef/jabref/issues/2947)
- We fixed the function "Edit - Copy BibTeX key and link" to pass a hyperlink rather than an HTML statement.
- We fixed the adding of a new entry from DOI which led to a connection error. The DOI resolution now uses HTTPS to protect the user's privacy.[#2879](https://github.com/JabRef/jabref/issues/2897)
- We fixed the IEEE Xplore web search functionality [#2789](https://github.com/JabRef/jabref/issues/2789)
Expand All @@ -42,7 +44,8 @@ We refer to [GitHub issues](https://github.com/JabRef/jabref/issues) by using `#
- We fixed a bug where recursive RegExpBased search found a file in a subdirectory multiple times and non-recursive RegExpBased search erroneously found files in subdirectories.
- We fixed a bug where new groups information was not stored on save [#2932](https://github.com/JabRef/jabref/issues/2932)
- We fixed a bug where the language files for Brazilian Portugese could not be loaded and the GUI localization remained in English [#1128](https://github.com/JabRef/jabref/issues/1182)

- We fixed a bug where the database was not marked as dirty when entries or groups were changed [#2787](https://github.com/JabRef/jabref/issues/2787)
- We restored the original functionality that when browsing through the MainTable, the Entry Editor remembers which tab was opened before [#2896](https://github.com/JabRef/jabref/issues/2896)
### Removed


Expand Down
5 changes: 4 additions & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -398,9 +398,12 @@ task media(type: com.install4j.gradle.Install4jTask, dependsOn: "releaseJar") {
checkstyle {
// do not use other packages for checkstyle, excluding gen(erated) sources
checkstyleMain.source = "src/main/java"
toolVersion = '7.6.1'
toolVersion = '8.0'
}

checkstyleMain.shouldRunAfter test
checkstyleTest.shouldRunAfter test

task release(dependsOn: ["media", "releaseJar"]) {
group = 'JabRef - Release'
description 'Creates a release for all target platforms.'
Expand Down
1 change: 1 addition & 0 deletions src/main/java/org/jabref/JabRefMain.java
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ private static void start(String[] args) {
PreferencesMigrations.upgradeFaultyEncodingStrings();
PreferencesMigrations.upgradeLabelPatternToBibtexKeyPattern();
PreferencesMigrations.upgradeStoredCustomEntryTypes();
PreferencesMigrations.upgradeKeyBindingsToJavaFX();

// Update handling of special fields based on preferences
InternalBibtexFields
Expand Down
28 changes: 13 additions & 15 deletions src/main/java/org/jabref/collab/FileUpdateMonitor.java
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,19 @@ public class FileUpdateMonitor implements Runnable {
private static final Log LOGGER = LogFactory.getLog(FileUpdateMonitor.class);

private static final int WAIT = 4000;

private int numberOfUpdateListener;
private final Map<String, Entry> entries = new HashMap<>();
private int numberOfUpdateListener;

private static synchronized Path getTempFile() {
Path temporaryFile = null;
try {
temporaryFile = Files.createTempFile("jabref", null);
temporaryFile.toFile().deleteOnExit();
} catch (IOException ex) {
LOGGER.warn("Could not create temporary file.", ex);
}
return temporaryFile;
}

@Override
public void run() {
Expand Down Expand Up @@ -119,7 +129,7 @@ public void updateTimeStamp(String key) {
* is used for comparison with the changed on-disk version.
* @param key String The handle for this monitor.
* @throws IllegalArgumentException If the handle doesn't correspond to an entry.
* @return File The temporary file.
* @return Path The temporary file.
*/
public Path getTempFile(String key) throws IllegalArgumentException {
Entry entry = entries.get(key);
Expand All @@ -129,7 +139,6 @@ public Path getTempFile(String key) throws IllegalArgumentException {
return entry.getTmpFile();
}


/**
* A class containing the File, the FileUpdateListener and the current time stamp for one file.
*/
Expand Down Expand Up @@ -209,15 +218,4 @@ public void decreaseTimeStamp() {
timeStamp--;
}
}

private static synchronized Path getTempFile() {
Path temporaryFile = null;
try {
temporaryFile = Files.createTempFile("jabref", null);
temporaryFile.toFile().deleteOnExit();
} catch (IOException ex) {
LOGGER.warn("Could not create temporary file.", ex);
}
return temporaryFile;
}
}
Loading

0 comments on commit 6512fc6

Please sign in to comment.