-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'upstream/master' into moveFileDir
* upstream/master: Fix error when path is no valid directory (#2527) French localization: translation of a string French menu: localization Highlight groups that match any/all of the entries selected in the main table. (#2515) Fix % sign cleanup (#2521) Revert "Fix repeated escaping of % sign" (#2520) Fix repeated escaping of % sign (#2519) fix for #2482 deadlock on PDF import (#2517)
- Loading branch information
Showing
52 changed files
with
1,146 additions
and
1,332 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
package net.sf.jabref.gui.util; | ||
|
||
import java.util.function.Predicate; | ||
|
||
import javafx.beans.binding.Bindings; | ||
import javafx.beans.binding.BooleanBinding; | ||
import javafx.beans.property.BooleanProperty; | ||
import javafx.beans.property.BooleanPropertyBase; | ||
import javafx.beans.value.ObservableValue; | ||
import javafx.collections.ObservableList; | ||
import javafx.css.PseudoClass; | ||
import javafx.scene.Node; | ||
|
||
/** | ||
* Helper methods for javafx binding. | ||
* Some methods are taken from https://bugs.openjdk.java.net/browse/JDK-8134679 | ||
*/ | ||
public class BindingsHelper { | ||
public static <T> BooleanBinding any(ObservableList<T> source, Predicate<T> predicate) { | ||
return Bindings.createBooleanBinding(() -> source.stream().anyMatch(predicate), source); | ||
} | ||
|
||
public static <T> BooleanBinding all(ObservableList<T> source, Predicate<T> predicate) { | ||
// Stream.allMatch() (in contrast to Stream.anyMatch() returns 'true' for empty streams, so this has to be checked explicitly. | ||
return Bindings.createBooleanBinding(() -> !source.isEmpty() && source.stream().allMatch(predicate), source); | ||
} | ||
|
||
public static void includePseudoClassWhen(Node node, PseudoClass pseudoClass, ObservableValue<? extends Boolean> condition) { | ||
BooleanProperty pseudoClassState = new BooleanPropertyBase(false) { | ||
@Override | ||
protected void invalidated() { | ||
node.pseudoClassStateChanged(pseudoClass, get()); | ||
} | ||
|
||
@Override | ||
public Object getBean() { | ||
return node; | ||
} | ||
|
||
@Override | ||
public String getName() { | ||
return pseudoClass.getPseudoClassName(); | ||
} | ||
}; | ||
pseudoClassState.bind(condition); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
39 changes: 0 additions & 39 deletions
39
src/main/java/net/sf/jabref/preferences/HighlightMatchingGroupPreferences.java
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.