Closed tobiasdiez closed 3 years ago
Mac OS X 10.14.4 Java 13.0.1
I can’t recreate this bug.
1) I clicked general and added the link http://www.africau.edu/images/default/sample.pdf to URL 2) Then I right-clicked “Open URL or DOI”(I did this because Open File was grayed-out despite adding the URL 3) I downloaded the pdf but Open File was still grayed - out.
Then I tried to download from URL. I didn't get the same grayed out the issue.
What am I missing to recreate this bug?
@kevone123 Thanks for your interest! The entry context menu of the main table is working fine, but the context menu of the file is the problem (right click on "PDF" in your last screenshot). Sorry for being imprecise.
@tobiasdiez I'm still unable to recreate this bug.
1) Added the link to an entry
2) Downloaded the pdf
3) When I right-clicked the pdf it isn't grayed out.
However it is greyed out when I clicked the empty grayed line after it.
Thank you for your response.
This is very strange. For me, the context menu looks like the one on your last screenshot. Only after I switch between entries, the context menu is updated correctly.
Hi, we are a team of 5 students, and we are interested in working on this issue.
Firstly, we had reproduced this bug. Thanks for your tips, we understand the reason. In our opinion, we find that only after downloading completed, LinkedFile
object’s link attributes will update, and content menu will consequently update, making some options not grayed out.
We guess that it can’t immediately update for it not renews content menu, and can only reinitialize after switch between entries.
We consider whether it is possible to renew the content menu immediately after downloading complete, that is after onSuccess
function. But we are a little confused about the onSuccess
function, it seems like a blocking, which can make the program continue to do other things. And we have no ideas on where to add operation after this function. Therefore, we are stucking at this.
We would sincerely appreciate it if you could give us some hints or suggestions.
Thanks for your interest!
Updating the context menu manually would be one option. However, the "proper" JavaFX way would be to listen to the changes in the linked files. However, this automatic update should work in principle - but it doesn't for some reason. I would start investigating this issue by debugging how often/ when https://github.com/JabRef/jabref/blob/7cb7ea60324932723db22fcd1964e26f73f7d9b4/src/main/java/org/jabref/gui/fieldeditors/LinkedFilesEditor.java#L217 is called. Then go up the chain and check when these methods are called: https://github.com/JabRef/jabref/blob/7cb7ea60324932723db22fcd1964e26f73f7d9b4/src/main/java/org/jabref/gui/util/ViewModelListCellFactory.java#L190 https://github.com/JabRef/jabref/blob/7cb7ea60324932723db22fcd1964e26f73f7d9b4/src/main/java/org/jabref/gui/util/ViewModelListCellFactory.java#L161
Many thanks for your guidance, we understand this issue better.
After re-syncing today, we find this bug seems to be solved due to issue # 6381. After downloading completed, the context menu will update immediately. And a new entry will be added but not overwrite. Sorry for not syncing this project in time.
Please point out if there is any misunderstanding. Thanks a lot!
I think @btut still noticed some issues in his comment https://github.com/JabRef/jabref/pull/6381#discussion_r420556932 Maybe you can work together on the remaining issues?
We will try to work on the remaining issues. Thanks.
I'd be happy to! The issue that I am having is that it would be nice to somehow let the user know that the file is still being downloaded. Otherwise people may wonder why the file entry is missing while actually the file is not downloaded yet. @Xuanxuan-Zou feel free to join the discussion in #6381
I noticed that the ContextMenu for the FileEditor is not using the factory methods, we normally use for JabRef menus.
Take a look at gui/maintable/RightClickMenu.java
for an example. Maybe this is worth some programming time. 😉
Thanks for your reminder!We will try to. 😃
This issue has been inactive for half a year. Since JabRef is constantly evolving this issue may not be relevant any longer and it will be closed in two weeks if no further activity occurs.
As part of an effort to ensure that the JabRef team is focusing on important and valid issues, we would like to ask if you could update the issue if it still persists. This could be in the following form:
Thank you for your contribution!
Steps to reproduce the behavior:
Relevant code: context menu: https://github.com/JabRef/jabref/blob/fc4201d6dffe16d2d3a820bd1200c4256c9c3e02/src/main/java/org/jabref/gui/fieldeditors/LinkedFilesEditor.java#L215-L267 download: https://github.com/JabRef/jabref/blob/fc4201d6dffe16d2d3a820bd1200c4256c9c3e02/src/main/java/org/jabref/gui/fieldeditors/LinkedFileViewModel.java#L407-L410
Log File
``` Paste an excerpt of your log file here ```