From 329118bf6d89f3c796543dfbb51a5b53355fb540 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Mon, 11 May 2020 08:55:06 +0000 Subject: [PATCH 1/6] Bump flexmark-ext-gfm-tasklist from 0.61.24 to 0.61.26 Bumps [flexmark-ext-gfm-tasklist](https://github.com/vsch/flexmark-java) from 0.61.24 to 0.61.26. - [Release notes](https://github.com/vsch/flexmark-java/releases) - [Commits](https://github.com/vsch/flexmark-java/compare/0.61.24...0.61.26) Signed-off-by: dependabot-preview[bot] --- build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.gradle b/build.gradle index 2d6959fd4c7..1a10b957890 100644 --- a/build.gradle +++ b/build.gradle @@ -193,7 +193,7 @@ dependencies { implementation 'com.vladsch.flexmark:flexmark:0.61.24' implementation 'com.vladsch.flexmark:flexmark-ext-gfm-strikethrough:0.61.24' - implementation 'com.vladsch.flexmark:flexmark-ext-gfm-tasklist:0.61.24' + implementation 'com.vladsch.flexmark:flexmark-ext-gfm-tasklist:0.61.26' testImplementation 'io.github.classgraph:classgraph:4.8.78' testImplementation 'org.junit.jupiter:junit-jupiter:5.6.2' From 2d592d40e7452f5d10e26f3cfcf4d86831d74b29 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Mon, 11 May 2020 08:55:40 +0000 Subject: [PATCH 2/6] Bump flexmark from 0.61.24 to 0.61.26 Bumps [flexmark](https://github.com/vsch/flexmark-java) from 0.61.24 to 0.61.26. - [Release notes](https://github.com/vsch/flexmark-java/releases) - [Commits](https://github.com/vsch/flexmark-java/compare/0.61.24...0.61.26) Signed-off-by: dependabot-preview[bot] --- build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.gradle b/build.gradle index 2d6959fd4c7..6052f385284 100644 --- a/build.gradle +++ b/build.gradle @@ -191,7 +191,7 @@ dependencies { exclude module: "log4j-core" } - implementation 'com.vladsch.flexmark:flexmark:0.61.24' + implementation 'com.vladsch.flexmark:flexmark:0.61.26' implementation 'com.vladsch.flexmark:flexmark-ext-gfm-strikethrough:0.61.24' implementation 'com.vladsch.flexmark:flexmark-ext-gfm-tasklist:0.61.24' From 0c9b86c314cfccc429e2aad96219bef023f1d518 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Mon, 11 May 2020 08:56:00 +0000 Subject: [PATCH 3/6] Bump org.beryx.jlink from 2.18.0 to 2.19.0 Bumps org.beryx.jlink from 2.18.0 to 2.19.0. Signed-off-by: dependabot-preview[bot] --- build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.gradle b/build.gradle index 2d6959fd4c7..483655f9a98 100644 --- a/build.gradle +++ b/build.gradle @@ -16,7 +16,7 @@ plugins { id 'com.github.ben-manes.versions' version '0.28.0' id 'org.javamodularity.moduleplugin' version '1.5.0' id 'org.openjfx.javafxplugin' version '0.0.8' - id 'org.beryx.jlink' version '2.18.0' + id 'org.beryx.jlink' version '2.19.0' // nicer test outputs during running and completion id 'com.adarshr.test-logger' version '2.0.0' From 19654d184686c97308976ae79f34092783f740a8 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Mon, 11 May 2020 09:14:14 +0000 Subject: [PATCH 4/6] Bump flexmark-ext-gfm-strikethrough from 0.61.24 to 0.61.26 Bumps [flexmark-ext-gfm-strikethrough](https://github.com/vsch/flexmark-java) from 0.61.24 to 0.61.26. - [Release notes](https://github.com/vsch/flexmark-java/releases) - [Commits](https://github.com/vsch/flexmark-java/compare/0.61.24...0.61.26) Signed-off-by: dependabot-preview[bot] --- build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.gradle b/build.gradle index 358bf6367a4..7d74e5f0ff6 100644 --- a/build.gradle +++ b/build.gradle @@ -192,7 +192,7 @@ dependencies { } implementation 'com.vladsch.flexmark:flexmark:0.61.26' - implementation 'com.vladsch.flexmark:flexmark-ext-gfm-strikethrough:0.61.24' + implementation 'com.vladsch.flexmark:flexmark-ext-gfm-strikethrough:0.61.26' implementation 'com.vladsch.flexmark:flexmark-ext-gfm-tasklist:0.61.26' testImplementation 'io.github.classgraph:classgraph:4.8.78' From 100f7319fb26f0d411d0eb81b80c720c68bb554d Mon Sep 17 00:00:00 2001 From: Tianjian lei <185049857@qq.com> Date: Mon, 11 May 2020 22:13:29 +0800 Subject: [PATCH 5/6] Add support for jumping in ordered author list by typing letters (#6440) Co-authored-by: Carl Christian Snethlage <50491877+calixtus@users.noreply.github.com> --- CHANGELOG.md | 1 + .../org/jabref/gui/maintable/MainTable.java | 45 +++++++++++++++++++ 2 files changed, 46 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 44d376eedb1..c373c277160 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -20,6 +20,7 @@ Note that this project **does not** adhere to [Semantic Versioning](http://semve - We created a new install screen for macOS. [#5759](https://github.com/JabRef/jabref/issues/5759) - We implemented an option to download fulltext files while importing. [#6381](https://github.com/JabRef/jabref/pull/6381) - We fixed the bug when strike the delete key in the text field. [#6421](https://github.com/JabRef/jabref/issues/6421) +- We added support for jumping to target entry when typing letter/digit after sorting a column in maintable [#6146](https://github.com/JabRef/jabref/issues/6146) ### Changed diff --git a/src/main/java/org/jabref/gui/maintable/MainTable.java b/src/main/java/org/jabref/gui/maintable/MainTable.java index e15ac98e4ce..f9a2122041a 100644 --- a/src/main/java/org/jabref/gui/maintable/MainTable.java +++ b/src/main/java/org/jabref/gui/maintable/MainTable.java @@ -12,6 +12,7 @@ import javafx.collections.ListChangeListener; import javafx.scene.control.SelectionMode; +import javafx.scene.control.TableColumn; import javafx.scene.control.TableRow; import javafx.scene.control.TableView; import javafx.scene.input.ClipboardContent; @@ -57,11 +58,21 @@ public class MainTable extends TableView { private final ImportHandler importHandler; private final CustomLocalDragboard localDragboard; + private long lastKeyPressTime; + private String columnSearchTerm; + public MainTable(MainTableDataModel model, JabRefFrame frame, BasePanel panel, BibDatabaseContext database, MainTablePreferences preferences, ExternalFileTypes externalFileTypes, KeyBindingRepository keyBindingRepository) { super(); + this.setOnKeyTyped(key -> { + if (this.getSortOrder().isEmpty()) { + return; + } + this.jumpToSearchKey(getSortOrder().get(0), key); + }); + this.model = model; this.database = Objects.requireNonNull(database); @@ -123,6 +134,40 @@ public MainTable(MainTableDataModel model, JabRefFrame frame, database.getDatabase().registerListener(this); } + /** + * This is called, if a user starts typing some characters into the keyboard with focus on main table. + * The {@link MainTable} will scroll to the cell with the same starting column value and typed string + * + * @param sortedColumn The sorted column in {@link MainTable} + * @param keyEvent The pressed character + */ + + private void jumpToSearchKey(TableColumn sortedColumn, KeyEvent keyEvent) { + if (keyEvent.getCharacter() == null || sortedColumn == null) { + return; + } + + if (System.currentTimeMillis() - lastKeyPressTime < 700) { + columnSearchTerm += keyEvent.getCharacter().toLowerCase(); + } else { + columnSearchTerm = keyEvent.getCharacter().toLowerCase(); + } + + lastKeyPressTime = System.currentTimeMillis(); + + this.getItems().stream() + .filter(item -> Optional.ofNullable(sortedColumn.getCellObservableValue(item).getValue()) + .map(Object::toString) + .orElse("") + .toLowerCase() + .startsWith(columnSearchTerm)) + .findFirst() + .ifPresent(item -> { + this.scrollTo(item); + this.clearAndSelect(item.getEntry()); + }); + } + @Subscribe public void listen(EntriesAddedEvent event) { DefaultTaskExecutor.runInJavaFXThread(() -> clearAndSelect(event.getFirstEntry())); From dd1d3a963adbf0ef8744863a07335b34a612e383 Mon Sep 17 00:00:00 2001 From: Tobias Diez Date: Mon, 11 May 2020 18:22:03 +0200 Subject: [PATCH 6/6] Fix label name --- .github/outdatedDependencies.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/outdatedDependencies.md b/.github/outdatedDependencies.md index 62b87165631..e4e9947d92a 100644 --- a/.github/outdatedDependencies.md +++ b/.github/outdatedDependencies.md @@ -1,5 +1,5 @@ --- title: Outdated dependencies -labels: t: dependencies +labels: type: dependencies --- [There are outdated dependencies!](https://github.com/JabRef/jabref/actions?query=is%3Afailure+workflow%3A%22Check+dependencies%22)