Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master' into ooPanel
Browse files Browse the repository at this point in the history
* upstream/master: (30 commits)
  Update README.md (#4419)
  Fix generate bibtex key overwrite warning dialog (#4418)
  Fix group hit counter when adding entries (#4413)
  Update README.md
  fix java.nio.file.FileSystemNotFoundException and reorganize code (#4416)
  fixed an issue where corresponding groups are sometimes not highlighted when clicking on entries (#4404)
  Add a few journal abbreviations (#4412)
  Fix display of radio buttons (#4411)
  Update issue templates
  Delete ISSUE_TEMPLATE.md
  Update issue templates
  Integrate mrdlib redesign (#4361)
  fix "save" button in preference dialog not response (#4406)
  show dialog before creating entry (#4405)
  Scrollbar invisible in Preferences -> BibTex Key Pattern (#4287) (#4398)
  Updates (#4402)
  Fixes for all mods exporter tests (#4396)
  Fix EntryType dialog not closed after generate button (#4390)
  Make rank image narrower (#4395)
  Fix showing multiple icons for one menu entry - fixes #4384 (#4392)
  ...
  • Loading branch information
Siedlerchr committed Oct 27, 2018
2 parents cd7fdcb + aeea809 commit 3a7ef14
Show file tree
Hide file tree
Showing 297 changed files with 2,058 additions and 2,840 deletions.
26 changes: 0 additions & 26 deletions .github/ISSUE_TEMPLATE.md

This file was deleted.

32 changes: 32 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
---
name: Bug report
about: Create a report to help us improve

---

<!--
Note: Please use the GitHub issue tracker only for bug reports.
Feature requests, questions and general feedback is now handled at http://discourse.jabref.org.
Thanks!
-->

JabRef version <!-- version as shown in the about box --> on <!-- Windows 10|Ubuntu 14.04|Mac OS X 10.8|... -->
<!-- Hint: If you use a development version (available at http://builds.jabref.org/master/), ensure that you use the latest one. -->
- [ ] I have tested the latest development version from http://builds.jabref.org/master/ and the problem persists

<!-- Add a clear and concise description of what the bug is. -->

Steps to reproduce the behavior:
1. ...
2. ...
3. ...

<!-- If applicable, add excerpt of the bibliography file, screenshot, and excerpt of log (available in the error console) -->

<details>
<summary>Log File</summary>

```
Paste an excerpt of your log file here
```
</details>
9 changes: 9 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
name: Feature request
about: Suggest an idea for this project

---

Please use the GitHub issue tracker only for bug reports and suggestions for improvements.
Feature requests, questions and general feedback is now handled at http://discourse.jabref.org.
Thanks!
9 changes: 9 additions & 0 deletions .github/ISSUE_TEMPLATE/question.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
name: Question
about: Ask a question about JabRef

---

Please use the GitHub issue tracker only for bug reports and suggestions for improvements.
Feature requests, questions and general feedback is now handled at http://discourse.jabref.org.
Thanks!
20 changes: 20 additions & 0 deletions .github/ISSUE_TEMPLATE/suggestion-for-improvement.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
name: Suggestion for improvement
about: Suggest an enhancement

---

<!--
Please use the GitHub issue tracker only for bug reports and smaller suggestions for improvements.
Requests for completely new features, questions and general feedback is now handled at http://discourse.jabref.org.
Thanks!
-->

**Is your suggestion for improvement related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

**Describe the solution you'd like**
A clear and concise description of what you want to happen.

**Additional context**
Add any other context or screenshots about the feature request here.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ before_script:
script:
# --scan enables the Gradle build scan, which can be used to investigate the time each action consumes
# For more information see https://gradle.com/scans/get-started
- if [ "$TEST_SUITE" != "guiTest" ] && [ "$TEST_SUITE" != "checkstyle" ] && [ "$TEST_SUITE" != "codecov" ]; then ./gradlew $TEST_SUITE $OPTIONS --scan; fi
- if [ "$TEST_SUITE" != "guiTest" ] && [ "$TEST_SUITE" != "checkstyle" ] && [ "$TEST_SUITE" != "codecov" ]; then ./gradlew $TEST_SUITE $OPTIONS -x checkstyleJmh -x checkstyleMain -x checkstyleTest --scan; fi
- if [ "$TEST_SUITE" == "checkstyle" ]; then ./gradlew checkstyleMain checkstyleTest checkstyleJmh; fi
- if [ "$TEST_SUITE" == "guiTest" ]; then ./buildres/gui-tests.sh; fi
- if [ "$TEST_SUITE" == "codecov" ]; then ./gradlew jacocoTestReport; bash <(curl -s https://codecov.io/bash); fi
Expand Down
5 changes: 4 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,16 @@ We refer to [GitHub issues](https://github.com/JabRef/jabref/issues) by using `#
- We add auto url formatting when user paste link to URL field in entry editor. [#254](https://github.com/koppor/jabref/issues/254)
- We added a minimal height for the entry editor so that it can no longer be hidden by accident. [#4279](https://github.com/JabRef/jabref/issues/4279)
- We added a new keyboard shortcut so that the entry editor could be closed by <kbd>Ctrl<kbd> + <kbd>E<kbd>. [#4222] (https://github.com/JabRef/jabref/issues/4222)

- We added an option in the preference dialog box, that allows user to pick the dark or light theme option. [#4130] (https://github.com/JabRef/jabref/issues/4130)
- We updated updated the Related Articles tab to accept JSON from the new version of the Mr. DLib service






### Fixed
- We fixed an issue where corresponding groups are sometimes not highlighted when clicking on entries [#3112](https://github.com/JabRef/jabref/issues/3112)
- We fixed an issue where custom exports could not be selected in the 'Export (selected) entries' dialog [#4013](https://github.com/JabRef/jabref/issues/4013)
- Italic text is now rendered correctly. https://github.com/JabRef/jabref/issues/3356
- The entry editor no longer gets corrupted after using the source tab. https://github.com/JabRef/jabref/issues/3532 https://github.com/JabRef/jabref/issues/3608 https://github.com/JabRef/jabref/issues/3616
Expand All @@ -59,6 +61,7 @@ We refer to [GitHub issues](https://github.com/JabRef/jabref/issues) by using `#
- We fixed an issue where the order of fields in customized entry types was not saved correctly. [#4033](http://github.com/JabRef/jabref/issues/4033)
- We fixed an issue where the groups tree of the last database was still shown even after the database was already closed.
- We fixed an issue where the "Open file dialog" may disappear behind other windows. https://github.com/JabRef/jabref/issues/3410
- We fixed an issue where the number of entries matched was not updated correctly upon adding or removing an entry. [#3537](https://github.com/JabRef/jabref/issues/3537)
- We fixed an issue where the default icon of a group was not colored correctly.
- We fixed an issue where the first field in entry editor was not focused when adding a new entry. [#4024](https://github.com/JabRef/jabref/issues/4024)
- We reworked the "Edit file" dialog to make it resizeable and improved the workflow for adding and editing files https://github.com/JabRef/jabref/issues/2970
Expand Down
4 changes: 1 addition & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -101,9 +101,7 @@ When you want to develop, it is necessary to generate additional sources using `
and then generate the Eclipse `gradlew eclipse`.
For IntelliJ IDEA, just import the project via a Gradle Import by pointing at the `build.gradle`.

`gradlew test` executes the normal unit tests.
If you want to test the UI, execute `gradlew integrationTest`.
Sources for the integration test are kept in `src/integrationTest`.
`gradlew test` executes all tests. We use [Travis CI](https://travis-ci.org/) for executing the tests after each commit. For developing, it is sufficient to locally only run the associated test for the classes you changed. Travis will report any other failure.


## Acknowledgements
Expand Down
29 changes: 15 additions & 14 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ buildscript {

plugins {
id 'com.gradle.build-scan' version '1.16'
id 'com.install4j.gradle' version '7.0.7'
id 'com.github.johnrengelman.shadow' version '4.0.0'
id 'com.install4j.gradle' version '7.0.8'
id 'com.github.johnrengelman.shadow' version '2.0.4'
id "de.sebastianboegl.shadow.transformer.log4j" version "2.1.1"
id "com.simonharrer.modernizer" version '1.6.0-1'
id 'me.champeau.gradle.jmh' version '0.4.7'
Expand Down Expand Up @@ -119,13 +119,13 @@ dependencies {
antlr4 'org.antlr:antlr4:4.7.1'
compile 'org.antlr:antlr4-runtime:4.7.1'

compile 'mysql:mysql-connector-java:8.0.12'
compile 'mysql:mysql-connector-java:8.0.13'

compile 'org.postgresql:postgresql:42.2.5'

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

compile 'com.google.guava:guava:26.0-jre'
compile 'com.google.guava:guava:27.0-jre'

// JavaFX stuff
compile 'de.jensd:fontawesomefx-materialdesignfont:1.7.22-4'
Expand Down Expand Up @@ -168,7 +168,7 @@ dependencies {
testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.3.1'
testRuntimeOnly 'org.junit.vintage:junit-vintage-engine:5.3.1'
testCompile 'org.junit.platform:junit-platform-launcher:1.3.1'
testCompile 'org.junit-pioneer:junit-pioneer:0.2.1'
testCompile 'org.junit-pioneer:junit-pioneer:0.2.2'
testRuntime 'org.apache.logging.log4j:log4j-core:2.11.1'
testRuntime 'org.apache.logging.log4j:log4j-jul:2.11.1'
testCompile 'org.mockito:mockito-core:2.23.0'
Expand All @@ -177,11 +177,12 @@ dependencies {
testCompile 'org.reflections:reflections:0.9.11'
testCompile 'org.xmlunit:xmlunit-core:2.6.2'
testCompile 'org.xmlunit:xmlunit-matchers:2.6.2'
testCompile 'com.tngtech.archunit:archunit-junit:0.8.3'
testCompile 'com.tngtech.archunit:archunit-junit5-api:0.9.1'
testRuntime 'com.tngtech.archunit:archunit-junit5-engine:0.9.1'
testCompile "org.testfx:testfx-core:4.0.+"
testCompile "org.testfx:testfx-junit5:4.0.+"

checkstyle 'com.puppycrawl.tools:checkstyle:8.13'
checkstyle 'com.puppycrawl.tools:checkstyle:8.14'
}

jacoco {
Expand All @@ -203,6 +204,11 @@ dependencyUpdates.resolutionStrategy = {
selection.reject("Ignore SNAPSHOT releases")
}
}
rules.withModule("com.gradle.build-scan:com.gradle.build-scan.gradle.plugin") { ComponentSelection selection ->
if (selection.candidate.version ==~ /2.*/) {
selection.reject("Cannot be upgraded to version 2 until we upgrade to gradle 5")
}
}
rules.withModule("org.controlsfx:controlsfx") { ComponentSelection selection ->
if (selection.candidate.version ==~ /9.*/) { // Reject version 9 or higher
selection.reject("Cannot be updated to 9.*.* until Jabref works with Java 9")
Expand All @@ -215,8 +221,8 @@ dependencyUpdates.resolutionStrategy = {
}
}
rules.withModule("com.github.johnrengelman.shadow:com.github.johnrengelman.shadow.gradle.plugin") { ComponentSelection selection ->
if (selection.candidate.version == /4.0.1/) {
selection.reject("Version 4.0.1 breaks the release process.")
if (selection.candidate.version ==~ /4.*/) {
selection.reject("Version 4.X breaks the release process.")
}
}
rules.withModule("de.jensd:fontawesomefx-materialdesignfont") { ComponentSelection selection ->
Expand Down Expand Up @@ -402,12 +408,7 @@ jacocoTestReport {

// Code quality tasks
checkstyle {
// do not use other packages for checkstyle, excluding gen(erated) sources
checkstyleMain.source = "src/main/java"
toolVersion = '8.5'

// do not perform checkstyle checks by default
sourceSets = []
}

modernizer {
Expand Down
1 change: 0 additions & 1 deletion config/checkstyle/suppressions.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,4 @@

<suppressions>
<suppress checks="[a-zA-Z0-9]*" files="[\\/]gen[\\/]" />
<suppress checks="[a-zA-Z0-9]*" files="[\\/]test[\\/]" />
</suppressions>
4 changes: 2 additions & 2 deletions src/main/java/org/jabref/Globals.java
Original file line number Diff line number Diff line change
Expand Up @@ -75,11 +75,11 @@ public static synchronized KeyBindingRepository getKeyPrefs() {
}

// Background tasks
public static void startBackgroundTasks() {
public static void startBackgroundTasks() throws JabRefException {
Globals.fileUpdateMonitor = new DefaultFileUpdateMonitor();
JabRefExecutorService.INSTANCE.executeInterruptableTask(Globals.fileUpdateMonitor, "FileUpdateMonitor");

themeLoader = new ThemeLoader(fileUpdateMonitor);
themeLoader = new ThemeLoader(fileUpdateMonitor, prefs);

if (Globals.prefs.shouldCollectTelemetry() && !GraphicsEnvironment.isHeadless()) {
startTelemetryClient();
Expand Down
27 changes: 25 additions & 2 deletions src/main/java/org/jabref/gui/Base.css
Original file line number Diff line number Diff line change
Expand Up @@ -247,6 +247,7 @@
-fx-underline: false;
-fx-border-style: null;
-fx-border-color: null;
-fx-text-fill: -jr-theme;
}

.hyperlink:visited {
Expand Down Expand Up @@ -390,12 +391,32 @@
}

.check-box > .box > .mark {
-fx-background-color: white;
-fx-background-color: -fx-control-inner-background;
-fx-padding: 0.2em 0.2em 0.2em 0.2em;
-fx-shape: "M6.61 11.89L3.5 8.78 2.44 9.84 6.61 14l8.95-8.95L14.5 4z";
-fx-stroke-width: 5;
}

.radio-button > .radio {
-fx-background-radius: 1.0em; /* large value to make sure this remains circular */
-fx-padding: 0.35em; /* padding from outside edge to the inner dot */
-fx-background-color: rgba(0, 0, 0, 0.54), -fx-control-inner-background;
-fx-background-insets: 0, 2px;
}

.radio-button:selected > .radio {
-fx-background-color: -jr-checked, -fx-background;
}

.radio-button > .radio > .dot {
-fx-padding: 0.25em; /* radius of the inner dot when selected */
-fx-background-insets: 0;
}

.radio-button:selected > .radio > .dot {
-fx-background-color: -jr-checked;
}

.menu-bar {
-fx-background-color: -jr-menu-background;
-fx-background-insets: 0;
Expand Down Expand Up @@ -667,6 +688,7 @@
-fx-background-radius: 0em;
}


.scroll-bar:horizontal .thumb,
.scroll-bar:vertical .thumb {
-fx-background-color: -jr-scrollbar-thumb;
Expand Down Expand Up @@ -714,7 +736,8 @@
.tree-view:hover .scroll-bar,
.table-view:hover .scroll-bar,
.tree-table-view:hover .scroll-bar,
.text-input:hover .scroll-bar {
.text-input:hover .scroll-bar,
.scroll-pane:hover .scroll-bar {
-fx-opacity: 1;
}

Expand Down
7 changes: 7 additions & 0 deletions src/main/java/org/jabref/gui/EntryTypeView.java
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,13 @@ public EntryTypeView(BasePanel basePanel, DialogService dialogService, JabRefPre

btnGenerate.textProperty().bind(EasyBind.map(viewModel.searchingProperty(), searching -> (searching) ? Localization.lang("Searching...") : Localization.lang("Generate")));
btnGenerate.disableProperty().bind(viewModel.searchingProperty());

EasyBind.subscribe(viewModel.searchSuccesfulProperty(), value -> {
if (value) {
setEntryTypeForReturnAndClose(null);
}
});

}

private void addEntriesToPane(FlowPane pane, Collection<? extends EntryType> entries) {
Expand Down
10 changes: 9 additions & 1 deletion src/main/java/org/jabref/gui/EntryTypeViewModel.java
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ public class EntryTypeViewModel {

private final JabRefPreferences prefs;
private final BooleanProperty searchingProperty = new SimpleBooleanProperty();
private final BooleanProperty searchSuccesfulProperty = new SimpleBooleanProperty();
private final ObjectProperty<IdBasedFetcher> selectedItemProperty = new SimpleObjectProperty<>();
private final ListProperty<IdBasedFetcher> fetchers = new SimpleListProperty<>(FXCollections.observableArrayList());
private final StringProperty idText = new SimpleStringProperty();
Expand All @@ -53,6 +54,10 @@ public EntryTypeViewModel(JabRefPreferences preferences, BasePanel basePanel, Di

}

public BooleanProperty searchSuccesfulProperty() {
return searchSuccesfulProperty;
}

public BooleanProperty searchingProperty() {
return searchingProperty;
}
Expand Down Expand Up @@ -110,6 +115,7 @@ protected Optional<BibEntry> call() throws InterruptedException, FetcherExceptio
}

public void runFetcherWorker() {
searchSuccesfulProperty.set(false);
fetcherWorker.run();
fetcherWorker.setOnFailed(event -> {
Throwable exception = fetcherWorker.getException();
Expand All @@ -124,7 +130,9 @@ public void runFetcherWorker() {
LOGGER.error(String.format("Exception during fetching when using fetcher '%s' with entry id '%s'.", searchId, fetcher), exception);

searchingProperty.set(false);

fetcherWorker = new FetcherWorker();

});

fetcherWorker.setOnSucceeded(evt -> {
Expand All @@ -143,8 +151,8 @@ public void runFetcherWorker() {
new BibtexKeyGenerator(basePanel.getBibDatabaseContext(), prefs.getBibtexKeyPatternPreferences()).generateAndSetKey(bibEntry);
basePanel.insertEntry(bibEntry);
}
searchSuccesfulProperty.set(true);

// close();
} else if (StringUtil.isBlank(idText.getValue())) {
dialogService.showWarningDialogAndWait(Localization.lang("Empty search ID"), Localization.lang("The given search ID was empty."));
}
Expand Down
Loading

0 comments on commit 3a7ef14

Please sign in to comment.