From 87673ccd9775777e99582e9aca248750138ecbef Mon Sep 17 00:00:00 2001 From: Mihu Date: Tue, 13 Aug 2019 21:32:14 +0200 Subject: [PATCH 1/3] Fix issue 5152, tooltip and icon added to group cell --- .../jabref/gui/maintable/MainTableColumnFactory.java | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/main/java/org/jabref/gui/maintable/MainTableColumnFactory.java b/src/main/java/org/jabref/gui/maintable/MainTableColumnFactory.java index 0bbe346fe92..f701ad820b3 100644 --- a/src/main/java/org/jabref/gui/maintable/MainTableColumnFactory.java +++ b/src/main/java/org/jabref/gui/maintable/MainTableColumnFactory.java @@ -65,7 +65,7 @@ class MainTableColumnFactory { private final CellFactory cellFactory; private final UndoManager undoManager; private final DialogService dialogService; - + public MainTableColumnFactory(BibDatabaseContext database, ColumnPreferences preferences, ExternalFileTypes externalFileTypes, UndoManager undoManager, DialogService dialogService) { this.database = Objects.requireNonNull(database); @@ -77,6 +77,8 @@ public MainTableColumnFactory(BibDatabaseContext database, ColumnPreferences pre } public List> createColumns() { + + List> columns = new ArrayList<>(); columns.add(createGroupColumn()); @@ -116,8 +118,11 @@ public MainTableColumnFactory(BibDatabaseContext database, ColumnPreferences pre private TableColumn createGroupColumn() { TableColumn> column = new TableColumn<>(); - column.getStyleClass().add(GROUP_COLUMN); - setExactWidth(column, 20); + Node headerGraphic = IconTheme.JabRefIcons.DEFAULT_GROUP_ICON.getGraphicNode(); + Tooltip.install(headerGraphic, new Tooltip(Localization.lang("Group color"))); + column.setGraphic(headerGraphic); + column.getStyleClass().add(ICON_COLUMN); + setExactWidth(column, GUIGlobals.WIDTH_ICON_COL); column.setCellValueFactory(cellData -> cellData.getValue().getMatchedGroups(database)); new ValueTableCellFactory>() .withGraphic(this::createGroupColorRegion) From 1da435509b99226c168ac0692e4400c8eed64b24 Mon Sep 17 00:00:00 2001 From: Mihu Date: Wed, 14 Aug 2019 17:40:19 +0200 Subject: [PATCH 2/3] -fixed minor issue with style (empty line) in MainTableColumnFactory -added key "Group color" into english language properties --- .../java/org/jabref/gui/maintable/MainTableColumnFactory.java | 4 ---- src/main/resources/l10n/JabRef_en.properties | 1 + 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/src/main/java/org/jabref/gui/maintable/MainTableColumnFactory.java b/src/main/java/org/jabref/gui/maintable/MainTableColumnFactory.java index f701ad820b3..f3ae887b505 100644 --- a/src/main/java/org/jabref/gui/maintable/MainTableColumnFactory.java +++ b/src/main/java/org/jabref/gui/maintable/MainTableColumnFactory.java @@ -77,12 +77,8 @@ public MainTableColumnFactory(BibDatabaseContext database, ColumnPreferences pre } public List> createColumns() { - - List> columns = new ArrayList<>(); - columns.add(createGroupColumn()); - // Add column for linked files if (preferences.showFileColumn()) { columns.add(createFileColumn()); diff --git a/src/main/resources/l10n/JabRef_en.properties b/src/main/resources/l10n/JabRef_en.properties index 2d0503a5235..e61232b2099 100644 --- a/src/main/resources/l10n/JabRef_en.properties +++ b/src/main/resources/l10n/JabRef_en.properties @@ -2114,3 +2114,4 @@ No\ LaTeX\ files\ containing\ this\ entry\ were\ found.=No LaTeX files containin Selected\ entry\ does\ not\ have\ an\ associated\ BibTeX\ key.=Selected entry does not have an associated BibTeX key. Current\ search\ directory\:=Current search directory: Set\ LaTeX\ file\ directory=Set LaTeX file directory +Group\ color=Group color From 3d09d9039df6c208dd4907ceb801bf040a74286a Mon Sep 17 00:00:00 2001 From: Mihu Date: Mon, 19 Aug 2019 17:43:52 +0200 Subject: [PATCH 3/3] Fix issue of missing publication year of an entry when user add content from IEEE library --- src/main/java/org/jabref/logic/importer/fetcher/IEEE.java | 1 + 1 file changed, 1 insertion(+) diff --git a/src/main/java/org/jabref/logic/importer/fetcher/IEEE.java b/src/main/java/org/jabref/logic/importer/fetcher/IEEE.java index 9ebee2cefdb..5a67e66e2ee 100644 --- a/src/main/java/org/jabref/logic/importer/fetcher/IEEE.java +++ b/src/main/java/org/jabref/logic/importer/fetcher/IEEE.java @@ -91,6 +91,7 @@ private static BibEntry parseJsonRespone(JSONObject jsonEntry, Character keyword entry.setField(StandardField.AUTHOR, authors.stream().collect(Collectors.joining(" and "))); entry.setField(StandardField.LOCATION, jsonEntry.optString("conference_location")); entry.setField(StandardField.DOI, jsonEntry.optString("doi")); + entry.setField(StandardField.YEAR,jsonEntry.optString("publication_year")); entry.setField(StandardField.PAGES, jsonEntry.optString("start_page") + "--" + jsonEntry.optString("end_page")); JSONObject keywordsContainer = jsonEntry.optJSONObject("index_terms");