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

[WIP] First attempt for JDK11 compilation - #Java11 #3421

Merged
merged 132 commits into from
Aug 25, 2019
Merged
Show file tree
Hide file tree
Changes from 12 commits
Commits
Show all changes
132 commits
Select commit Hold shift + click to select a range
f634394
First attempt at jdk9 compilation
Siedlerchr Nov 9, 2017
9f71a0b
Add open office dependencies
lenhard Dec 11, 2017
aaf6275
set java to 9 instead of 1.9
Siedlerchr Dec 27, 2017
7227a23
remove jgoodies, update controlsfx to 9
Siedlerchr Jan 20, 2018
111a407
JDK 9 Runnable
florian-beetz Mar 15, 2018
4a8f9c8
ResourceBundle.Control is no longer supported in Java 9
florian-beetz Mar 18, 2018
1d78d6e
Fixed the JSR305 problem
florian-beetz Mar 24, 2018
a44be12
Upgraded arch unit to new SNAPSHOT
florian-beetz Apr 12, 2018
f27d312
Upgraded Application Insights to 1.0.10
florian-beetz Apr 16, 2018
102e614
Fix jabref module
florian-beetz May 4, 2018
dc7411d
Cleanup after rebase on maintable-beta
florian-beetz May 4, 2018
3aaae4d
Merge remote-tracking branch 'upstream/maintable-beta' into jdk9
Siedlerchr May 5, 2018
6608b2b
Remove usage of transitive dependency on Apache Commons
florian-beetz May 5, 2018
1db6336
Add button-icon for union/intersection in the groups side panel (#3954)
Siedlerchr May 6, 2018
164bb30
Reimplement tooltips for file and identifier columns (#4011)
florian-beetz May 7, 2018
1c8d38a
Add afterburner.fx injector to module descriptor
florian-beetz May 8, 2018
bcfde56
Identify illegal reflective access
florian-beetz May 15, 2018
9980c74
Merge remote-tracking branch 'upstream/maintable-beta' into jdk9
Siedlerchr May 22, 2018
cc63a74
Update CI to JDK 9
florian-beetz May 24, 2018
cb1a977
Update module.info to new Postgres driver
florian-beetz May 24, 2018
f85d3da
Downgrade ApplicationInsights to 1.0.10 for JDK 9 compatibility
florian-beetz May 24, 2018
0920af4
Merge branch 'maintable-beta' into jdk9
florian-beetz Jun 20, 2018
1cbe9ac
Add JPMS hacks to build script
florian-beetz Jun 27, 2018
f003970
Merge remote-tracking branch 'upstream/master' into jdk9
florian-beetz Jul 23, 2018
0cd8908
Merge remote-tracking branch 'upstream/master' into jdk9
florian-beetz Jul 23, 2018
88751da
Merge remote-tracking branch 'upstream/jdk9' into jdk9
florian-beetz Jul 23, 2018
85f9685
Cleanup after merge
florian-beetz Jul 23, 2018
0a54822
Merge remote-tracking branch 'upstream/master' into jdk9
Siedlerchr Jan 27, 2019
633c10c
uncomment errorprone
Siedlerchr Jan 27, 2019
61f6194
fix merge issues
florian-beetz Feb 1, 2019
6582436
add Gradle task to rebundle LibreOffice
florian-beetz Feb 1, 2019
30797c3
fix merge error in EditorTextArea
florian-beetz Feb 1, 2019
e82ebba
Merge remote-tracking branch 'upstream/master' into jdk9
Siedlerchr Apr 13, 2019
68b4585
Merge remote-tracking branch 'origin/master' into jdk9
tobiasdiez May 5, 2019
3c06ac4
remove jgoodies forms
Siedlerchr May 5, 2019
2802447
Make it work with Java 11
tobiasdiez May 5, 2019
3e43856
Merge remote-tracking branch 'origin/jdk9' into jdk9
tobiasdiez May 5, 2019
d804504
Code cleanup
tobiasdiez May 5, 2019
e6ac156
Switch to Java 11 on travis
tobiasdiez May 5, 2019
a7c7832
Make test compile
tobiasdiez May 5, 2019
2889d2e
Fix some of the tests
tobiasdiez May 5, 2019
ce15151
Update jacoco to Java 11 support
tobiasdiez May 5, 2019
f204a0c
Update bytebuddy to increase Java 11 support
tobiasdiez May 5, 2019
2585972
Fix more tests
tobiasdiez May 6, 2019
42dc592
pdate circle ci and jensd lib to 11
Siedlerchr May 6, 2019
983f1c8
Merge branch 'master' into jdk9
Siedlerchr May 6, 2019
3e9d717
Fix glyph module name
Siedlerchr May 6, 2019
b3a1056
Fix materialdesign icons
Siedlerchr May 6, 2019
5c5f2b8
Fix typo
Siedlerchr May 6, 2019
68086c4
Update materialdesingfont
Siedlerchr May 6, 2019
af1de3a
Try to fix logging
tobiasdiez May 6, 2019
84cd5fb
Merge remote-tracking branch 'origin/jdk9' into jdk9
tobiasdiez May 6, 2019
1eaa334
Fix some language tests
tobiasdiez May 6, 2019
dbf0c2a
Fix language tests
tobiasdiez May 6, 2019
ee7910e
Fix export tests
tobiasdiez May 7, 2019
e659dd3
Fix month parser
tobiasdiez May 7, 2019
35c783f
Include latex2unicode
tobiasdiez May 11, 2019
81acb91
Code style
tobiasdiez May 17, 2019
d54d6ff
Update latex2unicode
tobiasdiez Jun 3, 2019
64b12fe
Merge branch 'master' of https://github.com/JabRef/jabref into jdk9
tobiasdiez Jun 3, 2019
91dd89a
Fix gitignore
tobiasdiez Jun 3, 2019
41a4e4f
Fix export tests
tobiasdiez Jun 3, 2019
d007570
Disable test relying on reflection due to a bug in a library that we use
tobiasdiez Jun 3, 2019
b8834aa
Disable citation style test that fails for some unknown reason
tobiasdiez Jun 3, 2019
d2c4ba0
Disable citation style tests which fail for some unknown reason
tobiasdiez Jun 3, 2019
0e55458
Fix export tests...hopefully
tobiasdiez Jun 3, 2019
fc7111a
Disable other citation style tests which fail for some unknown reason
tobiasdiez Jun 3, 2019
4a4f7bf
Reenable checkstyle
tobiasdiez Jun 3, 2019
a4b7c6f
Fix modernizer errors
tobiasdiez Jun 3, 2019
4376f84
Fix checkstyle
tobiasdiez Jun 3, 2019
7018b14
Update dependencies
tobiasdiez Jun 3, 2019
cc75153
Downgrade errorprone
tobiasdiez Jun 4, 2019
eb12a5a
Disable modernizer
tobiasdiez Jun 4, 2019
16b307a
Disable modernizer also in travis
tobiasdiez Jun 4, 2019
8c3751e
First try with jlink
tobiasdiez Jun 4, 2019
3d92017
fix jlink task (#5032)
siordache Jun 5, 2019
3b663c2
Add jpackage
tobiasdiez Jun 5, 2019
da79fba
Add a bit of description
tobiasdiez Jun 6, 2019
11039d8
update eclipse gradle to add dependencies to module path
Siedlerchr Jun 9, 2019
666f1f3
Merge remote-tracking branch 'upstream/master' into jdk9
Siedlerchr Jul 6, 2019
2669150
uncomment deps
Siedlerchr Jul 6, 2019
4d20032
Try to fix build
tobiasdiez Jul 7, 2019
5c414f2
Merge remote-tracking branch 'origin/master' into jdk9
koppor Jul 13, 2019
24edd57
Fix .gitignore
koppor Jul 13, 2019
8a71667
Set version to JDK 11 (and remove white trailing white spaces and dou…
koppor Jul 13, 2019
328563e
Update gradle from 5.3.1 to 5.5.1
koppor Jul 13, 2019
086036a
Add Java 11 to README.md
koppor Jul 13, 2019
f9187f7
Update install4j from 7 to 8
koppor Jul 14, 2019
920a130
Merge remote-tracking branch 'origin/master' into jdk9
koppor Jul 20, 2019
8933771
include all modules
koppor Jul 23, 2019
655a775
add file association to MacOSX
koppor Jul 23, 2019
ec855f4
JabRef is dpiAware (with JavaFX)
koppor Jul 23, 2019
d172987
update Install4J from 8.0 to 8.0.1
koppor Jul 23, 2019
6174c73
update install4j config to 8.0.1
koppor Jul 23, 2019
bac9895
try to enumarate modules
koppor Jul 24, 2019
1431d78
Merge remote-tracking branch 'origin/master' into jdk9
koppor Jul 24, 2019
4361451
Remove apache commons exception
Siedlerchr Jul 24, 2019
610765f
remove parser exception
Siedlerchr Jul 24, 2019
1b415ba
Remove old junit 4
tobiasdiez Jul 24, 2019
f2f2ad0
revert exception removal
Siedlerchr Jul 24, 2019
9d09ec7
Try to fix test build
tobiasdiez Jul 25, 2019
8d287ae
Fix build by keep using junit 5.4.2
tobiasdiez Jul 25, 2019
c82340f
Upgrade to junit 5.5
tobiasdiez Jul 25, 2019
c2f5e91
Remove workaround
tobiasdiez Jul 25, 2019
66b70a4
Reenable archunit tests
tobiasdiez Jul 27, 2019
7932dce
Disable archunit tests again
tobiasdiez Jul 27, 2019
ba60cbe
Fix mainClassName in build.gradle
davidemdot Aug 23, 2019
e26c7ed
Reenable modernizer in build.gradle
davidemdot Aug 23, 2019
8bb437e
Merge download-install4j and extract-install4j into prepare-install4j
koppor Aug 23, 2019
221c3dc
Merge remote-tracking branch 'origin/master' into jdk9
koppor Aug 23, 2019
7ca3728
Fix comment
koppor Aug 23, 2019
e2a35b2
Update org.berryx.jlink from 2.10.4 to 2.14.1
koppor Aug 23, 2019
b8a130e
Reformat whole file using IntelliJ
koppor Aug 23, 2019
7c2a405
Merge remote-tracking branch 'origin/master' into jdk9
koppor Aug 23, 2019
b696ef3
Merge remote-tracking branch 'origin/master' into jdk9
koppor Aug 24, 2019
70948d2
Fix module-info.test
koppor Aug 24, 2019
6a95adf
Merge remote-tracking branch 'origin/master' into jdk9
koppor Aug 24, 2019
67cef6f
Try to fix module-info.test
koppor Aug 24, 2019
4829c7f
Update gradle from 5.5.1 to 5.6
koppor Aug 24, 2019
5201112
Update javafxplugin from 0.0.7 to 0.0.8
koppor Aug 24, 2019
afc4ea4
Merge remote-tracking branch 'origin/master' into jdk9
koppor Aug 25, 2019
53dcc48
Try to fix module-info.test again
koppor Aug 25, 2019
4cf951c
Fix junit5 package
davidemdot Aug 25, 2019
a9526ad
Merge branch 'master' into jdk9
koppor Aug 25, 2019
598a439
Group togehter --add-modules and --add-reads
koppor Aug 25, 2019
5f7f08f
Reenable modernizer
tobiasdiez Aug 25, 2019
012d9b0
Pin TestFX to 4.0.15-alpha (4.0.16-alpha causes issues)
koppor Aug 25, 2019
7f970bc
Remove Globals at SaveDatabaseAction
koppor Aug 25, 2019
2ace3dd
Follow variable convention of MSBibExportFormatTestfiles at ModsExpor…
koppor Aug 25, 2019
941208d
Fix MSBibExportFormatTestFiles by ignoring the order of XML elements
koppor Aug 25, 2019
0132d44
Merge remote-tracking branch 'origin/master' into jdk9
koppor Aug 25, 2019
4b9cd1a
Allow gui tests to fail using TravisCI's functionalities
koppor Aug 25, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
48 changes: 33 additions & 15 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,9 @@ plugins {
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.3'
id 'net.ltgt.errorprone' version '0.0.13'
id 'com.github.ben-manes.versions' version '0.17.0'
id 'com.zyxist.chainsaw' version '0.3.1'
//id 'net.ltgt.errorprone' version '0.0.13'
}

// use the gradle build scan feature: https://scans.gradle.com/get-started
Expand All @@ -47,13 +48,15 @@ group = "org.jabref"
version = "4.3-dev"
project.ext.threeDotVersion = "4.2.0.1"
project.ext.install4jDir = hasProperty("install4jDir") ? getProperty("install4jDir") : (OperatingSystem.current().isWindows() ? 'C:/Program Files/install4j7' : 'install4j7')
sourceCompatibility = 1.8
targetCompatibility = 1.8
sourceCompatibility = 9
targetCompatibility = 9
mainClassName = "org.jabref.JabRefMain"
javaModule.name ="org.jabref"


// These are the Java version requirements we will check on each start of JabRef
ext.minRequiredJavaVersion = "1.8.0_144"
ext.allowJava9 = false
ext.allowJava9 = true

sourceSets {
main {
Expand All @@ -78,6 +81,10 @@ repositories {
configurations {
antlr3
antlr4

compile {
exclude group: 'com.google.code.findbugs', module: 'jsr305'
}
}

dependencies {
Expand All @@ -96,10 +103,11 @@ dependencies {

compile 'commons-cli:commons-cli:1.4'

compile "org.libreoffice:juh:5.4.2"
// TODO: LibreOffice has a split package, temporarily removed
/*compile "org.libreoffice:juh:5.4.2"
compile "org.libreoffice:jurt:5.4.2"
compile "org.libreoffice:ridl:5.4.2"
compile "org.libreoffice:unoil:5.4.2"
compile "org.libreoffice:unoil:5.4.2"*/

compile 'com.github.bkromhout:java-diff-utils:2.1.1'
compile 'info.debatty:java-string-similarity:1.1.0'
Expand All @@ -119,19 +127,23 @@ dependencies {

compile 'com.google.guava:guava:25.0-jre'

compile group: 'javax.annotation', name: 'javax.annotation-api', version: '1.3.2'

// JavaFX stuff
compile 'de.codecentric.centerdevice:javafxsvg:1.3.0'
// TODO: has an internal dependency exporting org.w3c.dom, temporarily removed
//compile 'de.codecentric.centerdevice:javafxsvg:1.3.0'
compile 'de.jensd:fontawesomefx-materialdesignfont:1.7.22-4'
compile 'de.jensd:fontawesomefx-commons:9.1.2'
compile 'de.saxsys:mvvmfx-validation:1.7.0'
compile 'de.saxsys:mvvmfx:1.7.0'
compile 'org.fxmisc.easybind:easybind:1.0.3'
compile 'org.fxmisc.flowless:flowless:0.6.1'
compile 'org.fxmisc.richtext:richtextfx:0.9.0'
compile 'com.sibvisions.external.jvxfx:dndtabpane:0.1'
// compile 'com.sibvisions.external.jvxfx:dndtabpane:0.1'
Copy link
Member Author

Choose a reason for hiding this comment

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

Dnd TabPane has been introduced offically with java 10:
https://bugs.openjdk.java.net/browse/JDK-8190717

Copy link
Contributor

Choose a reason for hiding this comment

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

Good to know! Java 9 removed some (internal) classes this library uses.
I don't think we'll be able to have the D'n'd feature in a Java 9 release unless someone patches the library. But as Java 9 is already superseded, I guess this is not really high priority.

Copy link
Member Author

Choose a reason for hiding this comment

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

Agree with you. As soon we have it running with java 9, we can focus on the migration to java 10 ;)

compile 'javax.inject:javax.inject:1'

// Cannot be updated to 9.*.* until Jabref works with Java 9
compile 'org.controlsfx:controlsfx:8.40.15-SNAPSHOT'
compile 'org.controlsfx:controlsfx:9.0.0'

compile 'org.jsoup:jsoup:1.11.3'
compile 'com.mashape.unirest:unirest-java:1.4.9'
Expand All @@ -148,10 +160,16 @@ dependencies {
compile 'org.citationstyles:locales:1.0.1-SNAPSHOT'
compile 'de.undercouch:citeproc-java:1.0.1'

compile 'com.github.tomtung:latex2unicode_2.12:0.2.2'
// JAX-B is considered JavaEE API and is no longer part of JavaSE (JDK 9)
compile group: 'javax.xml.bind', name: 'jaxb-api', version: '2.3.0'
compile group: 'com.sun.xml.bind', name: 'jaxb-core', version: '2.3.0'

compile group: 'com.microsoft.azure', name: 'applicationinsights-core', version: '2.0.2'
compile group: 'com.microsoft.azure', name: 'applicationinsights-logging-log4j2', version: '2.0.2'

// TODO: recognized as 'latex2unicode.2.12', which is an invalid module name, temporarily removed
// compile 'com.github.tomtung:latex2unicode_2.12:0.2.2'

compile group: 'com.microsoft.azure', name: 'applicationinsights-core', version: '1.0.10'
compile group: 'com.microsoft.azure', name: 'applicationinsights-logging-log4j2', version: '1.0.10'

testImplementation 'org.junit.jupiter:junit-jupiter-api:5.2.0-RC1'
testCompile 'org.junit.jupiter:junit-jupiter-params:5.2.0-RC1'
Expand All @@ -166,7 +184,7 @@ dependencies {
testCompile 'org.reflections:reflections:0.9.11'
testCompile 'org.xmlunit:xmlunit-core:2.6.0'
testCompile 'org.xmlunit:xmlunit-matchers:2.6.0'
testCompile 'com.tngtech.archunit:archunit-junit:0.5.0'
testCompile 'com.tngtech.archunit:archunit-junit:0.6.0-java9-SNAPSHOT'
testCompile "org.testfx:testfx-core:4.0.+"
testCompile "org.testfx:testfx-junit5:4.0.+"

Expand Down Expand Up @@ -314,7 +332,7 @@ test {
useJUnitPlatform {
excludeTags 'DatabaseTest', 'FetcherTest', 'GUITest', 'org.jabref.testutils.category.FetcherTest', 'org.jabref.testutils.category.GUITest'
}

testLogging {
// set options for log level LIFECYCLE
events "failed"
Expand Down Expand Up @@ -375,7 +393,7 @@ 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 = []
}
Expand Down
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-4.6-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-4.6-all.zip
66 changes: 66 additions & 0 deletions src/main/java/module-info.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
open module org.jabref {
exports org.jabref;

exports org.jabref.gui;
exports org.jabref.gui.logging;
exports org.jabref.gui.maintable;
exports org.jabref.gui.specialfields;

exports org.jabref.model.database;

exports org.jabref.logic;
exports org.jabref.logic.citationstyle;
exports org.jabref.logic.search;

// opens org.jabref.gui to com.google.common;
// opens org.jabref.model.database to com.google.common;
// opens org.jabref.logic.citationstyle to com.google.common;

// Swing
requires java.desktop;

// SQL
requires java.sql;
requires pgjdbc.ng;

// JavaFX
requires javafx.graphics;
requires javafx.swing;
requires javafx.controls;
requires javafx.web;
requires javafx.fxml;
requires afterburner.fx;
// requires de.jensd.fx.glyphs.commons;
// requires de.jensd.fx.glyphs.materialdesignicons;

provides com.airhacks.afterburner.views.ResourceLocator
with org.jabref.gui.util.JabRefResourceLocator;

// Logging
requires org.slf4j;
requires org.apache.logging.log4j;

// Preferences and XML
requires java.prefs;
requires java.xml.bind; // Deprecated!
requires jdk.xml.dom;

// Annotations (@PostConstruct)
requires java.annotation;

// Microsoft application insights
requires applicationinsights.core;

requires glazedlists.java15;
Copy link
Member Author

Choose a reason for hiding this comment

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

I think this one of the dependencies we hopefully can remove soon. Old swing stuff.

requires jgoodies.forms;
requires commons.logging;
requires com.google.common;
requires spin;
requires easybind;
requires de.jensd.fx.glyphs.commons;

// Libre Office
/*requires ridl;
requires unoil;
requires juh;*/
}
24 changes: 15 additions & 9 deletions src/main/java/org/jabref/gui/FindUnlinkedFilesDialog.java
Original file line number Diff line number Diff line change
Expand Up @@ -385,7 +385,7 @@ private void disOrEnableAllElements(Container startContainer, boolean enable) {
private void expandTree(JTree currentTree, TreePath parent, boolean expand) {
TreeNode node = (TreeNode) parent.getLastPathComponent();
if (node.getChildCount() >= 0) {
for (Enumeration<TreeNode> e = node.children(); e.hasMoreElements();) {
for (Enumeration<? extends TreeNode> e = node.children(); e.hasMoreElements();) {
TreePath path = parent.pathByAddingChild(e.nextElement());
expandTree(currentTree, path, expand);
}
Expand Down Expand Up @@ -696,14 +696,19 @@ private void setupActions() {
*/
private List<File> getFileListFromNode(CheckableTreeNode node) {
List<File> filesList = new ArrayList<>();
Enumeration<CheckableTreeNode> children = node.depthFirstEnumeration();
Enumeration<TreeNode> children = node.depthFirstEnumeration();
List<CheckableTreeNode> nodesToRemove = new ArrayList<>();
for (CheckableTreeNode child : Collections.list(children)) {
if (child.isLeaf() && child.isSelected()) {
File nodeFile = ((FileNodeWrapper) child.getUserObject()).file;
for (TreeNode child : Collections.list(children)) {
if (!(child instanceof CheckableTreeNode)) {
continue;
}
CheckableTreeNode checkableChild = (CheckableTreeNode) child;

if (child.isLeaf() && checkableChild.isSelected()) {
File nodeFile = ((FileNodeWrapper) checkableChild.getUserObject()).file;
if ((nodeFile != null) && nodeFile.isFile()) {
filesList.add(nodeFile);
nodesToRemove.add(child);
nodesToRemove.add(checkableChild);
}
}
}
Expand Down Expand Up @@ -1138,9 +1143,10 @@ public void check() {

public void setSelected(boolean bSelected) {
isSelected = bSelected;
Enumeration<CheckableTreeNode> tmpChildren = this.children();
for (CheckableTreeNode child : Collections.list(tmpChildren)) {
child.setSelected(bSelected);
// TODO: Java 9: Generics are stronger?
Enumeration<TreeNode> tmpChildren = this.children();
for (TreeNode child : Collections.list(tmpChildren)) {
((CheckableTreeNode) child).setSelected(bSelected);
}

}
Expand Down
9 changes: 4 additions & 5 deletions src/main/java/org/jabref/gui/JabRefFrame.java
Original file line number Diff line number Diff line change
Expand Up @@ -132,8 +132,6 @@
import org.jabref.preferences.SearchPreferences;

import com.google.common.eventbus.Subscribe;
import org.eclipse.fx.ui.controls.tabpane.DndTabPane;
import org.eclipse.fx.ui.controls.tabpane.DndTabPaneFactory;
import org.fxmisc.easybind.EasyBind;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
Expand Down Expand Up @@ -214,8 +212,8 @@ private void init() {
sidePaneManager = new SidePaneManager(Globals.prefs, this);
sidePane = sidePaneManager.getPane();

Pane containerPane = DndTabPaneFactory.createDefaultDnDPane(DndTabPaneFactory.FeedbackType.MARKER, null);
tabbedPane = (DndTabPane) containerPane.getChildren().get(0);
//Pane containerPane = DndTabPaneFactory.createDefaultDnDPane(DndTabPaneFactory.FeedbackType.MARKER, null);
tabbedPane = new TabPane();

initLayout();

Expand Down Expand Up @@ -1019,11 +1017,12 @@ public void output(final String s) {
private void initActions() {
/*
openDatabaseOnlyActions.clear();
// TODO: temporarily removed OpenOffice Panel, (Java 9 incompatibility)
openDatabaseOnlyActions.addAll(Arrays.asList(manageSelectors, mergeDatabaseAction, newSubDatabaseAction, save, copyPreview,
saveAs, saveSelectedAs, saveSelectedAsPlain, undo, redo, cut, deleteEntry, copy, paste, mark, markSpecific, unmark,
unmarkAll, rankSubMenu, editEntry, selectAll, copyKey, copyCiteKey, copyKeyAndTitle, copyKeyAndLink, editPreamble, editStrings,
groupSidePane.getToggleCommand(), makeKeyAction, normalSearch, generalFetcher.getToggleCommand(), mergeEntries, cleanupEntries, exportToClipboard, replaceAll,
sendAsEmail, downloadFullText, lookupIdentifiers, writeXmpAction, openOfficePanel.getToggleCommand(), findUnlinkedFiles, addToGroup, removeFromGroup,
sendAsEmail, downloadFullText, lookupIdentifiers, writeXmpAction, /*openOfficePanel.getToggleCommand(), findUnlinkedFiles, addToGroup, removeFromGroup,
moveToGroup, autoLinkFile, resolveDuplicateKeys, openUrl, openFolder, openFile, togglePreview,
dupliCheck, autoSetFile, newEntryAction, newSpec, customizeAction, plainTextImport, getMassSetField(), getManageKeywords(),
pushExternalButton.getMenuAction(), closeDatabaseAction, getNextPreviewStyleAction(), getPreviousPreviewStyleAction(), checkIntegrity,
Expand Down
11 changes: 7 additions & 4 deletions src/main/java/org/jabref/gui/collab/ChangeDisplayDialog.java
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
import javax.swing.event.TreeSelectionEvent;
import javax.swing.event.TreeSelectionListener;
import javax.swing.tree.DefaultMutableTreeNode;
import javax.swing.tree.TreeNode;

import org.jabref.gui.BasePanel;
import org.jabref.gui.JabRefDialog;
Expand Down Expand Up @@ -86,12 +87,14 @@ public ChangeDisplayDialog(JFrame owner, final BasePanel panel,
// Perform all accepted changes:
// Store all edits in an Undoable object:
NamedCompound ce = new NamedCompound(Localization.lang("Merged external changes"));
Enumeration<ChangeViewModel> enumer = root.children();
// TODO: Java 9: Generics are stricter?
Enumeration<TreeNode> enumer = root.children();
boolean anyDisabled = false;
for (ChangeViewModel c : Collections.list(enumer)) {
for (TreeNode c : Collections.list(enumer)) {
ChangeViewModel model = (ChangeViewModel) c;
boolean allAccepted = false;
if (c.isAcceptable() && c.isAccepted()) {
allAccepted = c.makeChange(panel, localSecondary, ce);
if (model.isAcceptable() && model.isAccepted()) {
allAccepted = model.makeChange(panel, localSecondary, ce);
}

if (!allAccepted) {
Expand Down
11 changes: 7 additions & 4 deletions src/main/java/org/jabref/gui/collab/EntryChangeViewModel.java
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
import org.jabref.gui.undo.UndoableFieldChange;
import org.jabref.logic.bibtex.DuplicateCheck;
import org.jabref.logic.l10n.Localization;
import org.jabref.model.TreeNode;
import org.jabref.model.database.BibDatabase;
import org.jabref.model.entry.BibEntry;

Expand Down Expand Up @@ -74,10 +75,12 @@ public EntryChangeViewModel(BibEntry memEntry, BibEntry tmpEntry, BibEntry diskE
public boolean makeChange(BasePanel panel, BibDatabase secondary, NamedCompound undoEdit) {
boolean allAccepted = true;

Enumeration<ChangeViewModel> e = children();
for (ChangeViewModel c : Collections.list(e)) {
if (c.isAcceptable() && c.isAccepted()) {
c.makeChange(panel, secondary, undoEdit);
// TODO: Java 9: Generics are stronger?
Enumeration<javax.swing.tree.TreeNode> e = children();
for (javax.swing.tree.TreeNode c : Collections.list(e)) {
ChangeViewModel model = (ChangeViewModel) c;
if (model.isAcceptable() && model.isAccepted()) {
model.makeChange(panel, secondary, undoEdit);
} else {
allAccepted = false;
}
Expand Down
Empty file.
Loading