Skip to content

Commit f4dcdb4

Browse files
author
Igor Steinmacher
committed
Merge pull request #1 from JabRef/master
Updating my repo
2 parents a518686 + 8fe4c28 commit f4dcdb4

File tree

114 files changed

+4869
-4133
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

114 files changed

+4869
-4133
lines changed

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ buildant/
1212
build.number
1313
classes/
1414
user.properties
15-
src/main/resources/resource/build.properties
1615
src/main/resources/windows/nsis/dist/
1716

1817
# Gradle

CHANGELOG

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

CONTRIBUTING.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,8 @@ gets
5959
* Copyright (C) 2015 Stefan Jauch
6060
```
6161

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

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

7880

81+
### When making an architectural decision
82+
In case you add a library or do mayor code rewrites, we ask you to document your decision.
83+
Recommended reading: http://www.infoq.com/articles/sustainable-architectural-design-decisions
84+
85+
Template:
86+
```
87+
In the context of <use case/user story u>,
88+
facing <concern c>
89+
we decided for <option o>
90+
and neglected <other options>,
91+
to achieve <system qualities/desired consequences>,
92+
accepting <downside d/undesired consequences>.
93+
because <additional rationale>.
94+
```
95+
96+
97+
### When adding a new Localization.lang entry
98+
Run `python scripts/syncLang.py -s` to search for new untranslated strings.
99+
If everything is OK, run `python scripts/syncLang.py -s -u` to update `JabRef_en.properties`.
100+
101+
102+
79103
### Create a pull request
80104
Create a pull request on GitHub.
81105
For text inspirations, consider [How to write the perfect pull request](https://github.com/blog/1943-how-to-write-the-perfect-pull-request).

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
[![License](https://img.shields.io/badge/license-GPLv2-blue.svg)](http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt)
77
[![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)
88
[![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)
9+
[![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)
910

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

build.gradle

Lines changed: 18 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import org.gradle.internal.os.OperatingSystem
22

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

2828
task wrapper(type: Wrapper) {
29-
gradleVersion = '2.6'
29+
gradleVersion = '2.7'
3030
}
3131

3232
repositories {
@@ -63,18 +63,21 @@ dependencies {
6363
compile 'org.antlr:antlr4-runtime:4.5.1-1'
6464

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

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

71-
compile 'net.java.dev.jna:jna:4.1.0'
71+
compile 'net.java.dev.jna:jna:4.2.0'
7272

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

7575
compile 'commons-logging:commons-logging:1.2'
7676

7777
compile 'junit:junit:4.12'
78+
79+
compile 'org.jsoup:jsoup:1.8.3'
80+
compile 'com.mashape.unirest:unirest-java:1.4.6'
7881
}
7982

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

95-
filesMatching("resource/build.properties") {
98+
filesMatching("build.properties") {
9699
expand version: project.version
97100
}
98101

@@ -189,11 +192,8 @@ format {
189192
//files = sourceSets.main.java
190193
}
191194

192-
fatJar {
195+
shadowJar {
193196
classifier 'fat'
194-
manifest {
195-
attributes 'Main-Class': project.mainClassName
196-
}
197197
}
198198

199199

@@ -229,9 +229,9 @@ launch4j {
229229
initialHeapSize = 32
230230
maxHeapSize = 512
231231
}
232-
createExe.dependsOn "fatJar"
232+
createExe.dependsOn "shadowJar"
233233

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

@@ -338,3 +338,10 @@ task releaseSourceTar(type: Exec) {
338338
mkdir("$buildDir/releases")
339339
}
340340
}
341+
342+
// workaround until https://issues.gradle.org/browse/GRADLE-2274 is resolved
343+
eclipseJdt << {
344+
File f = file('.settings/org.eclipse.core.resources.prefs')
345+
f.write('eclipse.preferences.version=1\n')
346+
f.append('encoding/<project>=UTF-8')
347+
}

circle.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ dependencies:
1010
- chmod +x launch4j/launch4j
1111
- wget http://nsis.sourceforge.net/mediawiki/images/5/54/WinShell.zip
1212
- unzip WinShell.zip
13-
- sudo cp Plugins/x86-unicode/WinShell.dll /usr/share/nsis/Plugins/
13+
- sudo cp Plugins/x86-ansi/WinShell.dll /usr/share/nsis/Plugins/
1414
override:
1515
- TERM=dumb ./gradlew dependencies
1616

external-libraries.txt

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,11 @@ Project: JGoodies Looks
4949
URL: http://www.jgoodies.com/downloads/libraries/
5050
License: BSD
5151

52+
Id: com.mashape.unirest
53+
Project: Unirest for Java
54+
URL: https://github.com/Mashape/unirest-java
55+
License: MIT
56+
5257
Id: mysql:mysql-connector-java
5358
Project: MySQL Connector/J
5459
URL: http://www.mysql.de/downloads/connector/j/
@@ -79,6 +84,11 @@ Project: Apache PDFBox
7984
URL: http://pdfbox.apache.org
8085
License: Apache 2.0
8186

87+
Id: org.jsoup:jsoup
88+
Project: jsoup
89+
URL: https://github.com/jhy/jsoup/
90+
License: MIT
91+
8292
Id: org.openoffice:juh
8393
Project: OpenOffice.org
8494
URL: http://www.openoffice.org/api/SDK

gradle/wrapper/gradle-wrapper.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
33
distributionPath=wrapper/dists
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists
6-
distributionUrl=https\://services.gradle.org/distributions/gradle-2.6-all.zip
6+
distributionUrl=https\://services.gradle.org/distributions/gradle-2.7-all.zip

scripts/syncLang.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
import os
33
import re
44

5-
res_dir = "../src/main/resources/l10n"
5+
res_dir = "src/main/resources/l10n"
66

77
keyFiles = {}
88

src/main/java/net/sf/jabref/JabRef.java

Lines changed: 4 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@
3333
import javax.swing.plaf.FontUIResource;
3434

3535
import net.sf.jabref.gui.*;
36+
import net.sf.jabref.gui.nativeext.WindowsExtensions;
3637
import net.sf.jabref.importer.fetcher.EntryFetcher;
3738
import net.sf.jabref.importer.fetcher.EntryFetchers;
3839
import net.sf.jabref.logic.journals.Abbreviations;
@@ -61,12 +62,6 @@
6162
import net.sf.jabref.logic.logging.CacheableHandler;
6263
import net.sf.jabref.wizard.auximport.AuxCommandLine;
6364

64-
import com.sun.jna.Native;
65-
import com.sun.jna.NativeLong;
66-
import com.sun.jna.Pointer;
67-
import com.sun.jna.WString;
68-
import com.sun.jna.ptr.PointerByReference;
69-
7065
/**
7166
* JabRef Main Class - The application gets started here.
7267
*/
@@ -150,10 +145,8 @@ public void start(String[] args) {
150145
Globals.NEWLINE = Globals.prefs.get(JabRefPreferences.NEWLINE);
151146

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

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

166159
openWindow(loaded);
167160
}
168-
161+
169162
private void setupLogHandlerForErrorConsole() {
170163
Globals.handler = new CacheableHandler();
171164
((Jdk14Logger)LOGGER).getLogger().addHandler(Globals.handler);
172165
}
173166

174-
// Do not use this code in release version, it contains some memory leaks
175-
public static String getCurrentProcessExplicitAppUserModelID()
176-
{
177-
final PointerByReference r = new PointerByReference();
178-
179-
if (JabRef.GetCurrentProcessExplicitAppUserModelID(r).longValue() == 0)
180-
{
181-
final Pointer p = r.getValue();
182-
183-
return p.getString(0, true); // here we leak native memory by lazyness
184-
}
185-
return "N/A";
186-
}
187-
188-
private static void setCurrentProcessExplicitAppUserModelID(final String appID)
189-
{
190-
if (JabRef.SetCurrentProcessExplicitAppUserModelID(new WString(appID)).longValue() != 0) {
191-
throw new RuntimeException("unable to set current process explicit AppUserModelID to: " + appID);
192-
}
193-
}
194-
195-
private static native NativeLong GetCurrentProcessExplicitAppUserModelID(PointerByReference appID);
196-
197-
private static native NativeLong SetCurrentProcessExplicitAppUserModelID(WString appID);
198-
199-
200-
static
201-
{
202-
if (OS.WINDOWS) {
203-
Native.register("shell32");
204-
}
205-
}
206-
207-
208167
public Vector<ParserResult> processArguments(String[] args, boolean initialStartup) {
209168

210169
cli = new JabRefCLI(args);

0 commit comments

Comments
 (0)