Skip to content

Commit

Permalink
Try to fix .mv (#10076)
Browse files Browse the repository at this point in the history
  • Loading branch information
koppor authored Jul 12, 2023
1 parent 61c8e87 commit 2abcb95
Show file tree
Hide file tree
Showing 5 changed files with 38 additions and 23 deletions.
12 changes: 8 additions & 4 deletions .github/workflows/refresh-journal-lists.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
name: Refresh Journal Lists

on:
# Allow to run manually
push:
paths:
- '.github/workflows/refresh-journal-lists.yml'
- 'buildSrc/build.gradle'
- 'src/main/java/org/jabref/logic/journals/**'
workflow_dispatch:

permissions:
Expand Down Expand Up @@ -58,13 +62,13 @@ jobs:
with:
token: ${{ secrets.GITHUB_TOKEN }}
branch: update-journallist
title: "[Bot] Update Journal abbrev list"
commit-message: Update journal abbrev list
title: "[Bot] Update journal abbreviation lists"
commit-message: Update journal abbreviation lists
- name: Commit and push changes
uses: EndBug/add-and-commit@v9
if: github.ref != 'refs/heads/main'
with:
message: 'Update journal abbrev list'
message: 'Update journal abbreviation lists'
committer_email: actions@github.com
fetch: false
push: true
10 changes: 9 additions & 1 deletion buildSrc/build.gradle
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
apply plugin: 'java'
plugins {
id 'java'
id 'org.openjfx.javafxplugin' version '0.0.14'
}

repositories {
mavenLocal()
Expand All @@ -11,6 +14,11 @@ dependencies {
implementation 'org.slf4j:slf4j-api:2.0.7'
}

javafx {
version = "20"
modules = [ 'javafx.base' ]
}

sourceSets{
main {
java {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package org.jabref.logic.journals;

import java.io.IOException;
import java.nio.charset.StandardCharsets;
import java.nio.file.Files;
import java.nio.file.Path;
import java.util.Collection;
Expand Down Expand Up @@ -62,6 +61,6 @@ public static JournalAbbreviationRepository loadRepository(JournalAbbreviationPr
}

public static JournalAbbreviationRepository loadBuiltInRepository() {
return loadRepository(new JournalAbbreviationPreferences(Collections.emptyList(), StandardCharsets.UTF_8, true));
return loadRepository(new JournalAbbreviationPreferences(Collections.emptyList(), true));
}
}
Original file line number Diff line number Diff line change
@@ -1,37 +1,41 @@
package org.jabref.logic.journals;

import java.nio.charset.Charset;
import java.util.List;

import javafx.beans.property.BooleanProperty;
import javafx.beans.property.SimpleBooleanProperty;
import javafx.collections.FXCollections;
import javafx.collections.ObservableList;

public class JournalAbbreviationPreferences {

private final Charset defaultEncoding;
private List<String> externalJournalLists;
private boolean useFJournalField;
private final ObservableList<String> externalJournalLists;
private final BooleanProperty useFJournalField;

public JournalAbbreviationPreferences(List<String> externalJournalLists, Charset defaultEncoding, boolean useFJournalField) {
this.externalJournalLists = externalJournalLists;
this.defaultEncoding = defaultEncoding;
this.useFJournalField = useFJournalField;
public JournalAbbreviationPreferences(List<String> externalJournalLists,
boolean useFJournalField) {
this.externalJournalLists = FXCollections.observableArrayList(externalJournalLists);
this.useFJournalField = new SimpleBooleanProperty(useFJournalField);
}

public List<String> getExternalJournalLists() {
public ObservableList<String> getExternalJournalLists() {
return externalJournalLists;
}

public void setExternalJournalLists(List<String> externalJournalLists) {
this.externalJournalLists = externalJournalLists;
public void setExternalJournalLists(List<String> list) {
externalJournalLists.clear();
externalJournalLists.addAll(list);
}

public Charset getDefaultEncoding() {
return defaultEncoding;
public boolean shouldUseFJournalField() {
return useFJournalField.get();
}

public boolean useAMSFJournalFieldForAbbrevAndUnabbrev() {
public BooleanProperty useFJournalFieldProperty() {
return useFJournalField;
}

public void setUseAMSFJournalFieldForAbbrevAndUnabbrev(boolean useFJournalField) {
this.useFJournalField = useFJournalField;
public void setUseFJournalField(boolean useFJournalField) {
this.useFJournalField.set(useFJournalField);
}
}
Binary file modified src/main/resources/journals/journal-list.mv
Binary file not shown.

0 comments on commit 2abcb95

Please sign in to comment.