showDiffProperty() {
+ return showDiff;
+ }
+
+ public void setShowDiff(boolean showDiff) {
+ plainTextOrDiffComboBox.valueProperty().set(showDiff ? PlainTextOrDiff.Diff : PlainTextOrDiff.PLAIN_TEXT);
+ }
+
+ /**
+ * Convenience method used to disable diff related views when diff is not selected.
+ *
+ *
+ * This method is required because {@link EasyBinding} class doesn't have a method to invert a boolean property,
+ * like {@link BooleanExpression#not()}
+ *
+ */
+ public EasyBinding notShowDiffProperty() {
+ return showDiffProperty().map(showDiff -> !showDiff);
+ }
+
+ public Boolean isShowDiffEnabled() {
+ return showDiffProperty().get();
+ }
+
+ public ObjectProperty diffHighlightingMethodProperty() {
+ return diffHighlightingMethod;
+ }
+
+ public DiffMethod getDiffHighlightingMethod() {
+ return diffHighlightingMethodProperty().get();
+ }
+
+ public void setDiffHighlightingMethod(DiffMethod diffHighlightingMethod) {
+ diffHighlightingMethodProperty().set(diffHighlightingMethod);
+ }
+
+ public void setOnSelectLeftEntryValuesButtonClicked(Runnable onClick) {
+ selectLeftEntryValuesButton.setOnMouseClicked(e -> onClick.run());
+ }
+
+ public void setOnSelectRightEntryValuesButtonClicked(Runnable onClick) {
+ selectRightEntryValuesButton.setOnMouseClicked(e -> onClick.run());
+ }
+
+ public enum PlainTextOrDiff {
+ PLAIN_TEXT(Localization.lang("Plain Text")), Diff(Localization.lang("Show Diff"));
+
+ private final String value;
+
+ PlainTextOrDiff(String value) {
+ this.value = value;
+ }
+
+ public String getValue() {
+ return value;
+ }
+
+ public static PlainTextOrDiff fromString(String str) {
+ return Arrays.stream(values())
+ .filter(plainTextOrDiff -> plainTextOrDiff.getValue().equals(str))
+ .findAny()
+ .orElseThrow(IllegalArgumentException::new);
+ }
+ }
+
+ public enum DiffView {
+ UNIFIED(Localization.lang("Unified View")),
+ SPLIT(Localization.lang("Split View"));
+ private final String value;
+
+ DiffView(String value) {
+ this.value = value;
+ }
+
+ public String getValue() {
+ return value;
+ }
+
+ public static DiffView fromString(String str) {
+ return Arrays.stream(values())
+ .filter(diffView -> diffView.getValue().equals(str))
+ .findAny()
+ .orElseThrow(IllegalArgumentException::new);
+ }
+ }
+}
diff --git a/src/main/resources/l10n/JabRef_en.properties b/src/main/resources/l10n/JabRef_en.properties
index dc9d31a3e5b..d65f8370995 100644
--- a/src/main/resources/l10n/JabRef_en.properties
+++ b/src/main/resources/l10n/JabRef_en.properties
@@ -323,7 +323,6 @@ Entry\ preview=Entry preview
Entry\ table=Entry table
Entry\ table\ columns=Entry table columns
Entry\ Title\ (Required\ to\ deliver\ recommendations.)=Entry Title (Required to deliver recommendations.)
-Entry\ type=Entry type
Error=Error
Error\ occurred\ when\ parsing\ entry=Error occurred when parsing entry
Error\ opening\ file=Error opening file
@@ -1311,8 +1310,8 @@ Help\ on\ Name\ Formatting=Help on Name Formatting
Add\ new\ file\ type=Add new file type
-Left\ entry=Left entry
-Right\ entry=Right entry
+Left\ Entry=Left Entry
+Right\ Entry=Right Entry
Original\ entry=Original entry
No\ information\ added=No information added
Select\ at\ least\ one\ entry\ to\ manage\ keywords.=Select at least one entry to manage keywords.
@@ -1557,11 +1556,7 @@ Verse=Verse
change\ entries\ of\ group=change entries of group
odd\ number\ of\ unescaped\ '\#'=odd number of unescaped '#'
-Plain\ text=Plain text
Show\ diff=Show diff
-character=character
-word=word
-Show\ symmetric\ diff=Show symmetric diff
Copy\ Version=Copy Version
Maintainers=Maintainers
Contributors=Contributors
@@ -2086,8 +2081,6 @@ Linked\ identifiers=Linked identifiers
insert\ entries=insert entries
In\ JabRef=In JabRef
On\ disk=On disk
-Select\ all\ changes\ on\ the\ left=Select all changes on the left
-Select\ all\ changes\ on\ the\ right=Select all changes on the right
Dismiss=Dismiss
Mark\ all\ changes\ as\ accepted=Mark all changes as accepted
Unmark\ all\ changes=Unmark all changes
@@ -2512,6 +2505,15 @@ Swap\ content=Swap content
Copy\ or\ move\ the\ content\ of\ one\ field\ to\ another=Copy or move the content of one field to another
Automatic\ field\ editor=Automatic field editor
+Open\ Link=Open Link
+Highlight\ words=Highlight words
+Highlight\ characters=Highlight characters
+Unified\ View=Unified View
+Split\ View=Split View
+Plain\ Text=Plain Text
+Show\ Diff=Show Diff
+Merged\ Entry=Merged Entry
+
(Note\:\ If\ original\ entries\ lack\ keywords\ to\ qualify\ for\ the\ new\ group\ configuration,\ confirming\ here\ will\ add\ them)=(Note: If original entries lack keywords to qualify for the new group configuration, confirming here will add them)
Assign=Assign
Do\ not\ assign=Do not assign
diff --git a/src/test/java/org/jabref/logic/net/URLUtilTest.java b/src/test/java/org/jabref/logic/net/URLUtilTest.java
index 04ed0e99a94..d69d7a1df7e 100644
--- a/src/test/java/org/jabref/logic/net/URLUtilTest.java
+++ b/src/test/java/org/jabref/logic/net/URLUtilTest.java
@@ -73,4 +73,9 @@ void isURLshouldRejectInvalidURL() {
assertFalse(URLUtil.isURL("www.google.com"));
assertFalse(URLUtil.isURL("google.com"));
}
+
+ @Test
+ void isURLshouldRejectEmbeddedURL() {
+ assertFalse(URLUtil.isURL("dblp computer science bibliography, http://dblp.org"));
+ }
}