Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/maintable-beta' into fixdragan…
Browse files Browse the repository at this point in the history
…drop

* upstream/maintable-beta: (48 commits)
  Clean unused imports
  Fix missing icons and wrong package for custom icons
  Consistent FX color scheme for JabRef (#3839)
  javafx replacement for file dialog (#3005)
  Reenable closing of entry preview by pressing Esc (#3883)
  Load all field editors using ViewLoader
  Use JabRef icons in FXML
  Move icon stuff to new package gui.icon
  Load EntryEditor using new ViewLoader
  Improve tooltip tests
  Fix import thread problem
  Don't use null as parameter in DialogService
  Make it easier to create FXML dialogs (#3880)
  update slf4j from 1.8.0-beta1 -> 1.8.0-beta2
  New translations JabRef_en.properties (Tagalog)
  New translations JabRef_en.properties (Italian)
  New translations Menu_en.properties (Italian)
  New translations JabRef_en.properties (Indonesian)
  New translations JabRef_en.properties (Greek)
  New translations Menu_en.properties (Greek)
  ...

# Conflicts:
#	src/main/java/org/jabref/gui/actions/CleanupAction.java
#	src/main/java/org/jabref/gui/fieldeditors/LinkedFileViewModel.java
#	src/main/java/org/jabref/gui/groups/GroupTreeController.java
#	src/main/java/org/jabref/gui/maintable/MainTable.java
#	src/main/java/org/jabref/logic/cleanup/MoveFilesCleanup.java
#	src/main/java/org/jabref/logic/cleanup/RenamePdfCleanup.java
#	src/test/java/org/jabref/logic/cleanup/MoveFilesCleanupTest.java
#	src/test/java/org/jabref/logic/cleanup/RenamePdfCleanupTest.java
  • Loading branch information
Siedlerchr committed Mar 30, 2018
2 parents d4a5af4 + afde094 commit 0bce0ec
Show file tree
Hide file tree
Showing 240 changed files with 3,623 additions and 3,123 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ For more details refer to the [field mapping help page](http://help.jabref.org/e
- We added Facebook and Twitter icons in the toolbar to link to our [Facebook](https://www.facebook.com/JabRef/) and [Twitter](https://twitter.com/jabref_org) pages.
- Renamed the _Review_ Tab into _Comments_ Tab
- We no longer print empty lines when exporting an entry in RIS format [#3634](https://github.com/JabRef/jabref/issues/3634)
- We added the option to download linked URLs in the context menu in the entry editor.
- We improved file saving so that hard links are now preserved when a save is performed [#2633](https://github.com/JabRef/jabref/issues/2633)
- We changed the default dialog option when removing a [file link](http://help.jabref.org/en/FileLinks#adding-external-links-to-an-entry) from an entry.
The new default removes the linked file from the entry instead of deleting the file from disk. [#3679](https://github.com/JabRef/jabref/issues/3679)
Expand All @@ -40,13 +41,16 @@ The new default removes the linked file from the entry instead of deleting the f
- Pressing <kbd>ESC</kbd> while searching will clear the search field and select the first entry, if available, in the table. [koppor#293](https://github.com/koppor/jabref/issues/293)
- We changed the metadata reading and writing. DublinCore is now the only metadata format, JabRef supports. (https://github.com/JabRef/jabref/pull/3710)
- We added another CLI functionality for reading and writing metadata to pdfs. (see https://github.com/JabRef/jabref/pull/3756 and see http://help.jabref.org/en/CommandLine)
- We no longer print errors in field values during autosave into the log [#3811](https://github.com/JabRef/jabref/issues/3811)


### Fixed
- We fixed several performance problems with the management of journal abbreviations [#3323](https://github.com/JabRef/jabref/issues/3323)
- We fixed an issue where changing the type of an entry did not update the label in the tool bar of the entry editor and the contents of the currently visible entry editor tab
- We fixed an issue where pressing space caused the cursor to jump to the start of the text field. [#3471](https://github.com/JabRef/jabref/issues/3471)
- We fixed the missing dot in the name of an exported file. [#3576](https://github.com/JabRef/jabref/issues/3576)
- Autocompletion in the search bar can now be disabled via the preferences. [#3598](https://github.com/JabRef/jabref/issues/3598)
- We fixed an issue where the progress of an ongoing file download was not shown correctly. [#3614](https://github.com/JabRef/jabref/issues/3614)
- We fixed an issue where odd linked files could not be selected in the entry editor. [#3639](https://github.com/JabRef/jabref/issues/3639)
- We fixed and extended the RIS import functionality to cover more fields. [#3634](https://github.com/JabRef/jabref/issues/3634) [#2607](https://github.com/JabRef/jabref/issues/2607)
- Chaining modifiers in BibTeX key pattern now works as described in the documentation. [#3648](https://github.com/JabRef/jabref/issues/3648)
Expand Down
5 changes: 3 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ configurations {
}

dependencies {
// Include all jar-files in the 'lib' folder as dependencies
compile fileTree(dir: 'lib', includes: ['*.jar'])

compile 'com.jgoodies:jgoodies-common:1.8.1'
Expand Down Expand Up @@ -123,7 +124,6 @@ dependencies {
compile 'com.google.guava:guava:24.1-jre'

// JavaFX stuff
compile 'com.airhacks:afterburner.fx:1.7.0'
compile 'de.codecentric.centerdevice:javafxsvg:1.3.0'
compile 'de.jensd:fontawesomefx-materialdesignfont:1.7.22-4'
compile 'de.saxsys:mvvmfx-validation:1.7.0'
Expand All @@ -132,6 +132,7 @@ dependencies {
compile 'org.fxmisc.flowless:flowless:0.6'
compile 'org.fxmisc.richtext:richtextfx:0.8.2'
compile 'com.sibvisions.external.jvxfx:dndtabpane:0.1'
compile 'javax.inject:javax.inject:1'


// Cannot be updated to 9.*.* until Jabref works with Java 9
Expand All @@ -141,7 +142,7 @@ dependencies {
compile 'com.mashape.unirest:unirest-java:1.4.9'

// >1.8.0-beta is required for java 9 compatibility
compile 'org.slf4j:slf4j-api:1.8.0-beta1'
compile 'org.slf4j:slf4j-api:1.8.0-beta2'
compile 'org.apache.logging.log4j:log4j-slf4j-impl:2.11.0'
compile 'org.apache.logging.log4j:log4j-jcl:2.11.0'
compile 'org.apache.logging.log4j:log4j-api:2.11.0'
Expand Down
24 changes: 13 additions & 11 deletions docs/adr/0000-use-markdown-architectural-decision-records.md
Original file line number Diff line number Diff line change
@@ -1,23 +1,25 @@
# Use Markdown Architectural Decision Records

Should we record the architectural decisions made in this project?
And if we do, wow to structure these recordings?
## Context and Problem Statement

## Considered Alternatives
We want to record architectural decisions made in this project.
Which format and structure should these records follow?

* [MADR](https://adr.github.io/madr/) - Markdown Architectural Decision Records
* [Michael Nygard's template](http://thinkrelevance.com/blog/2011/11/15/documenting-architecture-decisions) - The first incarnation of the term "ADR". Maintainable by [adr-tools](https://github.com/npryce/adr-tools).
## Considered Options

* [MADR](https://adr.github.io/madr/) 2.0.3 - The Markdown Architectural Decision Records
* [Michael Nygard's template](http://thinkrelevance.com/blog/2011/11/15/documenting-architecture-decisions) - The first incarnation of the term "ADR"
* [Sustainable Architectural Decisions](https://www.infoq.com/articles/sustainable-architectural-design-decisions) - The Y-Statements
* [DecisionRecord](https://github.com/schubmat/DecisionCapture) - Agile records by [@schubmat](https://github.com/schubmat/)
* Other templates listed at <https://github.com/joelparkerhenderson/architecture_decision_record>
* No records
* Formless - No conventions for file format and structure

## Decision Outcome

* Chosen Alternative: MADR
Chosen option: "MADR 2.0.3", because
* Implicit assumptions should be made explicit.
Design documentation is important to enable people understanding the decisions later on.
See also [A rational design process: How and why to fake it](https://doi.org/10.1109/TSE.1986.6312940).
* The MADR template is lean and fits our development style.

<!-- Pros and cons of alternatives straight-forward to elicit and therefore not captured. -->
* The MADR format is lean and fits our development style.
* The MADR structure is comprehensible and facilitates usage & maintenance.
* The MADR project is vivid.
* Version 2.0.3 is the latest one available when starting to document ADRs.
10 changes: 6 additions & 4 deletions docs/adr/0001-use-crowdin-for-translations.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
# Use Crowdin for tranlsations
# Use Crowdin for translations

## Context and Problem Statement

The JabRef UI is offered in multiple languages. It should be easy for translators to translate the strings.

## Considered Alternatives
## Considered Options

* Use [Crowdin](http://crowdin.com/)
* Use [popeye](https://github.com/JabRef/popeye)
* Use [Lingohub](https://lingohub.com/)
* Keep current GitHub flow. See the [Step-by-step guide](https://github.com/JabRef/help.jabref.org/blob/d5569bebdb0e1de5c71401bbfba45311c19c80a8/en/TranslatingGUI.md#step-by-step-guide).

## Decision Outcome

* Chosen Alternative: Crowdin
* Crowdin is easy to use, integrates in our GitHub workflow, and is free for OSS projects.
Chosen option: "Use Crowdin", because Crowdin is easy to use, integrates in our GitHub workflow, and is free for OSS projects.
43 changes: 25 additions & 18 deletions docs/adr/0002-use-slf4j-for-logging.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,13 @@
# Use slf4j together with log4j2 for logging

* Up to version 4.1 JabRef uses apache-ommons-logging 1.2 for logging errors and messages. However, this is not compatible with java 9 and is superseded by log4j.
* SLF4J provides a facade for several logging frameworks, including log4j and supports already java 9
## Context and Problem Statement

Up to version 4.1 JabRef uses apache-commons-logging 1.2 for logging errors and messages.
However, this is not compatible with java 9 and is superseded by log4j.

## Decision Drivers

* SLF4J provides a façade for several logging frameworks, including log4j and supports already java 9
* Log4j is already defined as dependency and slf4j has already been required by a third party dependency

## Considered Alternatives
Expand All @@ -11,33 +17,34 @@
* [SLF4J with Logback binding](https://logback.qos.ch/)

## Decision Outcome
* We chose slf4j with log4j2 binding, because it only requires minimal changes to our logging infrastructure and it is claimed that
> Apache Log4j 2 is an upgrade to Log4j that provides significant improvements over its predecessor, Log4j 1.x, and provides many of the improvements available in Logback while fixing some inherent problems in Logback’s architecture.
* Furthermore, as slf4j is a facade for several loggers, the underlying implementation can easily be changed in the future

Chosen option: "SLF4J with Log4j2 binding", because comes out best (see below).

## Pros and Cons of the Alternatives
## Pros and Cons of the Options

### Log4j2

* `+` Dependency already exists
* `+` Java 9 support since version 2.10
* `-` Direct dependency
* Good, because dependency already exists
* Good, because Java 9 support since version 2.10
* Bad, because direct dependency

### SLF4J with log4j2 binding

* `+` Supports other loggers as well
* `+` Java 9 support
* `+` Already defined
* `+` Migration tool available
* `-` Logger statements require a slight different syntax
* Good, because it only requires minimal changes to our logging infrastructure
* Good, because Apache Log4j 2 is an upgrade to Log4j that provides significant improvements over its predecessor, Log4j 1.x, and provides many of the improvements available in Logback while fixing some inherent problems in Logback’s architecture.
* Good, because supports other loggers as well
* Good, because Java 9 support
* Good, because already defined
* Good, because migration tool available
* Good, because it is a façade for several loggers. Thus, the underlying implementation can easily be changed in the future.
* Bad, because logger statements require a slight different syntax

### SLF4J with Logback binding

* `+` Migration tool available
* `+` Native implementation of slf4j
* `-` Java 9 support only available in alpha
* `-` Different syntax than log4j/commons logging
* Good, because migration tool available
* Good, because native implementation of slf4j
* Bad, because Java 9 support only available in alpha
* Bad, because different syntax than log4j/commons logging



2 changes: 2 additions & 0 deletions docs/adr/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ This log lists the architectural decisions for JabRef.
<!-- adrlog -->

- [ADR-0000](0000-use-markdown-architectural-decision-records.md) - Use Markdown Architectural Decision Records
- [ADR-0001](0001-use-crowdin-for-translations.md) - Use Crowdin for translations
- [ADR-0002](0002-use-slf4j-for-logging.md) - Use slf4j together with log4j2 for logging

<!-- adrlogstop -->

Expand Down
43 changes: 19 additions & 24 deletions docs/adr/template.md
Original file line number Diff line number Diff line change
@@ -1,75 +1,70 @@
# [short title of solved problem and solution]

* Status: [accepted | superseeded by [ADR-0005](0005-example.md) | deprecated | ...] <!-- optional -->
* Status: [accepted | superseeded by [ADR-0005](0005-example.md) | deprecated | ] <!-- optional -->
* Deciders: [list everyone involved in the decision] <!-- optional -->
* Date: [when the decision was last updated] <!-- optional -->
* Date: [YYYY-MM-DD when the decision was last updated] <!-- optional -->

Technical Story: [description | ticket/issue URL] <!-- optional -->


## Context and Problem Statement
[Describe the context and problem statement, e.g., in free form using two to three sentences. You may want to articulate the problem in form of a question.]

[Describe the context and problem statement, e.g., in free form using two to three sentences. You may want to articulate the problem in form of a question.]

## Decision Drivers <!-- optional -->

* [driver 1, e.g., a force, facing concern, ...]
* [driver 2, e.g., a force, facing concern, ...]
* ... <!-- numbers of drivers can vary -->

* [driver 1, e.g., a force, facing concern, …]
* [driver 2, e.g., a force, facing concern, …]
*<!-- numbers of drivers can vary -->

## Considered Options

* [option 1]
* [option 2]
* [option 3]
* ... <!-- numbers of options can vary -->

*<!-- numbers of options can vary -->

## Decision Outcome

Chosen option: "[option 1]", because [justification. e.g., only option, which meets k.o. criterion decision driver | which resolves force force | ... | comes out best (see below)].
Chosen option: "[option 1]", because [justification. e.g., only option, which meets k.o. criterion decision driver | which resolves force force | | comes out best (see below)].

Positive Consequences: <!-- optional -->
* [e.g., improvement of quality attribute satisfaction, follow-up decisions required, ...]
* ...
* [e.g., improvement of quality attribute satisfaction, follow-up decisions required, ]
*

Negative consequences: <!-- optional -->
* [e.g., compromising quality attribute, follow-up decisions required, ...]
* ...

* [e.g., compromising quality attribute, follow-up decisions required, …]
*

## Pros and Cons of the Options <!-- optional -->

### [option 1]

[example | description | pointer to more information | ...] <!-- optional -->
[example | description | pointer to more information | ] <!-- optional -->

* Good, because [argument a]
* Good, because [argument b]
* Bad, because [argument c]
* ... <!-- numbers of pros and cons can vary -->
* <!-- numbers of pros and cons can vary -->

### [option 2]

[example | description | pointer to more information | ...] <!-- optional -->
[example | description | pointer to more information | ] <!-- optional -->

* Good, because [argument a]
* Good, because [argument b]
* Bad, because [argument c]
* ... <!-- numbers of pros and cons can vary -->
* <!-- numbers of pros and cons can vary -->

### [option 3]

[example | description | pointer to more information | ...] <!-- optional -->
[example | description | pointer to more information | ] <!-- optional -->

* Good, because [argument a]
* Good, because [argument b]
* Bad, because [argument c]
* ... <!-- numbers of pros and cons can vary -->

*<!-- numbers of pros and cons can vary -->

## Links <!-- optional -->

* [Link type] [Link to ADR] <!-- example: Refined by [ADR-0005](0005-example.md) -->
* ... <!-- numbers of links can vary -->
* <!-- numbers of links can vary -->
5 changes: 5 additions & 0 deletions javafx/scene/control/annotations.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<root>
<item name='javafx.scene.control.Dialog dialogPane'>
<annotation name='javafx.fxml.FXML'/>
</item>
</root>
Binary file added lib/afterburner.fx.jar
Binary file not shown.
8 changes: 8 additions & 0 deletions src/main/java/org/jabref/Globals.java
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
import org.jabref.gui.util.DefaultFileUpdateMonitor;
import org.jabref.gui.util.DefaultTaskExecutor;
import org.jabref.gui.util.TaskExecutor;
import org.jabref.gui.util.ThemeLoader;
import org.jabref.logic.exporter.ExporterFactory;
import org.jabref.logic.importer.ImportFormatReader;
import org.jabref.logic.journals.JournalAbbreviationLoader;
Expand Down Expand Up @@ -61,6 +62,7 @@ public class Globals {
// Background tasks
private static GlobalFocusListener focusListener;
private static DefaultFileUpdateMonitor fileUpdateMonitor;
private static ThemeLoader themeLoader;
private static TelemetryClient telemetryClient;

private Globals() {
Expand All @@ -81,6 +83,8 @@ public static void startBackgroundTasks() {
Globals.fileUpdateMonitor = new DefaultFileUpdateMonitor();
JabRefExecutorService.INSTANCE.executeInterruptableTask(Globals.fileUpdateMonitor, "FileUpdateMonitor");

themeLoader = new ThemeLoader(fileUpdateMonitor);

if (Globals.prefs.shouldCollectTelemetry() && !GraphicsEnvironment.isHeadless()) {
startTelemetryClient();
}
Expand Down Expand Up @@ -130,4 +134,8 @@ public static void stopBackgroundTasks() {
public static Optional<TelemetryClient> getTelemetryClient() {
return Optional.ofNullable(telemetryClient);
}

public static ThemeLoader getThemeLoader() {
return themeLoader;
}
}
5 changes: 2 additions & 3 deletions src/main/java/org/jabref/JabRefGUI.java
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,13 @@
import javafx.scene.Scene;
import javafx.stage.Stage;

import org.jabref.gui.AbstractView;
import org.jabref.gui.BasePanel;
import org.jabref.gui.DialogService;
import org.jabref.gui.FXDialogService;
import org.jabref.gui.GUIGlobals;
import org.jabref.gui.IconTheme;
import org.jabref.gui.JabRefFrame;
import org.jabref.gui.dialogs.BackupUIManager;
import org.jabref.gui.icon.IconTheme;
import org.jabref.gui.importer.ParserResultWarningDialog;
import org.jabref.gui.importer.actions.OpenDatabaseAction;
import org.jabref.gui.shared.SharedDatabaseUIManager;
Expand Down Expand Up @@ -150,7 +149,7 @@ private void openWindow(Stage mainStage) {
}

Scene scene = new Scene(JabRefGUI.mainFrame, 800, 800);
scene.getStylesheets().add(AbstractView.class.getResource("Main.css").toExternalForm());
Globals.getThemeLoader().installBaseCss(scene);
mainStage.setTitle(JabRefFrame.FRAME_TITLE);
mainStage.getIcons().addAll(IconTheme.getLogoSetFX());
mainStage.setScene(scene);
Expand Down
35 changes: 0 additions & 35 deletions src/main/java/org/jabref/gui/AbstractController.java

This file was deleted.

Loading

0 comments on commit 0bce0ec

Please sign in to comment.