Jabref: Dropping a PDF on an entry should be consistent

Created on 24 Aug 2015  路  14Comments  路  Source: JabRef/jabref

When one wants to attach a PDF to an entry and move the PDF to the local data base folder, this is only possible by dropping the PDF into the preview pane or the "File" field (in the tab "General"). Then, the dialog "link to file" (call it "link dialog") is shown. When one drops the PDF onto the entry in the table, another dialog ("Import Metadata from PDF", call it "import dialog") is shown.

The import dialog offers "only attach PDF", which is one option of the link dialog. Thus, the options offered at the import dialog are incomplete. Therefore, the options of the link dialog should be included in the import dialog, too.

ui

Most helpful comment

I have following forces:

  • Be consistent with Windows shortcuts, where Alt is link and Shift is move
  • Being able to easily move files from the Downloads-Directory to the file directory

Thus, I propose to refine @tobiasdiez proposal (https://github.com/JabRef/jabref/issues/121#issuecomment-368140009) with

  • Drop on maintable -> new entry (show merge dialog if information from xmp and PDF content are different)
  • Drop on maintable with Alt held: link file to target entry
  • Drop on maintable with Shift held: move the file to file directory and link file to target entry
  • Drop on preview/entry editor: link file to target entry
  • Drop on preview/entry editor with Alt held: link file to target entry
  • Drop on preview/entry editor with Shift held: rename to filename pattern, move the file to file directory and link file to target entry

Thereby, I accept that:

  • I have to push the "Cleanup button" afterwards to rename the file to the "correct" filename

All 14 comments

drop on table

drop on table

drop on preview

drop-on-preview

I always found it confusing that I can't simply drag and drop a pdf file to the main table in order to import it (I think dropping on the tab header works). What do you think about:

  • drop on table: always import as new entry
  • drop on preview or entry editor: link

drop on table

grafik

drop on preview

grafik

grafik

Idea: from JabCon:

When creating a new entry, JabRef should parse the PDF using both the PDF Content importer and the XMP. Then, using the merge entries dialog, the resulting BibTeX entry should be offered. Only if conflicts. If no conflicts, just create the entry with the information.

User should not be asked, sensible defaults. - Use should use cleanup.

Although we talked at this during JabCon, I have problems remembering all decisions:
But I think we should show that dialog for MainTable + Preview
Only if the files is dropped to the File Listview under General it should be linked to the entry without further notice

The decision was as far as I remember:

  • Drop on maintable -> new entry (show merge dialog if information from xmp and PDF content are different)
  • Drop on maintable with Shift held-> link file to target entry
  • Drop on preview/entry editor -> link file

To distinguish the first two different drop behaviors for the maintable, the process there should be visual feedback, i.e., display "add as new entry" vs "link file" under the cursor java code.

I have following forces:

  • Be consistent with Windows shortcuts, where Alt is link and Shift is move
  • Being able to easily move files from the Downloads-Directory to the file directory

Thus, I propose to refine @tobiasdiez proposal (https://github.com/JabRef/jabref/issues/121#issuecomment-368140009) with

  • Drop on maintable -> new entry (show merge dialog if information from xmp and PDF content are different)
  • Drop on maintable with Alt held: link file to target entry
  • Drop on maintable with Shift held: move the file to file directory and link file to target entry
  • Drop on preview/entry editor: link file to target entry
  • Drop on preview/entry editor with Alt held: link file to target entry
  • Drop on preview/entry editor with Shift held: rename to filename pattern, move the file to file directory and link file to target entry

Thereby, I accept that:

  • I have to push the "Cleanup button" afterwards to rename the file to the "correct" filename

What about always move and rename the file if you hold the shift key?

Yeah, sounds great: Updated the comment

Unfortunately this is a bit problematic. I can't really detect if the drag and drop is coming from external if a key is pressed. I tried to use a combination with a KeyEventFilter but that does not work reliable,.

These modifiers are handled by javafx automatically and are available through getTransferMode. The different tarnsfer modes are MOVE (no modifier), COPY (Ctrl) and LINK (Shift + Ctrl). The modifiers in brackets might no be correct (and may actually vary by OS).

Yeah, thanks for the hint! I absolutely did not know that these TranserModes represent the
modifier/drag & drop combination. I must admit, I also did not know about the alt/shift keys for drag and drop in Windows.

Fixed in #3765
Thank you for reporting this issue. We think, that is already fixed in our development version and consequently the change will be included in the next release.

We would like to ask you to use a development build from https://builds.jabref.org/master and report back if it works for you. Please remember to make a backup of your library before trying-out this version.

Dropping on entry editor is now handle in #4408

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Braunch picture Braunch  路  3Comments

caugner picture caugner  路  3Comments

thorstenwagner picture thorstenwagner  路  4Comments

LinusDietz picture LinusDietz  路  3Comments

lenhard picture lenhard  路  4Comments