Skip to content

Generate an entry from ID#8129

Merged
Siedlerchr merged 51 commits into
JabRef:mainfrom
colinhex:generateEntryFromId
Oct 26, 2021
Merged

Generate an entry from ID#8129
Siedlerchr merged 51 commits into
JabRef:mainfrom
colinhex:generateEntryFromId

Conversation

@colinhex

@colinhex colinhex commented Oct 7, 2021

Copy link
Copy Markdown
Contributor

Fixes #4183

Adds new code segment in JabrefFrame to handle a new popover.
Adds multiple new files:

  • CompositeIdFetcher.java, logic to try all IdFetchers
  • GenerateEntryFromIdDialog.java, acting as fxmlController for...
  • GenerateEntryFromIdDialog.fxml, javafx gui for within the new popover
  • GenerateEntryFromIdAction.java, wraps fetching the entry in an action
  • CompositeIdFetcherTest.java

Screenshot from 2021-10-07 11-46-22

  • Change in CHANGELOG.md described in a way that is understandable for the average user (if applicable)
  • Tests created for changes (if applicable)
  • Manually tested changed features in running JabRef (always required)
  • Screenshots added in PR description (for UI changes)
  • Checked documentation: Is the information available and up to date? If not, I created an issue at https://github.com/JabRef/user-documentation/issues or, even better, I submitted a pull request to the documentation repository.

@colinhex colinhex changed the title Generate an entry from ID (WIP) Generate an entry from ID Oct 7, 2021
Comment thread src/main/java/org/jabref/gui/JabRefFrame.java Outdated
Comment thread CHANGELOG.md
@colinhex colinhex marked this pull request as ready for review October 9, 2021 13:50

@tobiasdiez tobiasdiez left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for your work. Some suggestions from my side about the general code structure / flow.

Comment thread src/main/java/org/jabref/logic/importer/CompositeIdFetcher.java Outdated
Comment thread src/main/java/org/jabref/logic/importer/CompositeIdFetcher.java Outdated
Comment thread src/main/java/org/jabref/gui/importer/GenerateEntryFromIdAction.java Outdated

@koppor koppor left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some small code comments

Comment thread src/main/java/org/jabref/gui/importer/GenerateEntryFromIdAction.java Outdated
Comment thread src/main/java/org/jabref/gui/importer/GenerateEntryFromIdAction.java Outdated
Comment thread src/main/java/org/jabref/logic/importer/CompositeIdFetcher.java Outdated
Comment thread src/test/java/org/jabref/logic/importer/fetcher/CompositeIdFetcherTest.java Outdated
Comment thread src/test/java/org/jabref/model/entry/identifier/IacrEprintTest.java Outdated

@calixtus calixtus left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like that feature very much. Thank you for adressing the remaining issues. Looks good to me!

@koppor koppor left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Small nitpick comments remain 😇

Comment thread src/main/java/org/jabref/gui/importer/GenerateEntryFromIdAction.java Outdated
Comment thread src/main/java/org/jabref/gui/importer/GenerateEntryFromIdAction.java Outdated
Comment thread src/main/java/org/jabref/logic/importer/CompositeIdFetcher.java Outdated

@koppor koppor left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since a few hours, I am working with the feature, and it works great. One micro thing, then it is good to go from my side

Comment thread src/main/java/org/jabref/logic/importer/CompositeIdFetcher.java Outdated
@koppor

koppor commented Oct 26, 2021

Copy link
Copy Markdown
Member

In case an entry already exists ...

grafik

... and error is thrown

grafik

Is it possible to display "Entry already exists"?

Test DOI: https://doi.org/10.1016/j.infsof.2014.03.009

@koppor

koppor commented Oct 26, 2021

Copy link
Copy Markdown
Member

When an error occurs, the error should be included in the error message somehow. Maybe reuse the FetcherException things?

https://doi.org/10.1109/VISSOFT52517.2021.00013 always leads to the error popup.

OK, it is an invalid DOI. Maybe, the error message can be routed to the user?

@colinhex

Copy link
Copy Markdown
Contributor Author

I've included the exception messages in the update-messages of the background-task, now it gives more specific feedback.

Comment thread src/test/java/org/jabref/logic/importer/fetcher/CompositeIdFetcherTest.java Outdated

@koppor koppor left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

l10n consistency test

org.opentest4j.AssertionFailedError: Obsolete keys found in language properties file:

Entry could not be created

  1. CHECK IF THE KEY IS REALLY NOT USED ANYMORE
  2. REMOVE THESE FROM THE ENGLISH LANGUAGE FILE
    ==> expected: <[]> but was: <[Entry could not be created]>

@Siedlerchr

Copy link
Copy Markdown
Member

Yeah! This looks good now 🥇 Thanks for the patience and I hope we didn't annoy you with our nitpicking :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add "generate bibtex from identifier" button in toolbar

5 participants