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

updata #1

Merged
merged 6 commits into from
May 28, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,11 @@ jobs:
key: ${{ runner.os }}-gradle-${{ hashFiles('gradle/wrapper/gradle-wrapper.properties') }}
- name: Run checkstyle
run: ./gradlew checkstyleMain checkstyleTest checkstyleJmh
- name: Run markdown-lint
uses: koppor/markdown-lint@master
with:
args: CHANGELOG.md README.md docs/
config: '.markdownlint.yml'
tests:
name: Unit tests
runs-on: ubuntu-latest
Expand Down
18 changes: 18 additions & 0 deletions .markdownlint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
default: true

# Using h2 has side effects in GitBook's toc. Thus, we sometimes switch from h1 to h3
MD001: false

MD012:
# 2 are required, because GitBook adss two blank lines at the end of a file
maximum: 2

MD013: false

# The FAQs state questions - we allow them
MD026:
punctuation: ".,;:!"

MD033:
# we have <a> tags with ids
allowed_elements: ['a']
8 changes: 6 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ Note that this project **does not** adhere to [Semantic Versioning](http://semve
## [Unreleased]

### Added

- We added the Library properties to a context menu on the library tabs [#6485](https://github.com/JabRef/jabref/issues/6485)
- We added a new field in the preferences in 'BibTeX key generator' for unwanted characters that can be user-specified. [#6295](https://github.com/JabRef/jabref/issues/6295)
- We added support for searching ShortScience for an entry through the user's browser. [#6018](https://github.com/JabRef/jabref/pull/6018)
Expand All @@ -24,6 +25,8 @@ Note that this project **does not** adhere to [Semantic Versioning](http://semve
- We fixed the bug when strike the delete key in the text field. [#6421](https://github.com/JabRef/jabref/issues/6421)
- We added a BibTex key modifier for truncating strings. [#3915](https://github.com/JabRef/jabref/issues/3915)
- We added support for jumping to target entry when typing letter/digit after sorting a column in maintable [#6146](https://github.com/JabRef/jabref/issues/6146)
- We added a new fetcher to enable users to search all available E-Libraries simultaneously. [koppor#369](https://github.com/koppor/jabref/issues/369)
- We added the field "entrytype" to the export sort criteria [#6531](https://github.com/JabRef/jabref/pull/6531)

### Changed

Expand Down Expand Up @@ -128,6 +131,7 @@ Note that this project **does not** adhere to [Semantic Versioning](http://semve
- We fixed an issue where the blue and red text colors in the Merge entries dialog were not quite visible [#6334](https://github.com/JabRef/jabref/issues/6334)
- We fixed an issue where underscore character was removed from the file name in the Recent Libraries list in File menu [#6383](https://github.com/JabRef/jabref/issues/6383)
- We fixed an issue where few keyboard shortcuts regarding new entries were missing [#6403](https://github.com/JabRef/jabref/issues/6403)

### Removed

- Ampersands are no longer escaped by default in the `bib` file. If you want to keep the current behaviour, you can use the new "Escape Ampersands" formatter as a save action. [#5869](https://github.com/JabRef/jabref/issues/5869)
Expand Down Expand Up @@ -303,8 +307,8 @@ Note that this project **does not** adhere to [Semantic Versioning](http://semve
- We fixed an issue where some journal names were wrongly marked as abbreviated. [#4115](https://github.com/JabRef/jabref/issues/4115)
- We fixed an issue where the custom file column were sorted incorrectly. [#3119](https://github.com/JabRef/jabref/issues/3119)
- We improved the parsing of author names whose infix is abbreviated without a dot. [#4864](https://github.com/JabRef/jabref/issues/4864)
- We fixed an issues where the entry losses focus when a field is edited and at the same time used for sorting. https://github.com/JabRef/jabref/issues/3373
- We fixed an issue where the menu on Mac OS was not displayed in the usual Mac-specific way. https://github.com/JabRef/jabref/issues/3146
- We fixed an issues where the entry losses focus when a field is edited and at the same time used for sorting. [#3373](https://github.com/JabRef/jabref/issues/3373)
- We fixed an issue where the menu on Mac OS was not displayed in the usual Mac-specific way. [#3146](https://github.com/JabRef/jabref/issues/3146)
- We improved the integrity check for page numbers. [#4113](https://github.com/JabRef/jabref/issues/4113) and [feature request in the forum](http://discourse.jabref.org/t/pages-field-allow-use-of-en-dash/1199)
- We fixed an issue where the order of fields in customized entry types was not saved correctly. [#4033](http://github.com/JabRef/jabref/issues/4033)
- We fixed an issue where renaming a group did not change the group name in the interface. [#3189](https://github.com/JabRef/jabref/issues/3189)
Expand Down
2 changes: 1 addition & 1 deletion docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ This log lists the decisions for JabRef.
* [ADR-0007](adr/0007-human-readable-changelog.md) - Provide a human-readable changelog
* [ADR-0008](adr/0008-use-public-final-instead-of-getters.md) - Use public final instead of getters to offer access to immutable variables
* [ADR-0009](adr/0009-use-plain-junit5-for-testing.md) - Use Plain JUnit5 for advanced test assertions
* [ADR-0010](0010-use-h2-as-internal-database.md) - Use H2 as Internal SQL Database
* [ADR-0010](adr/0010-use-h2-as-internal-database.md) - Use H2 as Internal SQL Database

For new ADRs, please use [template.md](adr/template.md) as basis. More information on MADR is available at [https://adr.github.io/madr/](https://adr.github.io/madr/). General information about architectural decision records is available at [https://adr.github.io/](https://adr.github.io/).

1 change: 1 addition & 0 deletions docs/adr/0004-use-mariadb-connector.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,4 @@ The [MySQL Connector](https://www.mysql.com/de/products/connector/) is distribut
* Good, because it stems from the same development team than MySQL
* Bad, because the "Universal FOSS Exception" makes licensing more complicated.

<!-- markdownlint-disable-file MD024 -->
1 change: 1 addition & 0 deletions docs/adr/0006-only-translated-strings-in-language-file.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,3 +44,4 @@ Chosen option: "Only translated strings in language file", because comes out bes

* Related to [ADR-0001](0001-use-crowdin-for-translations.md).

<!-- markdownlint-disable-file MD024 -->
28 changes: 14 additions & 14 deletions docs/adr/template.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# \[short title of solved problem and solution\]

* Status: \[proposed \| rejected \| accepted \| deprecated \| … \| superseded by [ADR-0005](https://github.com/JabRef/jabref/tree/8c07a88a823a84aebe987cdb717f318ed00a872d/docs/adr/0005-example.md)\]
* Deciders: \[list everyone involved in the decision\]
* Date: \[YYYY-MM-DD when the decision was last updated\]
* Status: \[proposed \| rejected \| accepted \| deprecated \| … \| superseded by [ADR-0005](0005-fully-support-utf8-only-for-latex-files.md)\]
* Deciders: \[list everyone involved in the decision\]
* Date: \[YYYY-MM-DD when the decision was last updated\]

Technical Story: \[description \| ticket/issue URL\]
Technical Story: \[description \| ticket/issue URL\]

## Context and Problem Statement

Expand All @@ -14,14 +14,14 @@ Technical Story: \[description \| ticket/issue URL\]

* \[driver 1, e.g., a force, facing concern, …\]
* \[driver 2, e.g., a force, facing concern, …\]
* …
* …

## Considered Options

* \[option 1\]
* \[option 2\]
* \[option 3\]
* …
* …

## Decision Outcome

Expand All @@ -41,33 +41,33 @@ Chosen option: "\[option 1\]", because \[justification. e.g., only option, which

### \[option 1\]

\[example \| description \| pointer to more information \| …\]
\[example \| description \| pointer to more information \| …\]

* Good, because \[argument a\]
* Good, because \[argument b\]
* Bad, because \[argument c\]
* …
* …

### \[option 2\]

\[example \| description \| pointer to more information \| …\]
\[example \| description \| pointer to more information \| …\]

* Good, because \[argument a\]
* Good, because \[argument b\]
* Bad, because \[argument c\]
* …
* …

### \[option 3\]

\[example \| description \| pointer to more information \| …\]
\[example \| description \| pointer to more information \| …\]

* Good, because \[argument a\]
* Good, because \[argument b\]
* Bad, because \[argument c\]
* …
* …

## Links

* \[Link type\] \[Link to ADR\]
* …
* \[Link type\] \[Link to ADR\]
* …

7 changes: 4 additions & 3 deletions docs/code-howtos.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ Principles:
Localization.lang("Something went wrong...", ioe);
}
```

* Never, ever throw and catch `Exception` or `Throwable`
* Errors should only be logged when they are finally caught \(i.e., logged only once\). See **Logging** for details.
* If the Exception message is intended to be shown to the User in the UI \(see below\) provide also a localizedMessage \(see `JabRefException`\).
Expand All @@ -45,7 +46,7 @@ To show error message two different ways are usually used in JabRef:
* showing an error dialog
* updating the status bar at the bottom of the main window

_TODO: Usage of status bar and Swing Dialogs_
_*TODO: Usage of status bar and Swing Dialogs*_

## Using the EventSystem

Expand Down Expand Up @@ -138,7 +139,7 @@ JabRef uses the logging facade [SLF4j](https://www.slf4j.org/). All log messages

## Using Localization correctly

_\(More information about this topic from the translator side is provided under this link:_ [_Translating JabRef Interface_](https://github.com/JabRef/jabref/wiki/Translating-JabRef-Interface) _about the JabRef interface and_ [_Translating JabRef Help_](https://github.com/JabRef/jabref/wiki/Translating-JabRef-Help) _about the JabRef help files\)_
More information about this topic from the translator side is provided at [Translating JabRef Interface](https://docs.jabref.org/faqcontributing/how-to-translate-the-ui).

All labeled UI elements, descriptions and messages shown to the user should be localized, i.e., should be displayed in the chosen language.

Expand Down Expand Up @@ -179,7 +180,7 @@ The tests check whether translation strings appear correctly in the resource bun

We try to build a cleanup mechanism based on formatters. The idea is that we can register these actions in arbitrary places, e.g., onSave, onImport, onExport, cleanup, etc. and apply them to different fields. The formatters themself are independent of any logic and therefore easy to test.

Example: [PageNumbersFormatter](https://github.com/JabRef/jabref/blob/master/src/main/java/net/sf/jabref/logic/formatter/bibtexfields/PageNumbersFormatter.java)
Example: [NormalizePagesFormatter](https://github.com/JabRef/jabref/blob/master/src/main/java/org/jabref/logic/formatter/bibtexfields/NormalizePagesFormatter.java)

## Drag and Drop

Expand Down
2 changes: 1 addition & 1 deletion docs/code-quality.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ We monitor the general source code quality at three places:

We strongly recommend to read following two books on code quality:

* [Java by Comparison](https://github.com/JabRef/jabref/tree/c81740b3818c7f9311a6d7ff063243e672c821b4/docs/java.by-comparison.com) is a book by three JabRef developers which focuses on code improvements close to single statements. It is fast to read and one gains much information from each recommendation discussed in the book.
* [Java by Comparison](http://java.by-comparison.com) is a book by three JabRef developers which focuses on code improvements close to single statements. It is fast to read and one gains much information from each recommendation discussed in the book.
* [Effective Java](https://www.oreilly.com/library/view/effective-java-3rd/9780134686097/) is the standard book for advanced Java programming. Did you know that `enum` is the [recommended way to enforce a singleton instance of a class](https://learning.oreilly.com/library/view/effective-java-3rd/9780134686097/ch2.xhtml#lev3)? Did you know that one should [refer to objects by their interfaces](https://learning.oreilly.com/library/view/effective-java-3rd/9780134686097/ch9.xhtml#lev64)?

The principles we follow to ensure high code quality in JabRef is stated at our [Development Strategy](development-strategy.md).
4 changes: 2 additions & 2 deletions docs/guidelines-for-setting-up-a-local-workspace.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ It is strongly recommend that you have git installed.

We suggest [IntelliJ IDEA](https://www.jetbrains.com/idea/) or [Eclipse (for advanced users)](https://eclipse.org/) \(`2020-03` or newer\).

Under Ubuntu Linux, you can follow the [documentation from the Ubuntu Community](https://help.ubuntu.com/community/EclipseIDE#Download_Eclipse) or the [step-by-step guideline from Krizna](https://github.com/JabRef/jabref/tree/be9c788de804c2bd9e3abaf76b082b6b2e82e66f/docs/www.krizna.com/ubuntu/install-eclipse-in-ubuntu-12-04/README.md) to install Eclipse. Under Windows, download it from [www.eclipse.org](http://www.eclipse.org/downloads/) and run the installer.
Under Ubuntu Linux, you can follow the [documentation from the Ubuntu Community](https://help.ubuntu.com/community/EclipseIDE#Download_Eclipse) or the [step-by-step guideline from Krizna](https://www.krizna.com/ubuntu/install-eclipse-in-ubuntu-12-04/) to install Eclipse. Under Windows, download it from [www.eclipse.org](http://www.eclipse.org/downloads/) and run the installer.

### Other Tooling

Expand All @@ -74,7 +74,7 @@ This section explains how you get the JabRef code onto your machine in a form al
1. Log into your GitHub account
2. Go to [https://github.com/JabRef/jabref](https://github.com/JabRef/jabref)
3. Create a fork by clicking at fork button on the right top corner
4. A fork repository will be created under your account \([https://github.com/YOUR\_USERNAME/jabref](https://github.com/YOUR_USERNAME/jabref)\)
4. A fork repository will be created under your account `https://github.com/YOUR\_USERNAME/jabref`.

### Clone your forked repository on your local machine

Expand Down
8 changes: 4 additions & 4 deletions docs/javafx.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ JabRef's recommendations about JavaFX
The goal of the MVVM architecture is to separate the state/behavior from the appearance of the ui. This is archived by dividing JabRef into different layers, each having a clear responsibility.

* The _Model_ contains the business logic and data structures. These aspects are again encapsulated in the _logic_ and _model_ package, respectively.
* The _View_ controls the appearance and structure of the UI. It is usually defined in a _FXML_ file.
* The _View_ controls the appearance and structure of the UI. It is usually defined in a _FXML_ file.
* _View model_ converts the data from logic and model in a form that is easily usable in the gui. Thus it controls the state of the View. Moreover, the ViewModel contains all the logic needed to change the current state of the UI or perform an action. These actions are usually passed down to the _logic_ package, after some data validation. The important aspect is that the ViewModel contains all the ui-related logic but does _not_ have direct access to the controls defined in the View. Hence, the ViewModel can easily be tested by unit tests.
* The _Controller_ initializes the view model and binds it to the view. In an ideal world all the binding would already be done directly in the FXML. But JavaFX's binding expressions are not yet powerful enough to accomplish this. It is important to keep in mind that the Controller should be as minimalistic as possible. Especially one should resist the temptation to validate inputs in the controller. The ViewModel should handle data validation! It is often convenient to load the FXML file directly from the controller.

Expand Down Expand Up @@ -134,14 +134,14 @@ private void openJabrefWebsite() {

### View - FXML

The view consists a FXML file `MyDialog.fxml` which defines the structure and the layout of the UI. Moreover, the FXML file may be accompanied by a style file that should have the same name as the FXML file but with a `css` ending, e.g., `MyDialog.css`. It is recommended to use a graphical design tools like [SceneBuilder](http://gluonhq.com/labs/scene-builder/) to edit the FXML file. The tool [Scenic View](http://fxexperience.com/scenic-view/) is very helpful in debugging styling issues.
The view consists a FXML file `MyDialog.fxml` which defines the structure and the layout of the UI. Moreover, the FXML file may be accompanied by a style file that should have the same name as the FXML file but with a `css` ending, e.g., `MyDialog.css`. It is recommended to use a graphical design tools like [SceneBuilder](http://gluonhq.com/labs/scene-builder/) to edit the FXML file. The tool [Scenic View](https://github.com/JonathanGiles/scenic-view) is very helpful in debugging styling issues.

## Resources

* [curated list of awesome JavaFX frameworks, libraries, books and etc...](https://github.com/mhrimaz/AwesomeJavaFX)
* [ControlsFX](http://fxexperience.com/controlsfx/features/) amazing collection of controls
* [usage of icon fonts with JavaFX](http://aalmiray.github.io/ikonli/#_javafx) or [jIconFont](https://github.com/jIconFont/jiconfont-google_material_design_icons) or [fontawesomefx](https://bitbucket.org/Jerady/fontawesomefx/)
* [Undo manager](https://github.com/TomasMikula/UndoFX)
* [jIconFont](http://jiconfont.github.io/googlematerialdesignicons) or [fontawesomefx](https://bitbucket.org/Jerady/fontawesomefx/)
* [Undo manager](https://github.com/FXMisc/UndoFX)
* [Docking manager](https://github.com/alexbodogit/AnchorFX) [or](https://github.com/RobertBColton/DockFX)
* [additional bindings](https://github.com/lestard/advanced-bindings) or [EasyBind](https://github.com/TomasMikula/EasyBind)
* [Kubed](https://github.com/hudsonb/kubed): data visualization \(inspired by d3\)
Expand Down
2 changes: 1 addition & 1 deletion docs/jpackage.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# jpackage

JabRef uses [jpackage](https://jdk.java.net/jpackage/) to build binary distributions for Windows, Linux, and Mac OS X.
JabRef uses [jpackage](https://openjdk.java.net/jeps/343) to build binary distributions for Windows, Linux, and Mac OS X.

## Build Windows binaries locally

Expand Down
5 changes: 3 additions & 2 deletions docs/teaching.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ Course: Open Source Software Development

Course [CS499 - Open Source Software Development](https://github.com/igorsteinmacher/CS499-OSS)

- Summary: Students experience the process of getting involved in an Open Source project by engaging with a real project. Their goal is to make a "substantial" contribution to a project.
- Summary: Students experience the process of getting involved in an Open Source project by engaging with a real project. Their goal is to make a "substantial" contribution to a project.
- Course offered in 2018

### German
Expand Down Expand Up @@ -122,7 +122,8 @@ Course [Open Source Software](https://github.com/igorsteinmacher/DSL-UTFPR)

## Interesting Read for Students and Advisors

- [Developing Procrastination Feedback for Student Software Developers](https://medium.com/@ayaankazerouni/developing-procrastination-feedback-for-student-software-developers-1652de60db7f) by [@ayaankazerouni](https://github.com/ayaankazerouni?tab=overview&from=2015-12-01&to=2015-12-31)
- [Developing Procrastination Feedback for Student Software Developers](https://medium.com/@ayaankazerouni/developing-procrastination-feedback-for-student-software-developers-1652de60db7f) by [@ayaankazerouni](https://github.com/ayaankazerouni?tab=overview&from=2015-12-01&to=2015-12-31)

> When students worked earlier and more often, they produced projects that:
>
> - were more correct,
Expand Down
13 changes: 13 additions & 0 deletions mlc_config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"ignorePatterns": [
{
"pattern": "^https://dl\\.acm\\.org"
},
{
"pattern": "^http://purl\\.org/net/bibteXMP"
},
{
"pattern": "^http://localhost"
}
]
}
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
import org.jabref.model.database.shared.DatabaseLocation;
import org.jabref.model.entry.field.Field;
import org.jabref.model.entry.field.FieldFactory;
import org.jabref.model.entry.field.InternalField;
import org.jabref.model.metadata.MetaData;
import org.jabref.model.metadata.SaveOrderConfig;
import org.jabref.preferences.PreferencesService;
Expand Down Expand Up @@ -106,6 +107,8 @@ void setValues() {
}

Set<Field> fieldNames = FieldFactory.getCommonFields();
// allow entrytype field as sort criterion
fieldNames.add(InternalField.TYPE_HEADER);
primarySortFieldsProperty.addAll(fieldNames);
secondarySortFieldsProperty.addAll(fieldNames);
tertiarySortFieldsProperty.addAll(fieldNames);
Expand Down
Loading