Skip to content

Commit

Permalink
Fixed checkstyle errors
Browse files Browse the repository at this point in the history
  • Loading branch information
hemantgs committed Sep 1, 2020
1 parent 673b9f5 commit 4c2f493
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 11 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,8 @@ Note that this project **does not** adhere to [Semantic Versioning](http://semve
- We fixed an issue regarding pasting on Linux. [#6293](https://github.com/JabRef/jabref/issues/6293)

- We fixed linked identifier icon inconsistency[#6705](https://github.com/JabRef/jabref/issues/6705)
- We fixed the linked identifier icon inconsistency [#6705](https://github.com/JabRef/jabref/issues/6705)

### Removed

- We removed the option of the "enforce legal key". [#6295](https://github.com/JabRef/jabref/issues/6295)
Expand Down
4 changes: 3 additions & 1 deletion src/main/java/org/jabref/gui/icon/IconTheme.java
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,9 @@ public enum JabRefIcons implements JabRefIcon {
REMOTE_DATABASE(MaterialDesignIcon.DATABASE),
HOME(MaterialDesignIcon.HOME),
DATABASE(MaterialDesignIcon.DATABASE),
DATABASE_PLUS(MaterialDesignIcon.DATABASE_PLUS);
DATABASE_PLUS(MaterialDesignIcon.DATABASE_PLUS),
LINK(MaterialDesignIcon.LINK_VARIANT_OFF),
LINK_VARIANT(MaterialDesignIcon.LINK_VARIANT);

private final JabRefIcon icon;

Expand Down
7 changes: 1 addition & 6 deletions src/main/java/org/jabref/gui/maintable/CellFactory.java
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,10 @@ public CellFactory(ExternalFileTypes externalFileTypes, UndoManager undoManager)
// icon.setToo(Localization.lang("Open") + " PDF");
TABLE_ICONS.put(StandardField.PDF, icon);

icon = IconTheme.JabRefIcons.DATABASE;
icon = IconTheme.JabRefIcons.WWW;
// icon.setToolTipText(Localization.lang("Open") + " URL");
TABLE_ICONS.put(StandardField.URL, icon);

icon = IconTheme.JabRefIcons.DATABASE_PLUS;
// icon.setToolTipText(Localization.lang("Open") + " URL");
TABLE_ICONS.put(StandardField.URLS, icon);

icon = IconTheme.JabRefIcons.WWW;
// icon.setToolTipText(Localization.lang("Open") + " CiteSeer URL");
TABLE_ICONS.put(new UnknownField("citeseerurl"), icon);
Expand Down Expand Up @@ -98,7 +94,6 @@ public CellFactory(ExternalFileTypes externalFileTypes, UndoManager undoManager)
icon = printedViewModel.getIcon();
// icon.setToolTipText(printedViewModel.getLocalization());
TABLE_ICONS.put(SpecialField.PRINTED, icon);

}

public Node getTableIcon(Field field) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ public LinkedIdentifierColumn(MainTableColumnModel model,
this.setResizable(false);
this.setCellValueFactory(cellData -> cellData.getValue().getLinkedIdentifiers());
new ValueTableCellFactory<BibEntryTableViewModel, Map<Field, String>>()
.withGraphic(values -> createIdentifierGraphic(values))
.withGraphic(this::createIdentifierGraphic)
.withTooltip(this::createIdentifierTooltip)
.withMenu(this::createIdentifierMenu)
.withOnMouseClickedEvent((entry, linkedFiles) -> event -> {
Expand All @@ -70,9 +70,9 @@ public LinkedIdentifierColumn(MainTableColumnModel model,

private Node createIdentifierGraphic(Map<Field, String> values) {
if (values.size() > 1) {
return cellFactory.getTableIcon(StandardField.URLS);
return IconTheme.JabRefIcons.LINK_VARIANT.getGraphicNode();
} else if (values.size() == 1) {
return cellFactory.getTableIcon(StandardField.URL);
return IconTheme.JabRefIcons.LINK.getGraphicNode();
} else {
return null;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,6 @@ public enum StandardField implements Field {
TYPE("type", FieldProperty.TYPE),
URI("uri", "URI"),
URL("url", "URL", FieldProperty.EXTERNAL, FieldProperty.VERBATIM),
URLS("urls", "URLS", FieldProperty.VERBATIM),
URLDATE("urldate", FieldProperty.DATE),
VENUE("venue"),
VERSION("version"),
Expand Down

0 comments on commit 4c2f493

Please sign in to comment.