Skip to content

Select correct tab for creation of new entry #13087

@koppor

Description

@koppor

I want to add the article with the DOIish-URL https://doi.org/10.1007/s11367-023-02261-y to JabRef.

When clicking the "Create new entry..." button, the tab "Enter Identifier" should be selected:

Image

The code to investigate is: https://github.com/JabRef/jabref/blob/main/jabgui/src/main/java/org/jabref/gui/newentry/NewEntryView.java#L146-L146

After the approach is null, the Clipboard should be inspected if it is an identifier. (For this org.jabref.logic.importer.util.IdentifierParser#parse can be used)

If yes:

  • NewEntryDialogTab.ENTER_IDENTIFIER should be used.
  • set idText to the Clipboard contents

Otherwise, preferences.getLatestApproach().


One needs to move the following code to the right place:

        final String clipboardText = ClipBoardManager.getContents().trim();
        if (!StringUtil.isBlank(clipboardText)) {
            interpretText.setText(clipboardText);
            interpretText.selectAll();
        }

Metadata

Metadata

Assignees

Labels

component: uigood first issueAn issue intended for project-newcomers. Varies in difficulty.📌 Pinned📍 AssignedAssigned by assign-issue-action (or manually assigned)
No fields configured for feature.

Projects

Status
Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions