Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master' into fixFileDlgs
Browse files Browse the repository at this point in the history
* upstream/master:
  Reimplement date editor in JavaFX (#2781)
  Update CONTRIBUTING.md
  Add new author
  Update Checkstyle Version
  fix some more checkstyle warnings
  fix some more checkstyle warnings
  Fix Build failure, hopefully
  Spanish translation (#2773)
  Fixes #2766 If file is not found annotations might be null
  Fix language tests
  Remove preferences and globals from tests (#2768)
  Fix Unable to create Checker
  Fix checkstyle warnings
  New checkstyle rules regarding spacing
  Reimplement owner editior in JavaFX
  Reimplement url editior in JavaFX
  Reimplement journal editior in JavaFX
  New checkstyle rules regarding spacing

# Conflicts:
#	src/main/java/org/jabref/gui/importer/actions/AppendDatabaseAction.java
#	src/main/java/org/jabref/migrations/FileLinksUpgradeWarning.java
  • Loading branch information
Siedlerchr committed Apr 23, 2017
2 parents ba8495d + 059f805 commit c3bd77f
Show file tree
Hide file tree
Showing 416 changed files with 2,301 additions and 2,438 deletions.
2 changes: 2 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
gradlew eol=lf
*.sh eol=lf

AUTHORS eol=lf

# ensure that line endings of *.java and *.properties are normalized
*.properties text
*.java text
Expand Down
1 change: 1 addition & 0 deletions .mailmap
Original file line number Diff line number Diff line change
Expand Up @@ -117,3 +117,4 @@ Tim van Rossum <trvanrossum@gmail.com>
Saulius Gražulis <grazulis@ibt.lt>
Rolf Starre <rolf.starre@gmail.com> <RolfStarre@users.noreply.github.com>
Owen Huang <ohuang12@users.noreply.github.com>
Anita Armbruster <armbruan@gmail.com>
1 change: 1 addition & 0 deletions AUTHORS
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ Ambrogio Oliva
Andreas Amann
Andreas Rudert
Anh Nghia Tran
Anita Armbruster
Antonio Ribeiro
Arno Blouin
Behrouz Javanmardi
Expand Down
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ We refer to [GitHub issues](https://github.com/JabRef/jabref/issues) by using `#
## [Unreleased]

### Changed
- Continued to redesign the user interface: this time the editor got a fresh coat of paint:
- The buttons were changed to icons.
- Removed the hidden feature that a double click in the editor inserted the current date.


### Fixed

Expand Down
12 changes: 1 addition & 11 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,21 +5,11 @@ Take a look at GitHub's excellent [help documentation] for a detailed explanatio

We also have [code howtos](https://github.com/JabRef/jabref/wiki/Code-Howtos) and [guidelines for setting up a local workspace](https://github.com/JabRef/jabref/wiki/Guidelines-for-setting-up-a-local-workspace).

For newcomers, [FLOSS Coach](http://www.flosscoach.com/) might be helpful.
It contains steps to get started with JabRef development.

In case you have any question, do not hesitate to write one of our [JabRef developers](https://github.com/orgs/JabRef/teams/developers) an email.


## 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.
Nevertheless we aim to keep the code consistently formatted, therefore we additionally have a requirement regarding the source formatter.


### Ensure consistent formatting
Ensure your code is formatted according the JabRef formatting guidelines.
When you use Eclipse, the required configuration is generated automatically by `gradlew cleanEclipse eclipse`.


### Add your change to CHANGELOG.md
You should edit the [CHANGELOG.md](CHANGELOG.md) located in the root directory of the JabRef source.
Expand Down Expand Up @@ -49,7 +39,7 @@ Please make sure there are no duplicates or alternate spellings of your name lis
If you need to merge different Git usernames or email addresses you can do so by editing `.mailmap`.
More information on this can be found via `man git-shortlog`.

Please, **do not add yourself at `@authors`**.
Please, **do not add yourself at JavaDoc's `@authors`**.
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).
Expand Down
4 changes: 1 addition & 3 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -136,8 +136,6 @@ dependencies {
compile 'org.citationstyles:locales:1.0.1-SNAPSHOT'
compile 'de.undercouch:citeproc-java:1.0.1'

compile 'com.github.lgooddatepicker:LGoodDatePicker:8.3.0'

compile 'com.github.tomtung:latex2unicode_2.12:0.2'

compile group: 'com.microsoft.azure', name: 'applicationinsights-core', version: '1.0.+'
Expand Down Expand Up @@ -390,7 +388,7 @@ task media(type: com.install4j.gradle.Install4jTask, dependsOn: "releaseJar") {
checkstyle {
// do not use other packages for checkstyle, excluding gen(erated) sources
checkstyleMain.source = "src/main/java"
toolVersion = '6.17'
toolVersion = '7.6.1'
}

task release(dependsOn: ["media", "releaseJar"]) {
Expand Down
38 changes: 14 additions & 24 deletions config/checkstyle/checkstyle.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,30 +3,7 @@
"-//Puppy Crawl//DTD Check Configuration 1.3//EN"
"http://www.puppycrawl.com/dtds/configuration_1_3.dtd">

<!--
Checkstyle configuration that checks the sun coding conventions from:
- the Java Language Specification at
http://java.sun.com/docs/books/jls/second_edition/html/index.html
- the Sun Code Conventions at http://java.sun.com/docs/codeconv/
- the Javadoc guidelines at
http://java.sun.com/j2se/javadoc/writingdoccomments/index.html
- the JDK Api documentation http://java.sun.com/j2se/docs/api/index.html
- some best practices
Checkstyle is very configurable. Be sure to read the documentation at
http://checkstyle.sf.net (or in your downloaded distribution).
Most Checks are configurable, be sure to consult the documentation.
To completely disable a check, just comment it out or delete it from the file.
Finally, it is worth reading the documentation.
-->

<module name="Checker">
<!--
If you set the basedir property below, then all reported file
names will be relative to the specified directory. See
http://checkstyle.sourceforge.net/5.x/config.html#Checker
<property name="basedir" value="${basedir}"/>
-->

<module name="Header">
<property name="header" value=""/>
</module>
Expand All @@ -49,6 +26,19 @@
<property name="sortStaticImportsAlphabetically" value="true"/>
</module>

</module>
<module name="EmptyLineSeparator">
<property name="tokens" value="IMPORT, CLASS_DEF, INTERFACE_DEF, ENUM_DEF, STATIC_INIT, INSTANCE_INIT, METHOD_DEF"/>
<property name="allowMultipleEmptyLines" value="false"/>
<property name="allowMultipleEmptyLinesInsideClassMembers" value="false"/>
</module>
<module name="WhitespaceAround">
<property name="tokens"
value="ASSIGN, BAND, BAND_ASSIGN, BOR, BOR_ASSIGN, BSR, BSR_ASSIGN, BXOR, BXOR_ASSIGN, COLON, DIV, DIV_ASSIGN, DO_WHILE, EQUAL, GE, GT, LAND, LCURLY, LE, LITERAL_CATCH, LITERAL_DO, LITERAL_ELSE, LITERAL_FINALLY, LITERAL_FOR, LITERAL_IF, LITERAL_RETURN, LITERAL_SWITCH, LITERAL_SYNCHRONIZED, LITERAL_TRY, LITERAL_WHILE, LOR, LT, MINUS, MINUS_ASSIGN, MOD, MOD_ASSIGN, NOT_EQUAL, PLUS, PLUS_ASSIGN, QUESTION, RCURLY, SL, SLIST, SL_ASSIGN, SR, SR_ASSIGN, STAR, STAR_ASSIGN, LITERAL_ASSERT, TYPE_EXTENSION_AND"/>
</module>
<module name="DeclarationOrder"/>

</module>
<module name="SuppressionFilter">
<property name="file" value="config/checkstyle/suppressions.xml"/>
</module>
</module>
10 changes: 10 additions & 0 deletions config/checkstyle/suppressions.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<?xml version="1.0"?>

<!DOCTYPE suppressions PUBLIC
"-//Puppy Crawl//DTD Suppressions 1.1//EN"
"http://www.puppycrawl.com/dtds/suppressions_1_1.dtd">

<suppressions>
<suppress checks="[a-zA-Z0-9]*" files="[\\/]gen[\\/]" />
<suppress checks="[a-zA-Z0-9]*" files="[\\/]test[\\/]" />
</suppressions>
5 changes: 0 additions & 5 deletions external-libraries.txt
Original file line number Diff line number Diff line change
Expand Up @@ -175,11 +175,6 @@ Project: SwingX
URL: https://swingx.java.net/
License: LGPL-3.0

Id: com.github.lgooddatepicker:LGoodDatePicker
Project: LGoodDatePicker
URL: https://github.com/LGoodDatePicker/LGoodDatePicker
License: MIT

Id: spin
Path: lib/spin.jar
Project: Spin
Expand Down
1 change: 0 additions & 1 deletion src/main/java/oracle/jdbc/OracleConnection.java
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ public class OracleConnection implements Connection {
public static String DCN_NOTIFY_ROWIDS;
public static String DCN_QUERY_CHANGE_NOTIFICATION;


@Override
public <T> T unwrap(Class<T> iface) throws SQLException {
// Auto-generated method stub
Expand Down
12 changes: 6 additions & 6 deletions src/main/java/org/jabref/Globals.java
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import org.jabref.collab.FileUpdateMonitor;
import org.jabref.gui.GlobalFocusListener;
import org.jabref.gui.StateManager;
import org.jabref.gui.keyboard.KeyBindingPreferences;
import org.jabref.gui.keyboard.KeyBindingRepository;
import org.jabref.gui.util.DefaultTaskExecutor;
import org.jabref.gui.util.TaskExecutor;
import org.jabref.logic.importer.ImportFormatReader;
Expand Down Expand Up @@ -48,7 +48,7 @@ public class Globals {
*/
public static StateManager stateManager = new StateManager();
// Key binding preferences
private static KeyBindingPreferences keyPrefs;
private static KeyBindingRepository keyBindingRepository;
// Background tasks
private static GlobalFocusListener focusListener;
private static FileUpdateMonitor fileUpdateMonitor;
Expand All @@ -58,11 +58,11 @@ private Globals() {
}

// Key binding preferences
public static KeyBindingPreferences getKeyPrefs() {
if (keyPrefs == null) {
keyPrefs = new KeyBindingPreferences(prefs);
public static KeyBindingRepository getKeyPrefs() {
if (keyBindingRepository == null) {
keyBindingRepository = prefs.getKeyBindingRepository();
}
return keyPrefs;
return keyBindingRepository;
}


Expand Down
6 changes: 3 additions & 3 deletions src/main/java/org/jabref/JabRefExecutorService.java
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ public class JabRefExecutorService implements Executor {
private final Timer timer = new Timer("timer", true);
private Thread remoteThread;

private JabRefExecutorService() {}
private JabRefExecutorService() { }

@Override
public void execute(Runnable command) {
Expand Down Expand Up @@ -73,7 +73,7 @@ public void executeInterruptableTask(final Runnable runnable, String taskName) {
}

public void executeInterruptableTaskAndWait(Runnable runnable) {
if(runnable == null) {
if (runnable == null) {
LOGGER.debug("Received null as command for execution");
return;
}
Expand All @@ -92,7 +92,7 @@ public void executeInterruptableTaskAndWait(Runnable runnable) {
}

public void manageRemoteThread(Thread thread) {
if (this.remoteThread != null){
if (this.remoteThread != null) {
throw new IllegalStateException("Remote thread is already attached");
} else {
this.remoteThread = thread;
Expand Down
2 changes: 0 additions & 2 deletions src/main/java/org/jabref/cli/ImportInspectionCommandLine.java
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ public class ImportInspectionCommandLine implements ImportInspector {

private final OutputPrinter status = new SystemOutputPrinter();


@Override
public void addEntry(BibEntry entry) {
entries.add(entry);
Expand All @@ -29,7 +28,6 @@ public void setProgress(int current, int max) {
.valueOf(max)));
}


public Collection<BibEntry> query(String query, EntryFetcher fetcher) {
entries.clear();
if (fetcher.processQuery(query, ImportInspectionCommandLine.this, status)) {
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/org/jabref/cli/JabRefCLI.java
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ public String getExportMatches() {

public boolean isGenerateBibtexKeys() { return cl.hasOption("generateBibtexKeys"); }

public boolean isAutomaticallySetFileLinks() { return cl.hasOption("automaticallySetFileLinks");}
public boolean isAutomaticallySetFileLinks() { return cl.hasOption("automaticallySetFileLinks"); }

private Options getOptions() {
Options options = new Options();
Expand Down
7 changes: 3 additions & 4 deletions src/main/java/org/jabref/collab/ChangeScanner.java
Original file line number Diff line number Diff line change
Expand Up @@ -47,16 +47,16 @@ public class ChangeScanner implements Runnable {

private static final String[] SORT_BY = new String[] {FieldName.YEAR, FieldName.AUTHOR, FieldName.TITLE};

private static final double MATCH_THRESHOLD = 0.4;
private final File file;
private final BibDatabase databaseInMemory;
private final MetaData metadataInMemory;
private final BasePanel panel;

private final BasePanel panel;
private final JabRefFrame frame;
private BibDatabase databaseInTemp;
private MetaData metadataInTemp;

private static final double MATCH_THRESHOLD = 0.4;
private MetaData metadataInTemp;

/**
* We create an ArrayList to hold the changes we find. These will be added in the form
Expand Down Expand Up @@ -464,7 +464,6 @@ private void scanGroups(MetaData inTemp, MetaData onDisk) {
}
}


@FunctionalInterface
public interface DisplayResultCallback {
void scanResultsResolved(boolean resolved);
Expand Down
1 change: 0 additions & 1 deletion src/main/java/org/jabref/collab/EntryChange.java
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,6 @@ public JComponent description() {
return new JLabel(name);
}


static class FieldChange extends Change {

private final BibEntry entry;
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/org/jabref/collab/EntryDeleteChange.java
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@

class EntryDeleteChange extends Change {

private static final Log LOGGER = LogFactory.getLog(EntryDeleteChange.class);
private final BibEntry memEntry;
private final BibEntry tmpEntry;
private final JScrollPane sp;

private static final Log LOGGER = LogFactory.getLog(EntryDeleteChange.class);
private final JScrollPane sp;


public EntryDeleteChange(BibEntry memEntry, BibEntry tmpEntry) {
Expand Down
3 changes: 1 addition & 2 deletions src/main/java/org/jabref/collab/FileUpdateMonitor.java
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public class FileUpdateMonitor implements Runnable {
public void run() {
// The running variable is used to make the thread stop when needed.
while (true) {
for(Entry e : entries.values()) {
for (Entry e : entries.values()) {
try {
if (e.hasBeenUpdated()) {
e.notifyListener();
Expand Down Expand Up @@ -210,7 +210,6 @@ public void decreaseTimeStamp() {
}
}


private static synchronized Path getTempFile() {
Path temporaryFile = null;
try {
Expand Down
6 changes: 3 additions & 3 deletions src/main/java/org/jabref/collab/StringAddChange.java
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,12 @@

class StringAddChange extends Change {

private final BibtexString string;
private static final Log LOGGER = LogFactory.getLog(StringAddChange.class);

private final BibtexString string;
private final InfoPane tp = new InfoPane();
private final JScrollPane sp = new JScrollPane(tp);

private static final Log LOGGER = LogFactory.getLog(StringAddChange.class);
private final JScrollPane sp = new JScrollPane(tp);


public StringAddChange(BibtexString string) {
Expand Down
6 changes: 3 additions & 3 deletions src/main/java/org/jabref/collab/StringChange.java
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,16 @@

class StringChange extends Change {

private static final Log LOGGER = LogFactory.getLog(StringChange.class);
private final BibtexString string;
private final String mem;
private final String disk;
private final String label;

private final String label;
private final InfoPane tp = new InfoPane();
private final JScrollPane sp = new JScrollPane(tp);
private final BibtexString tmpString;

private static final Log LOGGER = LogFactory.getLog(StringChange.class);
private final BibtexString tmpString;


public StringChange(BibtexString string, BibtexString tmpString, String label, String mem, String disk) {
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/org/jabref/collab/StringNameChange.java
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,13 @@

class StringNameChange extends Change {

private static final Log LOGGER = LogFactory.getLog(StringNameChange.class);
private final BibtexString string;
private final String mem;
private final String disk;
private final String content;
private final BibtexString tmpString;

private static final Log LOGGER = LogFactory.getLog(StringNameChange.class);
private final BibtexString tmpString;


public StringNameChange(BibtexString string, BibtexString tmpString,
Expand Down
6 changes: 3 additions & 3 deletions src/main/java/org/jabref/collab/StringRemoveChange.java
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,14 @@
import org.apache.commons.logging.LogFactory;

class StringRemoveChange extends Change {
private static final Log LOGGER = LogFactory.getLog(StringRemoveChange.class);
private final BibtexString string;
private final BibtexString inMem;

private final BibtexString inMem;
private final InfoPane tp = new InfoPane();
private final JScrollPane sp = new JScrollPane(tp);
private final BibtexString tmpString;

private static final Log LOGGER = LogFactory.getLog(StringRemoveChange.class);
private final BibtexString tmpString;


public StringRemoveChange(BibtexString string, BibtexString tmpString, BibtexString inMem) {
Expand Down
Loading

0 comments on commit c3bd77f

Please sign in to comment.