Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

File Link icon not shown, can't access paper, hangs #2930

Closed
notuntoward opened this issue Jun 20, 2017 · 15 comments
Closed

File Link icon not shown, can't access paper, hangs #2930

notuntoward opened this issue Jun 20, 2017 · 15 comments
Labels
component: entry-editor [outdated] type: bug Confirmed bugs or reports that are very likely to be bugs

Comments

@notuntoward
Copy link

If I create a new bibtex entry and store a pdf in the "General file directory" with the same name as the bibtex key, then JabRef somehow finds it automatically and adds an entry to the File Window on the General Tab (see screenshot). However,

1.) The file icon doesn't show up in the main table
2.) If I click on the paper icon in the File Window, I can't open the file by clicking the open button in the popup.
3.) If I add a description in the popup, the description isn't show the next time I click on the File Window
4.) There's no File entry in the raw bibtex
5.) JabRef sometimes hangs after the popup is shown -- no response to keyboard or mouse, and I have to use the Task Manager to kill it.

JabRef version on
JabRef 4.0.0-dev--snapshot--2017-06-18--master--c0ca85e07
Windows 7 6.1 amd64
Java 1.8.0_131

image

@tobiasdiez
Copy link
Member

Most of these points are actually by design: you first have to click the briefcase button to actually link the automatically found file.
I'll have a look at the other issues you mentioned.

@tobiasdiez tobiasdiez added [outdated] type: bug Confirmed bugs or reports that are very likely to be bugs component: entry-editor labels Jun 20, 2017
@tobiasdiez tobiasdiez added this to the v4.0 milestone Jun 20, 2017
@notuntoward
Copy link
Author

Thaks for the explanation about the briefcase icon -- could be a bit bigger or red or something so that you know to click on it. But it works for me on this version:

JabRef 4.0.0-dev--snapshot--2017-06-22--master--bee062c6a
Windows 10 10.0 amd64
Java 1.8.0_77

However, it's still true that, if I add a description in the popup, the description isn't show the next time I click on the File Window.

Also, it seems that the file format in the saved bibtex entry has changed. If, in the library properties, I enter the name of the directory immediately below the directory where the bibfile is stired, the auto-added file links look like this:

file = {:tmp\Accardo08Samplingproblemsusing.pdf:PDF},

where 'tmp' is the name of the file directory (see example1.txt).

In example1.txt, I also see that JabRef has stored the full path to the file directory, even though I entered only 'tmp'). The breaks cross-platform compatibility, for example, where my bibtex file is stored in git, and is checked out in different root paths on different machines (this is unavoidable). It also breaks other bibtex reading programs, for example, the emacs org-ref package, which cannot find the paper and open it.

example1.txt

@Siedlerchr
Copy link
Member

Siedlerchr commented Jun 26, 2017

I could reproduce this partly. The library properties directory setting is by design. If you want to keep it relative, I suggest you use the Option: Use location of Bib File as Main Directory, and then you can have subfolders as you want.

To your second thing with the description.
I debugged it and this is getting weird now: @tobiasdiez
When you add a System.out.println(linkedFile); in the method public void edit in LinkedFileViewModel, the description is actually stored. I dunno if this is a threading problem.

And if you click the edit file and then click again on browse in the dialog, JabRef hangs.
Edit// The JavaFX Application Thread hangs in the setVisible method
Furthermore the context menu floats around and stays, even on top of other apps
image

@notuntoward
Copy link
Author

Thanks for the tip about the setting: Use the BIB file location as primary file directory.

It works.

@tobiasdiez
Copy link
Member

So to summarize, the only open problem is the missing description text, right? As this is only a minor issue, I remove this from the 4.0 milestone.

@notuntoward
Copy link
Author

notuntoward commented Aug 23, 2017

The other issue still remaining is that the workaround for this problem causes the file pane to look in the wrong directory (workaround: setting the BIB file location as primary file directory). See #2985.

So, a (big to me) problem still remains. I'm not sure which PR # it should be assigned to.

@notuntoward
Copy link
Author

notuntoward commented Sep 10, 2017

One thing still missing is 3.) in the original report. The "description" field (entered in the File popup), isn't displayed.

Lately, there is a mouse-hover hint showing the description but you must know to hover. If you do know, it takes nearly a second of hovering for the hint to appear -- kind of annoying that an extra mouse action is necessary, especially if you operate from the keyboard. More annoying is that if you don't know, then you must guess: you hover either until the hint appears, or until you finally give up and conclude that there is no description.

In JabRef 3x, the description field was always displayed in the File window. I think this behavior was much better.

@Siedlerchr
Copy link
Member

@notuntoward The description problem are acutally two problems.
The displaying is not the problem, the problem is that the descr does not get synchronized/wrritten to the bibtex code

@notuntoward
Copy link
Author

@Siedlerchr you're absolutely right that the description doesn't get written to the bib file -- I hadn't noticed that before -- but if it had been written, would it still be displayed only as a mouse hover hint?

@Siedlerchr
Copy link
Member

Existing descriptions are shown as tooltip, but not updated if you change them. I am currently preparing a PR for the display directly, however I first wanted to make sure the synchro of the description works

@tobiasdiez
Copy link
Member

To display the description only as a tooltip was actually by design. In most cases (I guess), the file name is sufficient to identify the file and thus the description is not really necessary. Thus the idea was to hide the description a bit in order to make the interface lighter and don't cramp everything. @notuntoward what is your use case for which you need the description field?

@Siedlerchr
Copy link
Member

@tobiasdiez
You don't happen to have an idea why the file description is not synced with the bib entry code but the file link and type, although they are just properties of the same class ?

@tobiasdiez
Copy link
Member

no, sorry, I don't have an idea. Did you write (do we have?) a test checking that the linked file class is serialized correctly? If thats the case, the problem has to lie in saving the contents of the description text field in the class field (or serializing the previous class before the edit).

@Siedlerchr
Copy link
Member

@notuntoward I created a follow up issue for the description sync problem in #3208

@notuntoward
Copy link
Author

notuntoward commented Sep 11, 2017

Hi @tobiasdiez, I often have several documents under one entry. Examples are:

  1. the paper, the presentation slides, the tech note
  2. several drafts of a paper I'm reviewing for a journal
  3. a paper and a bunch of supporting documents (math pages from wikipedia, emails from the author, ...)

It's sometimes not easy to compactly distinguish these things with a file name, but if you try, you'll want to keep some order in the huge directory where all the documents go, usually by naming each file starting with the bibtex key, then following that with description text. Depending upon the key length, that's a lot of redundant characters for the short JabRef File window. And in my opinion, it's less clean than just having the description without the key.

But in addition, there is the bother of mouse hovering while you wait for the tooltip to show, or of waiting somewhat longer than that in order to confirm that there is no description.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: entry-editor [outdated] type: bug Confirmed bugs or reports that are very likely to be bugs
Projects
None yet
Development

No branches or pull requests

3 participants