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

Improve citation styles code #5246

Closed
bernhard-kleine opened this issue Aug 26, 2019 · 8 comments · Fixed by #6010
Closed

Improve citation styles code #5246

bernhard-kleine opened this issue Aug 26, 2019 · 8 comments · Fixed by #6010
Labels
preferences type: code-quality Issues related to code or architecture decisions
Milestone

Comments

@bernhard-kleine
Copy link

Steps to reproduce the behavior:

  1. open the preference dialog
  2. the error message is immediate
Log File


grafik

@tobiasdiez tobiasdiez added bug Confirmed bugs or reports that are very likely to be bugs preferences labels Aug 26, 2019
@stefan-kolb
Copy link
Member

I have tested the described behavior, but cannot reproduce it.

@Siedlerchr
Copy link
Member

I also had it today when I used the latest version with the installer on windows 10.
(not running from gradlew)

@stefan-kolb
Copy link
Member

stefan-kolb commented Aug 26, 2019

Ok, does only occur with the build version. Not from IntelliJ.

@tobiasdiez tobiasdiez changed the title Opening the preference dialog generates a error message Citation styles are not working Sep 8, 2019
@tobiasdiez
Copy link
Member

In the end, the problem is that there is no (supported) way of getting a list of resources matching a given pattern. There are some workarounds but no clean way that always works. Thus, I would propose the following:

  • Add an automatically created index file that references all available style files (including relative paths)
  • Add this index file as a resource
  • Read this file and then create a list of all styles on runtime

As I have no experience how our code generation tools work, I'll leave this for somebody else. (@Siedlerchr @koppor ?).

Moreover, I noticed that because of the following line the preference tab is loaded when the preference dialog is opened instead of only when the preview tab is selected. It would be good to support a lazy loading/init to improve the performance of the preference dialog. @calixtus

@hsvia
Copy link

hsvia commented Sep 8, 2019

Hi,
I use always the latest development version.
I have the same problem withe the preferences dialog since some 3 weeks ago.
There was no change in my style file at this time !
Currently i use:

JabRef 5.0-dev--snapshot--2019-09-08--master--373b9f5f5
Windows 10 10.0 amd64
Java 11.0.4-bellsoft

It was installed from:
JabRef_windows-x64_5_0-dev--snapshot--2019-09-08--master--373b9f5f5.exe

The error occures only in case the preferences dialog is opened first after JabRef is started.
I can save the preferences, close the preferences then it works fine as I had opened it before with a running JabRef.
Then I close JabRef and opne the preferences and get the same error again.
Her once more the error listing:

java.nio.file.FileSystemAlreadyExistsException
at jdk.zipfs/jdk.nio.zipfs.ZipFileSystemProvider.newFileSystem(ZipFileSystemProvider.java:102)
at java.base/java.nio.file.FileSystems.newFileSystem(FileSystems.java:344)
at java.base/java.nio.file.FileSystems.newFileSystem(FileSystems.java:293)
at org.jabref.logic.citationstyle.CitationStyle.discoverCitationStyles(CitationStyle.java:147)
at org.jabref.gui.util.BackgroundTask$1.call(BackgroundTask.java:46)
at org.jabref.gui.util.DefaultTaskExecutor$1.call(DefaultTaskExecutor.java:122)
at javafx.graphics/javafx.concurrent.Task$TaskCallable.call(Task.java:1425)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at java.base/java.lang.Thread.run(Thread.java:834)

I run JabRef on three different computers, twice under win10, one under win 8.1.. The problem is 3 times the same. As mentioned it did not happen some 3 weeks ago.

@Siedlerchr
Copy link
Member

In general the styles are working, but the behavior is a bit odd:
I am only getting the error message when running from the installer.
The problem seems to be that you cannot create the same file system twice.

The only issue is that I need to close and reopen the library if I changed the order of styles, e.g. moved the ACM style before preview.

@matthiasgeiger matthiasgeiger mentioned this issue Oct 4, 2019
3 tasks
@tobiasdiez tobiasdiez mentioned this issue Oct 6, 2019
6 tasks
@tobiasdiez
Copy link
Member

tobiasdiez commented Oct 17, 2019

This should be fixed in the latest development version. Could you please check the build from http://builds.jabref.org/master/. Thanks! Please remember to make a backup of your library before trying-out this version.

I'll leave this open as the code needs be improved, see #5389 for details.

@tobiasdiez tobiasdiez removed this from the v5.0 milestone Oct 17, 2019
@tobiasdiez tobiasdiez added type: code-quality Issues related to code or architecture decisions and removed bug Confirmed bugs or reports that are very likely to be bugs labels Oct 17, 2019
@tobiasdiez tobiasdiez changed the title Citation styles are not working Improve citation styles code Oct 17, 2019
@tobiasdiez tobiasdiez added this to the v5.0 milestone Feb 23, 2020
@Siedlerchr
Copy link
Member

This issue should be fixed now in master. Please wait until the new build is ready. That takes approx half an hour or so.

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.

Siedlerchr added a commit that referenced this issue Mar 14, 2021
30fb68e Create BJEDIS-ABNT-Number (#5255)
aafb868 Update geochimica-et-cosmochimica-acta.csl (#5321)
60ba25f british-journal-of-anaesthesia.csl: add comma delimiter between non-sequential citations eg. 1 4 7-9 -> 1, 4, 7-9  (#5313)
67e6564 Reindent/reorder (#5318)
c0d2a39 Ruby 3.0.0 (#5309)
76d60ff Update harvard-anglia-ruskin-university.csl (#5310)
bc18ac9 Create journal-for-the-study-of-the-new-testament.csl (#5312)
aff602c Update journal-of-food-protection.csl (#5315)
4503826 Update muscle-and-nerve.csl (#5317)
3bed58e constant redefinition
4d718a0 update documentaiton link
fa99e2f add comma delimiter between succesive numbers
d396f8b Allow privileged testing of PRs (#5307)
43b22c7 Update masarykova-univerzita-pravnicka-fakulta.csl, pravnik.csl, iso690-full-note-cs.csl (#5308)
8a31c1e Update copernicus-publications.csl (#5303)
96760bb Update anabases.csl (#5304)
744de6d removed locale (#5300)
7eb0d60 Update aviation-space-and-environmental-medicine.csl (#5297)
2769970 Update ruhr-universitat-bochum-lehrstuhl-fur-industrial-sales-and-ser… (#5298)
51e3f4c Update harvard-university-of-bath.csl (#5299)
5fce84f Create cns-spectrums.csl (#5290)
bb8082c Create journal-of-surgical-oncology.csl (#5259)
90c13ae Update ruhr-universitat-bochum-lehrstuhl-fur-industrial-sales-and-ser… (#5288)
4bab1ad Update early-christianity.csl (#5289)
636ba78 Update tatup-zeitschrift-fur-technikfolgenabschatzung-in-theorie-und-… (#5291)
b7cc511 Create biotechnologia.csl (#5292)
5bab881 Update journal-of-orthopaedic-trauma.csl (#5287)
5943413 Fix locales (#5285)
302bd65 Update universite-du-quebec-a-montreal-departement-dhistoire.csl (#5286)
860ae48 Add Haaga-Helia University of Applied Sciences Harvard style (#5282)
c1c27de  Localize Metropolia style title (#5283)
508da89 Fix presentation for Methods of Information in Medicine (#5284)
53e1d0b Create geschichte-und-gesellschaft.csl (#5216)
d7ed0cb Create universite-de-geneve-departement-de-francais-moderne.csl (#5212)
80c404b Update journal-of-orthopaedic-trauma.csl (#5281)
20c143a Adding publishers' names (#5280)
6e5cd59 Update sodertorns-hogskola-oxford.csl (#5279)
52f2621 dollar-brace
a260294 Create journal-of-microbiology-and-biotechnology.csl (#5277)
1fc979e Create qeios.csl (#5261)
86347b7 GH does this for us -- again, sorry guys
b649589 Create experimental-biology-and-medicine.csl (#5276)
12ae0b1 Revert "tell sheldon about the job state"
bdcae89 tell sheldon about the job state
1240067 Add Vegetation classification and Survey (#5271)
6f398f0 Major update to Gallia.csl (#5269)
2a74b2c Update filters.yaml (#5273)
20046d2 Update spec_helper.rb (#5272)
2ee0dd8 Create the-sociological-review.csl (#5260)
5b8d09c move filters to inert file to pacify Sheldon (#5268)
e5f3315 Localize more language descriptors in style titles (#5270)
bfd2942 Localize more language descriptors in style titles (#5267)
35e276f Fix variable used for the label after indication of number of pages (#5240)
60f6371 Create Universidade-do-Estado-do-Rio-de-Janeiro.csl (#5247)
d8cc2ae Create the-journal-of-the-acoustical-society-of-america-numeric.csl (#5256)
92259c1 Create journal-of-financial-and-quantitative-analysis.csl (#5264)
6ba8aab Create journal-of-vestibular-research.csl (#5258)
0c88f41 Update european-journal-of-international-law.csl (#5265)
cff5abc Put language descriptor within parentheses
4a62709 Update monash-university-harvard.csl (#5253)
64fd1aa Localize more language descriptors in style titles (#5262)
f6519cb Localize more language descriptors in style titles (#5257)
170ccae tiny fixes for universitat-basel-iberoromanistik.csl (#5254)
b7284c9 Localize more language descriptors in style titles (#5252)
f4ef858 Add "Baishideng Publishing Group" dependents (#5251)
266e7c3 Make world-journal-of-hepatology.csl to bpg.csl parent (#5243)
9129098 fix small formatting issues for mclc.csl (#5229)
5d9560b Create crispr-journal.csl (#5249)
a217299 Change "Czech" to "Čeština" in titles (#5248)
4fef39a Create journal-of-open-research-software.csl (#5245)
2bff1a6 Change "Dutch" to "Nederlands" in titles (#5242)
f28da34 Update spec_helper.rb (#5246)
e0e977c Move content from wiki pages to markdown files (#5194)
018304c Update universite-de-montreal-apa.csl (#5239)
3b83e5c Create sodertorns-hogskola-oxford.csl (#5234)
1335378 Stop notifying 8827 port on Zotero servers (#5237)
f079b2a Update author-year disambiguation (#5238)
60bb0c9 Update technische-universitat-dresden-medizin.csl (#5236)
e374657 Create Leidraad voor juridische auteurs 2019 (Dutch) (#5223)
0450d89 Add new style for U of Mannheim, Germanistische Linguistik (#5228)
81f0689 Create health-sports-rehabilitation-medicine.csl (#5233)
c152a44 Update Gemfile.lock (#5235)
748e1eb Update geochimica-et-cosmochimica-acta.csl (#5231)
06b9ce8 Update zeitschrift-fur-theologie-und-philosophie.csl (#5230)
e747cb1 haute-ecole-de-gestion-de-geneve: Make polyglot & et al changes
4cfedb7 Create universite-de-sherbrooke-histoire.csl (#5210)
a96a61e Update journal-of-glaciology.csl (#5222)
c6a94c9 Add Journal of Human Rights (#5227)
c5c9c5f Update ruhr-universitat-bochum-lehrstuhl-fur-industrial-sales-and-ser… (#5214)
ffb7aa6 Create comparativ.csl (#5215)
e07329a Update lancaster-university-harvard.csl (#5220)
c075d41 Update mimesis-edizioni.csl (#5219)
502970a Removed space in year only citation (#5218)
13e8c6b Update acta-scientiae-veterinariae.csl (#5209)
0699da6 Remake mammallia.csl for Oct/2020 guidelines. (#5207)
b2dd3fd Update journal-of-international-business-studies.csl (#5217)
dd52bfe Update quaternaire.csl (#5199)
ccb1b0d rebuild webpage and article-journal citations in journal-of-forensic-sciences.csl (#5203)
f02f4fb Create pedosphere.csl (#5196)
70dd87a Create open-gender-journal.csl (#5198)
d272998 Create the-quarterly-journal-of-economics.csl (#5197)
d27cab3 fix locale issues, add cite-locator (#5206)

git-subtree-dir: buildres/csl/csl-styles
git-subtree-split: 30fb68e
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
preferences type: code-quality Issues related to code or architecture decisions
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants