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

merge with origin/master #2

Merged
merged 18 commits into from
Oct 19, 2019
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
1 change: 0 additions & 1 deletion AUTHORS
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@ Eduard Braun
Eduardo Greco
Egon Willighagen
Ellen Reitmayr
Erdem Derebasoglu
Erdem Derebaşoğlu
Erik Putrycz
Ervin Kolenovic
Expand Down
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ We refer to [GitHub issues](https://github.com/JabRef/jabref/issues) by using `#
- We added a short DOI field formatter which shortens DOI to more human-readable form. [koppor#343](https://github.com/koppor/jabref/issues/343)
- We improved the display of group memberships by adding multiple colored bars if the entry belongs to more than one group. [#4574](https://github.com/JabRef/jabref/issues/4574)
- We added an option to show the preview as an extra tab in the entry editor (instead of in a split view). [#5244](https://github.com/JabRef/jabref/issues/5244)
- A custom Open/LibreOffice jstyle file now requires a layout line for the entry type `default` [#5452](https://github.com/JabRef/jabref/issues/5452)

### Fixed

Expand All @@ -32,9 +33,12 @@ We refer to [GitHub issues](https://github.com/JabRef/jabref/issues) by using `#
- We fixed an issue where empty keywords lead to a strange display of automatic keyword groups. [#5333](https://github.com/JabRef/jabref/issues/5333)
- We fixed an error where the default color of a new group was white instead of dark gray. [#4868](https://github.com/JabRef/jabref/issues/4868)
- We fixed an issue where the first field in the entry editor got the focus while performing a different action (like searching). [#5084](https://github.com/JabRef/jabref/issues/5084)
- We fixed an issue where multiple entries were highlighted in the web search result after scrolling. [#5035](https://github.com/JabRef/jabref/issues/5035)
- We fixed an issue where the hover indication in the web search pane was not working. [#5277](https://github.com/JabRef/jabref/issues/5277)
- We fixed an error mentioning "javafx.controls/com.sun.javafx.scene.control" that was thrown when interacting with the toolbar.
- We fixed an error where a cleared search was restored after switching libraries. [#4846](https://github.com/JabRef/jabref/issues/4846)
- We fixed an exception which occurred when trying to open a non-existing file from the "Recent files"-menu [#5334](https://github.com/JabRef/jabref/issues/5334)
- We fixed an issues where the search highlight in the entry preview did not worked. [#5069](https://github.com/JabRef/jabref/issues/5069)
- The context menu for fields in the entry editor is back. [#5254](https://github.com/JabRef/jabref/issues/5254)
- We fixed an exception which occurred when trying to open a non-existing file from the "Recent files"-menu [#5334](https://github.com/JabRef/jabref/issues/5334)
- We fixed a problem where the "editor" information has been duplicated during saving a .bib-Database. [#5359](https://github.com/JabRef/jabref/issues/5359)
Expand All @@ -43,6 +47,10 @@ We refer to [GitHub issues](https://github.com/JabRef/jabref/issues) by using `#
- We fixed some display errors in the preferences dialog and replaced some of the controls [#5033](https://github.com/JabRef/jabref/pull/5033) [#5047](https://github.com/JabRef/jabref/pull/5047) [#5062](https://github.com/JabRef/jabref/pull/5062) [#5141](https://github.com/JabRef/jabref/pull/5141) [#5185](https://github.com/JabRef/jabref/pull/5185) [#5265](https://github.com/JabRef/jabref/pull/5265) [#5315](https://github.com/JabRef/jabref/pull/5315) [#5360](https://github.com/JabRef/jabref/pull/5360)
- We fixed an exception which occurred when trying to import entries without an open library. [#5447](https://github.com/JabRef/jabref/issues/5447)
- After successful import of one or multiple bib entries the main table scrolls to the first imported entry [#5383](https://github.com/JabRef/jabref/issues/5383)

- We fixed an exception which occurred when an invalid jstyle was loaded. [#5452](https://github.com/JabRef/jabref/issues/5452)


- We fixed an error where preview theme did not change when the preerences were set in "Dark" mode [#5463](https://github.com/JabRef/jabref/issues/5463)

### Removed
Expand Down
20 changes: 5 additions & 15 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@

After reading through this guide, check out some good first issues to contribute to by clicking here: [Good First Issues](https://github.com/JabRef/jabref/issues?q=is%3Aissue+is%3Aopen+label%3A%22good+first+issue%22)


## Understanding the basics

We welcome contributions to JabRef and encourage you to follow the GitHub workflow specified below. If you are not familiar with this type of workflow, take a look at GitHub's excellent overview on the [GitHub flow](https://guides.github.com/introduction/flow/index.html) and the explanation of [Feature Branch Workflow](https://atlassian.com/git/tutorials/comparing-workflows#feature-branch-workflow) for the idea behind this kind of development.

1. Get the JabRef code on your local machine. Detailed instructions about this step can be found in our [guidelines for setting up a local workspace](https://github.com/JabRef/jabref/wiki/Guidelines-for-setting-up-a-local-workspace).
1. Fork the JabRef into your GitHub account.
2. Clone your forked repository on your local machine.
Expand All @@ -14,22 +14,20 @@ We welcome contributions to JabRef and encourage you to follow the GitHub workfl
4. Create a pull request. For an overview of pull requests, take a look at GitHub's [pull request help documentation](https://help.github.com/articles/about-pull-requests/).
5. In case your pull request is not yet complete or not yet ready for review, consider creating a [draft pull request](https://github.blog/2019-02-14-introducing-draft-pull-requests/) instead.

In case you have any questions, do not hesitate to write one of our [JabRef developers](https://github.com/orgs/JabRef/teams/developers) an email. We should also be online at [gitter](https://gitter.im/JabRef/jabref).

In case you have any questions, do not hesitate to write one of our [JabRef developers](https://github.com/orgs/JabRef/teams/developers) an email.
We should also be online at [gitter](https://gitter.im/JabRef/jabref).

## Formal requirements for a pull request

The main goal of the formal requirements is to provide credit to you and to be able to understand the patch.


### Add your change to CHANGELOG.md

You should edit the [CHANGELOG.md](CHANGELOG.md) located in the root directory of the JabRef source.
Add a line with your changes in the appropriate section.

If you did internal refactorings or improvements not visible to the user (e.g., UI, .bib file), then you don't need to put an entry there.


#### Key format

Example: `<kbd>Ctrl</kbd> + <kbd>Enter</kbd>`
Expand All @@ -41,7 +39,6 @@ In case you add keys to the changelog, please follow these rules:
- Combined keys separated by `+`
- Spaces before and after separator `+`


### Author credits

You will be given credit in the [`AUTHORS`](AUTHORS) file in the root of the repository and the 'About' pages inside the main application.
Expand All @@ -58,21 +55,18 @@ The contribution information is tracked via the version control system.

Your contribution is considered being made under [MIT license](https://tldrlegal.com/license/mit-license).


### Write a good commit message

See [good commit message] or [commit guidelines section of Pro Git].
The first line of your commit message is automatically taken as the title for the pull-request.
All other lines make up the body of the pull request. Add the words `fixes #xxx` to your PR to auto-close the corresponding issue.


### Test your code

We know that writing test cases takes a lot of time.
Nevertheless, we rely on our test cases to ensure that a bug fix or a feature implementation doesn't break anything.
In case you do not have time to add a test case, we nevertheless ask you to at least run `gradlew check` to ensure that your change doesn't break anything else.


### When adding a library

Please try to use a version available at jCenter and add it to `build.gradle`.
Expand All @@ -82,7 +76,6 @@ Also add a txt file stating the license in `libraries/`.
It is used at `gradlew processResources` to generate the About.html files.
You can see the result in `build\resources\main\help\en\About.html` or when clicking Help -> About.


### When making an architectural decision

In case you add a library or do major code rewrites, we ask you to document your decision.
Expand All @@ -92,7 +85,7 @@ We simply ask to create a new markdown file in `docs/adr` following the template

In case you want to directly add a comment to a class, simply use following template (based on [sustainable architectural decisions](https://www.infoq.com/articles/sustainable-architectural-design-decisions)):

```
```text
In the context of <use case/user story u>,
facing <concern c>
we decided for <option o>
Expand All @@ -102,15 +95,14 @@ accepting <downside / undesired consequences>,
because <additional rationale>.
```


### When adding a new Localization.lang entry

Add new `Localization.lang("KEY")` to a Java file.
The tests will fail. In the test output a snippet is generated, which must be added to the English translation file.

Example:

```
```text
java.lang.AssertionError: DETECTED LANGUAGE KEYS WHICH ARE NOT IN THE ENGLISH LANGUAGE FILE
PASTE THESE INTO THE ENGLISH LANGUAGE FILE
[
Expand All @@ -127,7 +119,6 @@ You can also directly run the specific test in your IDE.
The test "LocalizationConsistencyTest" is placed under `src/test/java/net.sf.jabref.logic.l10n/LocalizationConsistencyTest.java`
Find more information in the [JabRef Wiki](https://github.com/JabRef/jabref/wiki/Code-Howtos#using-localization-correctly).


### Create a pull request

Create a pull request on GitHub.
Expand All @@ -136,6 +127,5 @@ For text inspirations, consider [How to write the perfect pull request](https://
If you want to indicate that a pull request is not yet complete **before** creating the pull request, you may consider creating a [draft pull request](https://github.blog/2019-02-14-introducing-draft-pull-requests/).
Alternatively, once the PR has been created, you can add the prefix `[WIP]` (which stands for "Work in Progress") to indicate that the pull request is not yet complete, but you want to discuss something or inform about the current state of affairs.


[commit guidelines section of Pro Git]: http://git-scm.com/book/en/Distributed-Git-Contributing-to-a-Project#Commit-Guidelines
[good commit message]: https://github.com/joelparkerhenderson/git_commit_message
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ JabRef supports you in every step of your research work.

#### Organize

- Group your research into hierarchical collections and organize research items based on keywords/tags, search terms or your own manual assignments
- Group your research into hierarchical collections and organize research items based on keywords/tags, search terms or your manual assignments
- Advanced search and filter features
- Complete and fix bibliographic data by comparing with curated online catalogues such as Google Scholar, Springer or MathSciNet
- Customizable citation key generator
Expand All @@ -48,12 +48,12 @@ JabRef supports you in every step of your research work.

- Native [BibTeX] and [Biblatex] support
- Cite-as-you-write functionality for external applications such as Emacs, Kile, LyX, Texmaker, TeXstudio, Vim and WinEdt.
- Format references in one of the many thousand built-in citation styles or create your own style
- Format references in one of the many thousand built-in citation styles or create your style
- Support for Word and LibreOffice/OpenOffice for inserting and formatting citations

#### Share

- Many built-in export options or create your own export format
- Many built-in export options or create your export format
- Library is saved as a simple text file and thus it is easy to share with others via Dropbox and is version-control friendly
- Work in a team: sync the contents of your library via a SQL database

Expand Down Expand Up @@ -91,7 +91,7 @@ An explanation of donation possibilities and usage of donations is available at

> Not a programmer? [Learn how to help.](http://contribute.jabref.org)

Want to be part of a free and open-source project that tens of thousands scientist use every day? Check out the ways you can contribute, below:
Want to be part of a free and open-source project that tens of thousands of scientists use every day? Check out the ways you can contribute, below:
- For details on how to contribute, have a look at our [guidelines for contributing](CONTRIBUTING.md).
- You are welcome to contribute new features. To get your code included into JabRef, just [fork](https://help.github.com/en/articles/fork-a-repo) the JabRef repository, make your changes, and create a [pull request](https://help.github.com/en/articles/about-pull-requests).
- To work on existing JabRef issues, check out our [issue tracker](https://github.com/JabRef/jabref/issues). New to open source contributing? Look for issues with the ["good first issue"](https://github.com/JabRef/jabref/labels/good%20first%20issue) label to get started.
Expand Down
1 change: 0 additions & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -592,7 +592,6 @@ jlink {
'--linux-menu-group', 'Office;',
'--linux-rpm-license-type', 'MIT',
// '--license-file', "${projectDir}/LICENSE.md",
'--file-associations', "${projectDir}/buildres/linux/desktop.properties",
'--description', 'JabRef is an open source bibliography reference manager. The native file format used by JabRef is BibTeX, the standard LaTeX bibliography format.',
'--linux-shortcut'
]
Expand Down
4 changes: 2 additions & 2 deletions buildres/linux/copyright
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/

Files: *
Copyright: APPLICATION_COPYRIGHT
License: APPLICATION_LICENSE_TEXT
Copyright: Copyright (C) 2003-2019 JabRef Authors
License: MIT
1 change: 0 additions & 1 deletion buildres/linux/desktop.properties

This file was deleted.

1 change: 1 addition & 0 deletions buildres/linux/jabref-JabRef.desktop
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ Exec=APPLICATION_LAUNCHER
Icon=APPLICATION_ICON
Terminal=false
Type=Application
MimeType=text/x-bibtex;
Categories=DEPLOY_BUNDLE_CATEGORY
Keywords=bibtex;biblatex;latex;bibliography
StartupWMClass=org-jabref-JabRefMain
7 changes: 4 additions & 3 deletions buildres/linux/prerm → buildres/linux/postrm
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,10 @@ set -e
# the debian-policy package
case "$1" in
purge|remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)
INSTALL_PATH="/usr/lib/mozilla/native-messaging-hosts/"
if grep --quiet '"path": "/opt' /usr/lib/mozilla/native-messaging-hosts/org.jabref.jabref.json; then
rm -D -m0755 /opt/jabref/lib/org.jabref.jabref.json $INSTALL_PATH
INSTALL_PATH="/usr/lib/mozilla/native-messaging-hosts"
if grep --quiet '"path": "/opt' $INSTALL_PATH/org.jabref.jabref.json; then
rm $INSTALL_PATH/org.jabref.jabref.json
fi
;;

*)
Expand Down
3 changes: 2 additions & 1 deletion src/main/java/org/jabref/cli/ArgumentProcessor.java
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
import java.util.List;
import java.util.Locale;
import java.util.Optional;
import java.util.Set;
import java.util.prefs.BackingStoreException;

import org.jabref.Globals;
Expand Down Expand Up @@ -533,7 +534,7 @@ private Optional<ParserResult> fetch(String fetchCommand) {
String engine = split[0];
String query = split[1];

List<SearchBasedFetcher> fetchers = WebFetchers.getSearchBasedFetchers(Globals.prefs.getImportFormatPreferences());
Set<SearchBasedFetcher> fetchers = WebFetchers.getSearchBasedFetchers(Globals.prefs.getImportFormatPreferences());
Optional<SearchBasedFetcher> selectedFetcher = fetchers.stream()
.filter(fetcher -> fetcher.getName().equalsIgnoreCase(engine))
.findFirst();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@
import org.jabref.gui.icon.IconTheme;
import org.jabref.gui.util.BackgroundTask;
import org.jabref.gui.util.BaseDialog;
import org.jabref.gui.util.BindingsHelper;
import org.jabref.gui.util.NoSelectionModel;
import org.jabref.gui.util.TaskExecutor;
import org.jabref.gui.util.TextFlowLimited;
Expand Down Expand Up @@ -110,7 +109,6 @@ private void initialize() {
HBox.setHgrow(entryNode, Priority.ALWAYS);
HBox container = new HBox(entryNode, separator, addToggle);
container.getStyleClass().add("entry-container");
BindingsHelper.includePseudoClassWhen(container, entrySelected, addToggle.selectedProperty());

BackgroundTask.wrap(() -> viewModel.hasDuplicate(entry)).onSuccess(duplicateFound -> {
if (duplicateFound) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package org.jabref.gui.importer.fetcher;

import java.util.Comparator;
import java.util.List;
import java.util.SortedSet;

import javafx.beans.property.ListProperty;
import javafx.beans.property.ObjectProperty;
Expand All @@ -18,7 +18,6 @@
import org.jabref.gui.util.BackgroundTask;
import org.jabref.logic.importer.ImportFormatPreferences;
import org.jabref.logic.importer.SearchBasedFetcher;
import org.jabref.logic.importer.WebFetcher;
import org.jabref.logic.importer.WebFetchers;
import org.jabref.logic.l10n.Localization;
import org.jabref.model.entry.BibEntry;
Expand All @@ -40,8 +39,7 @@ public WebSearchPaneViewModel(ImportFormatPreferences importPreferences, JabRefF
this.frame = frame;
this.dialogService = dialogService;

List<SearchBasedFetcher> allFetchers = WebFetchers.getSearchBasedFetchers(importPreferences);
allFetchers.sort(Comparator.comparing(WebFetcher::getName));
SortedSet<SearchBasedFetcher> allFetchers = WebFetchers.getSearchBasedFetchers(importPreferences);
fetchers.setAll(allFetchers);

// Choose last-selected fetcher as default
Expand Down Expand Up @@ -97,7 +95,7 @@ public void search() {
BackgroundTask<List<BibEntry>> task = BackgroundTask.wrap(() -> activeFetcher.performSearch(getQuery().trim()))
.withInitialMessage(Localization.lang("Processing %0", getQuery()));

task.onFailure(ex -> dialogService.showErrorDialogAndWait(ex));
task.onFailure(dialogService::showErrorDialogAndWait);

ImportEntriesDialog dialog = new ImportEntriesDialog(frame.getCurrentBasePanel().getBibDatabaseContext(), task);
dialog.setTitle(activeFetcher.getName());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
import org.jabref.logic.openoffice.StyleLoader;
import org.jabref.logic.util.TestEntry;
import org.jabref.model.database.BibDatabaseContext;
import org.jabref.model.entry.types.StandardEntryType;
import org.jabref.preferences.PreferencesService;

import com.airhacks.afterburner.views.ViewLoader;
Expand Down Expand Up @@ -118,8 +119,8 @@ private void initialize() {

EasyBind.subscribe(viewModel.selectedItemProperty(), style -> {
tvStyles.getSelectionModel().select(style);
previewArticle.setLayout(new TextBasedPreviewLayout(style.getStyle().getDefaultBibLayout()));
previewBook.setLayout(new TextBasedPreviewLayout(style.getStyle().getDefaultBibLayout()));
previewArticle.setLayout(new TextBasedPreviewLayout(style.getStyle().getReferenceFormat(StandardEntryType.Article)));
previewBook.setLayout(new TextBasedPreviewLayout(style.getStyle().getReferenceFormat(StandardEntryType.Book)));
});
}

Expand Down
Loading