Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master' into customizeEntrydlg
Browse files Browse the repository at this point in the history
* upstream/master:
  Bump unirest-java from 3.4.00 to 3.4.01 (#5874)
  Bump junit-vintage-engine from 5.5.2 to 5.6.0 (#5875)
  Bump checkstyle from 8.28 to 8.29 (#5876)
  Bump junit-jupiter from 5.5.2 to 5.6.0 (#5877)
  Bump junit-platform-launcher from 1.5.2 to 1.6.0 (#5878)
  Change \ to /
  Bump byte-buddy-parent from 1.10.6 to 1.10.7 (#5873)
  Fix opening pdf with okular in linux (#5253) (#5855)
  • Loading branch information
Siedlerchr committed Jan 28, 2020
2 parents 11c3b3d + 3579d3d commit a644a3f
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 9 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ We refer to [GitHub issues](https://github.com/JabRef/jabref/issues) by using `#

### Fixed

- We fixed and issue where pdf files will not open under some KDE linux distributions when using okular. [#5253](https://github.com/JabRef/jabref/issues/5253)
- We fixed an issue where the Medline fetcher was only working when JabRef was running from source. [#5645](https://github.com/JabRef/jabref/issues/5645)
- We fixed some visual issues in the dark theme. [#5764](https://github.com/JabRef/jabref/pull/5764) [#5753](https://github.com/JabRef/jabref/issues/5753)
- We fixed an issue where non-default previews didn't handle unicode characters. [#5779](https://github.com/JabRef/jabref/issues/5779)
Expand Down
12 changes: 6 additions & 6 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ dependencies {
compile 'org.controlsfx:controlsfx:11.0.1'

compile 'org.jsoup:jsoup:1.12.1'
compile 'com.konghq:unirest-java:3.4.00'
compile 'com.konghq:unirest-java:3.4.01'

compile 'org.slf4j:slf4j-api:2.0.0-alpha1'
compile group: 'org.apache.logging.log4j', name: 'log4j-jcl', version: '3.0.0-SNAPSHOT'
Expand Down Expand Up @@ -207,11 +207,11 @@ dependencies {


testCompile 'io.github.classgraph:classgraph:4.8.60'
testImplementation 'org.junit.jupiter:junit-jupiter:5.5.2'
testRuntimeOnly 'org.junit.vintage:junit-vintage-engine:5.5.2'
testCompile 'org.junit.platform:junit-platform-launcher:1.5.2'
testImplementation 'org.junit.jupiter:junit-jupiter:5.6.0'
testRuntimeOnly 'org.junit.vintage:junit-vintage-engine:5.6.0'
testCompile 'org.junit.platform:junit-platform-launcher:1.6.0'

testCompile 'net.bytebuddy:byte-buddy-parent:1.10.6'
testCompile 'net.bytebuddy:byte-buddy-parent:1.10.7'
testRuntime group: 'org.apache.logging.log4j', name: 'log4j-core', version: '3.0.0-SNAPSHOT'
testRuntime group: 'org.apache.logging.log4j', name: 'log4j-jul', version: '3.0.0-SNAPSHOT'
testCompile 'org.mockito:mockito-core:3.2.4'
Expand All @@ -224,7 +224,7 @@ dependencies {
testCompile "org.testfx:testfx-junit5:4.0.17-alpha-SNAPSHOT"
testCompile "org.hamcrest:hamcrest-library:2.2"

checkstyle 'com.puppycrawl.tools:checkstyle:8.28'
checkstyle 'com.puppycrawl.tools:checkstyle:8.29'
xjc group: 'org.glassfish.jaxb', name: 'jaxb-xjc', version: '2.3.2'
jython 'org.python:jython-standalone:2.7.1'
}
Expand Down
2 changes: 1 addition & 1 deletion docs/guidelines-for-setting-up-a-local-workspace.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ Under Ubuntu Linux, you can follow the [documentation from the Ubuntu Community]
--add-exports javafx.web/com.sun.webkit=org.controlsfx.controls
--add-exports javafx.graphics/com.sun.javafx.css=org.controlsfx.controls
--add-exports javafx.controls/com.sun.javafx.scene.control.behavior=com.jfoenix
--patch-module org.jabref=build\resources\main
--patch-module org.jabref=build/resources/main
```
4. Optional: Use IntellJ to build and run (instead of gradle): File -> Settings -> Build, Execution, Deployment -> Build Tools -> Gradle -> Under "Build and run using" and "Run tests using" choose "Intellj IDEA"
5. Use the provided code style:
Expand Down
21 changes: 19 additions & 2 deletions src/main/java/org/jabref/gui/desktop/os/Linux.java
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,15 @@
import org.jabref.gui.externalfiletype.ExternalFileTypes;
import org.jabref.preferences.JabRefPreferences;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import static org.jabref.preferences.JabRefPreferences.ADOBE_ACROBAT_COMMAND;
import static org.jabref.preferences.JabRefPreferences.USE_PDF_READER;

public class Linux implements NativeDesktop {
private static final Logger LOGGER = LoggerFactory.getLogger(Linux.class);

@Override
public void openFile(String filePath, String fileType) throws IOException {
Optional<ExternalFileType> type = ExternalFileTypes.getInstance().getExternalFileTypeByExt(fileType);
Expand All @@ -30,7 +35,13 @@ public void openFile(String filePath, String fileType) throws IOException {
viewer = "xdg-open";
}
String[] cmdArray = { viewer, filePath };
Runtime.getRuntime().exec(cmdArray);
Process p = Runtime.getRuntime().exec(cmdArray);
// When the stream is full at some point, then blocks the execution of the program
// See https://stackoverflow.com/questions/10981969/why-is-going-through-geterrorstream-necessary-to-run-a-process.
BufferedReader in = new BufferedReader(new InputStreamReader(p.getErrorStream()));
String line;
line = in.readLine();
LOGGER.debug("Received output: " + line);
}

@Override
Expand All @@ -46,7 +57,13 @@ public void openFileWithApplication(String filePath, String application) throws
String[] cmdArray = new String[openWith.length + 1];
System.arraycopy(openWith, 0, cmdArray, 0, openWith.length);
cmdArray[cmdArray.length - 1] = filePath;
Runtime.getRuntime().exec(cmdArray);
Process p = Runtime.getRuntime().exec(cmdArray);
// When the stream is full at some point, then blocks the execution of the program
// See https://stackoverflow.com/questions/10981969/why-is-going-through-geterrorstream-necessary-to-run-a-process.
BufferedReader in = new BufferedReader(new InputStreamReader(p.getErrorStream()));
String line;
line = in.readLine();
LOGGER.debug("Received output: " + line);
}

@Override
Expand Down

0 comments on commit a644a3f

Please sign in to comment.