Skip to content

Commit

Permalink
Merge pull request #1 from JabRef/master
Browse files Browse the repository at this point in the history
Updating my repo
  • Loading branch information
Igor Steinmacher committed Oct 9, 2015
2 parents a518686 + 8fe4c28 commit f4dcdb4
Show file tree
Hide file tree
Showing 114 changed files with 4,869 additions and 4,133 deletions.
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ buildant/
build.number
classes/
user.properties
src/main/resources/resource/build.properties
src/main/resources/windows/nsis/dist/

# Gradle
Expand Down
16 changes: 16 additions & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
[master]
- All duplicate whitespaces / tabs / newlines are now removed from non-multiline fields
- Fixed a bug in the IEEEXploreFetcher
- Replaced some deprecated DefaultFormBuilder with FormBuilder
- Added more characters to HTML/Unicode converter
- Feature: Push citations to Texmaker (SF: #318, #582)
- Case changers improved to honor words (not yet more than single words) within {}
- Feature: Added converters from HTML and Unicode to LaTeX on right click in text fields (#191)
- Fixed bug 1282 (SourceForge) related to backslashes duplication.
- Feature: Add an option to the FileList context menu to delete an associated file from the file system
- Breaking API change: String[] is replaced by List<String> in BibtexEntryType
Expand All @@ -8,19 +15,28 @@
- Feature: When pasting a Google search URL, meta data will be automatically stripped before insertion.
- No longer write JabRef version to BibTex file header.
- No longer add blank lines inside a bibtex entry
- Feature: PDF auto download from ACS, arXiv, ScienceDirect, SpringerLink, and Google Scholar
- Perform syntax improvements enabled by Java 1.7+ (diamond operator, try-with-resources)
- List of authors is now auto generated `scripts/generate-authors.sh` and inserted into L10N About.html
- Remove Mr.DLib support as MR.DLib will be shut down in 2015
- Streamline logging API: Replace usages of java.util.logging with commons.logging
- BREAKING: Remove plugin functionality.
- Fixes Bug#1297: No console message on closing.
- Fix bug #1285: Editing position is not lost on saving
- Fix bug #194: JabRef starts again on Win XP and Win Vista
- Remove support for custom icon themes. The user has to use the default one.
- Bugfix: Tooltips are now shown for the #-field when the bibtex entry is incomplete.
- Solved feature request #767: New subdatabase based on AUX file (biblatex)
- Fixes GH Bug #173: Personal journal abbreviation list is not loaded twice
- Bugfix: Preview of external journal abbreviation list now displays the correct list
- Feature: DOItoBibTeX fetcher now also handles HTTP URLs
- Feature: "Normalize to BibTeX name format" also removes newlines
- Tweak of preference defaults: Autolink requires that the filename starts with the given BibTeX key and the default filename patterns is key followed by title
- Remove support to the move-to-SysTray action
- Feature: case changers now leave protected areas (enclosed with curly brakets) alone
- Fix #223: Window is displayed in visible area even when having multiple screens
[dev_2.11]
- Backports from 2.80: Fix bug #194: JabRef starts again on Win XP and Win Vista
- Backports from 2.80: Fixes #103: JDialog for auto set links is openend and closed correctly
2.11 beta 4
- Add of Persian localization (by Behrouz Javanmardi)
Expand Down
24 changes: 24 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,8 @@ gets
* Copyright (C) 2015 Stefan Jauch
```

Please, **do not add yourself at `@authors`**.
We have track this information in the header only.

### Write a good commit message
See [good commit message] or [commit guidelines section of Pro Git].
Expand All @@ -76,6 +78,28 @@ In any case, describe the library at [external-libraries.txt](external-libraries
We need that information for our package maintainers (e.g., those of the [debian package](https://tracker.debian.org/pkg/jabref)).


### When making an architectural decision
In case you add a library or do mayor code rewrites, we ask you to document your decision.
Recommended reading: http://www.infoq.com/articles/sustainable-architectural-design-decisions

Template:
```
In the context of <use case/user story u>,
facing <concern c>
we decided for <option o>
and neglected <other options>,
to achieve <system qualities/desired consequences>,
accepting <downside d/undesired consequences>.
because <additional rationale>.
```


### When adding a new Localization.lang entry
Run `python scripts/syncLang.py -s` to search for new untranslated strings.
If everything is OK, run `python scripts/syncLang.py -s -u` to update `JabRef_en.properties`.



### Create a pull request
Create a pull request on GitHub.
For text inspirations, consider [How to write the perfect pull request](https://github.com/blog/1943-how-to-write-the-perfect-pull-request).
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
[![License](https://img.shields.io/badge/license-GPLv2-blue.svg)](http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt)
[![Join the chat at https://gitter.im/JabRef/jabref](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/JabRef/jabref?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
[![Donation](https://img.shields.io/badge/donate-paypal-orange.svg)](https://www.paypal.com/cgi-bin/webscr?item_name=JabRef+Bibliography+Manager&cmd=_donations&lc=US&currency_code=EUR&business=jabrefmail%40gmail.com)
[![Flattr this git repo](http://api.flattr.com/button/flattr-badge-large.png)](https://flattr.com/submit/auto?user_id=koppor&url=https%3A%2F%2Fgithub.com%2FJabRef%2Fjabref&title=JabRef&language=Java&tags=github&category=software)

This version is a development version. Features may not work as expected.

Expand Down
29 changes: 18 additions & 11 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import org.gradle.internal.os.OperatingSystem

plugins {
id "eu.appsatori.fatjar" version "0.3"
id 'com.github.johnrengelman.shadow' version '1.2.2'
id "edu.sc.seis.launch4j" version "1.1.4"
id "com.github.kt3k.coveralls" version "2.4.0"
id "edu.sc.seis.macAppBundle" version "2.1.1"
Expand All @@ -26,7 +26,7 @@ targetCompatibility = 1.8
mainClassName = "net.sf.jabref.JabRefMain"

task wrapper(type: Wrapper) {
gradleVersion = '2.6'
gradleVersion = '2.7'
}

repositories {
Expand Down Expand Up @@ -63,18 +63,21 @@ dependencies {
compile 'org.antlr:antlr4-runtime:4.5.1-1'

compile 'mysql:mysql-connector-java:5.1.36'
compile 'org.postgresql:postgresql:9.4-1201-jdbc41'
compile 'org.postgresql:postgresql:9.4-1203-jdbc42'

compile 'net.java.dev.glazedlists:glazedlists_java15:1.9.1'
compile fileTree(dir: 'lib', includes: ['*.jar'])

compile 'net.java.dev.jna:jna:4.1.0'
compile 'net.java.dev.jna:jna:4.2.0'

compile 'com.google.guava:guava:18.0'

compile 'commons-logging:commons-logging:1.2'

compile 'junit:junit:4.12'

compile 'org.jsoup:jsoup:1.8.3'
compile 'com.mashape.unirest:unirest-java:1.4.6'
}

sourceSets {
Expand All @@ -92,7 +95,7 @@ processResources {
"authors": new File('AUTHORS').readLines().findAll {!it.startsWith("#")}.join(", "))
}

filesMatching("resource/build.properties") {
filesMatching("build.properties") {
expand version: project.version
}

Expand Down Expand Up @@ -189,11 +192,8 @@ format {
//files = sourceSets.main.java
}

fatJar {
shadowJar {
classifier 'fat'
manifest {
attributes 'Main-Class': project.mainClassName
}
}


Expand Down Expand Up @@ -229,9 +229,9 @@ launch4j {
initialHeapSize = 32
maxHeapSize = 512
}
createExe.dependsOn "fatJar"
createExe.dependsOn "shadowJar"

task releaseJar(dependsOn: "fatJar") {
task releaseJar(dependsOn: "shadowJar") {
group = 'JabRef - Release'
description "Creates a Jar release."

Expand Down Expand Up @@ -338,3 +338,10 @@ task releaseSourceTar(type: Exec) {
mkdir("$buildDir/releases")
}
}

// workaround until https://issues.gradle.org/browse/GRADLE-2274 is resolved
eclipseJdt << {
File f = file('.settings/org.eclipse.core.resources.prefs')
f.write('eclipse.preferences.version=1\n')
f.append('encoding/<project>=UTF-8')
}
2 changes: 1 addition & 1 deletion circle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ dependencies:
- chmod +x launch4j/launch4j
- wget http://nsis.sourceforge.net/mediawiki/images/5/54/WinShell.zip
- unzip WinShell.zip
- sudo cp Plugins/x86-unicode/WinShell.dll /usr/share/nsis/Plugins/
- sudo cp Plugins/x86-ansi/WinShell.dll /usr/share/nsis/Plugins/
override:
- TERM=dumb ./gradlew dependencies

Expand Down
10 changes: 10 additions & 0 deletions external-libraries.txt
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,11 @@ Project: JGoodies Looks
URL: http://www.jgoodies.com/downloads/libraries/
License: BSD

Id: com.mashape.unirest
Project: Unirest for Java
URL: https://github.com/Mashape/unirest-java
License: MIT

Id: mysql:mysql-connector-java
Project: MySQL Connector/J
URL: http://www.mysql.de/downloads/connector/j/
Expand Down Expand Up @@ -79,6 +84,11 @@ Project: Apache PDFBox
URL: http://pdfbox.apache.org
License: Apache 2.0

Id: org.jsoup:jsoup
Project: jsoup
URL: https://github.com/jhy/jsoup/
License: MIT

Id: org.openoffice:juh
Project: OpenOffice.org
URL: http://www.openoffice.org/api/SDK
Expand Down
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-2.6-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-2.7-all.zip
2 changes: 1 addition & 1 deletion scripts/syncLang.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import os
import re

res_dir = "../src/main/resources/l10n"
res_dir = "src/main/resources/l10n"

keyFiles = {}

Expand Down
49 changes: 4 additions & 45 deletions src/main/java/net/sf/jabref/JabRef.java
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
import javax.swing.plaf.FontUIResource;

import net.sf.jabref.gui.*;
import net.sf.jabref.gui.nativeext.WindowsExtensions;
import net.sf.jabref.importer.fetcher.EntryFetcher;
import net.sf.jabref.importer.fetcher.EntryFetchers;
import net.sf.jabref.logic.journals.Abbreviations;
Expand Down Expand Up @@ -61,12 +62,6 @@
import net.sf.jabref.logic.logging.CacheableHandler;
import net.sf.jabref.wizard.auximport.AuxCommandLine;

import com.sun.jna.Native;
import com.sun.jna.NativeLong;
import com.sun.jna.Pointer;
import com.sun.jna.WString;
import com.sun.jna.ptr.PointerByReference;

/**
* JabRef Main Class - The application gets started here.
*/
Expand Down Expand Up @@ -150,10 +145,8 @@ public void start(String[] args) {
Globals.NEWLINE = Globals.prefs.get(JabRefPreferences.NEWLINE);

if (OS.WINDOWS) {
// Set application user model id so that pinning JabRef to the Win7/8 taskbar works
// Based on http://stackoverflow.com/a/1928830
JabRef.setCurrentProcessExplicitAppUserModelID("JabRef." + Globals.BUILD_INFO.getVersion());
//System.out.println(getCurrentProcessExplicitAppUserModelID());
// activate pin to taskbar for Windows 7 and up
WindowsExtensions.enablePinToTaskbar();
}

Vector<ParserResult> loaded = processArguments(args, true);
Expand All @@ -165,46 +158,12 @@ public void start(String[] args) {

openWindow(loaded);
}

private void setupLogHandlerForErrorConsole() {
Globals.handler = new CacheableHandler();
((Jdk14Logger)LOGGER).getLogger().addHandler(Globals.handler);
}

// Do not use this code in release version, it contains some memory leaks
public static String getCurrentProcessExplicitAppUserModelID()
{
final PointerByReference r = new PointerByReference();

if (JabRef.GetCurrentProcessExplicitAppUserModelID(r).longValue() == 0)
{
final Pointer p = r.getValue();

return p.getString(0, true); // here we leak native memory by lazyness
}
return "N/A";
}

private static void setCurrentProcessExplicitAppUserModelID(final String appID)
{
if (JabRef.SetCurrentProcessExplicitAppUserModelID(new WString(appID)).longValue() != 0) {
throw new RuntimeException("unable to set current process explicit AppUserModelID to: " + appID);
}
}

private static native NativeLong GetCurrentProcessExplicitAppUserModelID(PointerByReference appID);

private static native NativeLong SetCurrentProcessExplicitAppUserModelID(WString appID);


static
{
if (OS.WINDOWS) {
Native.register("shell32");
}
}


public Vector<ParserResult> processArguments(String[] args, boolean initialStartup) {

cli = new JabRefCLI(args);
Expand Down
15 changes: 12 additions & 3 deletions src/main/java/net/sf/jabref/JabRefPreferences.java
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,9 @@ public class JabRefPreferences {
public static final String FONT_FAMILY = "fontFamily";
public static final String WIN_LOOK_AND_FEEL = "lookAndFeel";
public static final String LATEX_EDITOR_PATH = "latexEditorPath";
public static final String TEXSTUDIO_PATH = "TeXstudioPath";
public static final String WIN_EDT_PATH = "winEdtPath";
public static final String TEXMAKER_PATH = "texmakerPath";
public static final String SHOW_SHORT = "showShort";
public static final String LANGUAGE = "language";
public static final String NAMES_LAST_ONLY = "namesLastOnly";
Expand Down Expand Up @@ -291,7 +293,9 @@ public class JabRefPreferences {
public static final String CITE_COMMAND_LED = "citeCommandLed";
public static final String CITE_COMMAND_WIN_EDT = "citeCommandWinEdt";
public static final String CITE_COMMAND_EMACS = "citeCommandEmacs";
public static final String CITE_COMMAND_TEXMAKER = "citeCommandTexmaker";
public static final String CITE_COMMAND_VIM = "citeCommandVim";
public static final String CITE_COMMAND_TEXSTUDIO = "citeCommandTeXstudio";
public static final String CITE_COMMAND = "citeCommand";
public static final String EXTERNAL_JOURNAL_LISTS = "externalJournalLists";
public static final String PERSONAL_JOURNAL_LIST = "personalJournalList";
Expand All @@ -312,7 +316,7 @@ public class JabRefPreferences {
public static final String NUMERIC_FIELDS = "numericFields";
public static final String DEFAULT_REG_EXP_SEARCH_EXPRESSION_KEY = "defaultRegExpSearchExpression";
public static final String REG_EXP_SEARCH_EXPRESSION_KEY = "regExpSearchExpression";
public static final String USE_REG_EXP_SEARCH_KEY = "useRegExpSearch";
public static final String AUTOLINK_USE_REG_EXP_SEARCH_KEY = "useRegExpSearch";
public static final String DB_CONNECT_USERNAME = "dbConnectUsername";
public static final String DB_CONNECT_DATABASE = "dbConnectDatabase";
public static final String DB_CONNECT_HOSTNAME = "dbConnectHostname";
Expand Down Expand Up @@ -438,6 +442,7 @@ private JabRefPreferences() {
defaults.put(WIN_LOOK_AND_FEEL, "com.jgoodies.looks.windows.WindowsLookAndFeel");
defaults.put(WIN_EDT_PATH, "C:\\Program Files\\WinEdt Team\\WinEdt\\WinEdt.exe");
defaults.put(LATEX_EDITOR_PATH, "C:\\Program Files\\LEd\\LEd.exe");
defaults.put(TEXMAKER_PATH, "C:\\Program Files\\Texmaker\\texmaker.exe");
defaults.put(EMACS_PATH, "emacsclient.exe");
defaults.put(EMACS_23, true);
defaults.put(EMACS_ADDITIONAL_PARAMETERS, "-n -e");
Expand All @@ -454,6 +459,8 @@ private JabRefPreferences() {
defaults.put(EMACS_PATH, "gnuclient");
defaults.put(EMACS_23, false);
defaults.put(EMACS_ADDITIONAL_PARAMETERS, "-batch -eval");
defaults.put(TEXMAKER_PATH, "texmaker");

}
defaults.put(USE_PROXY, Boolean.FALSE);
defaults.put(PROXY_HOSTNAME, "my proxy host");
Expand Down Expand Up @@ -737,7 +744,9 @@ private JabRefPreferences() {
defaults.put(CITE_COMMAND_VIM, "\\cite");
defaults.put(CITE_COMMAND_EMACS, "\\cite");
defaults.put(CITE_COMMAND_WIN_EDT, "\\cite");
defaults.put(CITE_COMMAND_TEXSTUDIO, "\\cite");
defaults.put(CITE_COMMAND_LED, "\\cite");
defaults.put(CITE_COMMAND_TEXMAKER, "\\cite");
defaults.put(FLOAT_MARKED_ENTRIES, Boolean.TRUE);

defaults.put(USE_NATIVE_FILE_DIALOG_ON_MAC, Boolean.FALSE);
Expand All @@ -751,7 +760,7 @@ private JabRefPreferences() {
defaults.put(SEARCH_DIALOG_WIDTH, 650);
defaults.put(SEARCH_DIALOG_HEIGHT, 500);
defaults.put(SHOW_FILE_LINKS_UPGRADE_WARNING, Boolean.TRUE);
defaults.put(AUTOLINK_EXACT_KEY_ONLY, Boolean.TRUE);
defaults.put(AUTOLINK_EXACT_KEY_ONLY, Boolean.FALSE);
defaults.put(NUMERIC_FIELDS, "mittnum;author");
defaults.put(RUN_AUTOMATIC_FILE_SEARCH, Boolean.FALSE);
defaults.put(USE_LOCK_FILES, Boolean.TRUE);
Expand Down Expand Up @@ -810,7 +819,7 @@ private JabRefPreferences() {
String defaultExpression = "**/.*[bibtexkey].*\\\\.[extension]";
defaults.put(DEFAULT_REG_EXP_SEARCH_EXPRESSION_KEY, defaultExpression);
defaults.put(REG_EXP_SEARCH_EXPRESSION_KEY, defaultExpression);
defaults.put(USE_REG_EXP_SEARCH_KEY, Boolean.FALSE);
defaults.put(AUTOLINK_USE_REG_EXP_SEARCH_KEY, Boolean.FALSE);
defaults.put(USE_IEEE_ABRV, Boolean.FALSE);
defaults.put(USE_CONVERT_TO_EQUATION, Boolean.FALSE);
defaults.put(USE_CASE_KEEPER_ON_SEARCH, Boolean.TRUE);
Expand Down
Loading

0 comments on commit f4dcdb4

Please sign in to comment.