Skip to content

Commit

Permalink
Merge branch 'master' into formatter
Browse files Browse the repository at this point in the history
  • Loading branch information
koppor committed Jun 21, 2015
2 parents af1c602 + b3e9598 commit bcf47fd
Show file tree
Hide file tree
Showing 44 changed files with 265 additions and 3,514 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
[master]
2.11 beta 3
- New MacOSX integration
- Two releases for MacOSX: OSX-Java6 for Apple Java 1.6 and OSX for Oracle Java 1.7+
- Fix for bug #1278 Crash after changing LookAndFeel (showing a proper error message if L&F is not available)
Expand All @@ -17,6 +18,7 @@
- Replaced option parsing library ritopt with apache commons-cli which is in maven repository
- BREAKING passing an option file to the cli command no longer works due to change of internal cli library!
- Fix for bug #1283: Month fields like {8,} no longer cause exceptions
- Disabled ISBNtoBibTeX fetcher (see bug #1241)
2.11 beta 2
- Feature: Option to clean URLs generated by Google (patch #204)
- Fix for bug #1272: JabRef now launches on Mac OS X
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# JabRef 2.11 development version
# JabRef development version

[![Build Status](https://api.travis-ci.org/JabRef/jabref.png?branch=master)](https://travis-ci.org/JabRef/jabref)
[![Dependency Status](https://www.versioneye.com/user/projects/557f2723386664002000009c/badge.svg?style=flat)](https://www.versioneye.com/user/projects/557f2723386664002000009c)
Expand Down
7 changes: 6 additions & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,12 @@ dependencies {
// use ant targets with prefix antTargets.XXXXX
ant.importBuild "build-wrapper.xml"
// add jars from this classpath to the classpath for the ant build
ant.references.jars.setFiles(configurations.compile.asPath.replace(";"," "))
if (org.gradle.internal.os.OperatingSystem.current().windows) {
// according to the discussion at https://github.com/JabRef/jabref/pull/58, the separators are different on Windows and Linux
ant.references.jars.setFiles(configurations.compile.asPath.replace(";"," "))
} else {
ant.references.jars.setFiles(configurations.compile.asPath.replace(":"," "))
}

sourceCompatibility = 1.6
mainClassName = "net.sf.jabref.JabRefMain"
Expand Down
2 changes: 1 addition & 1 deletion build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@

<!-- some version information -->
<property name="jabref.version" value="2.11dev" />
<property name="jabref.version.full" value="2.11.3.0" /> <!-- a version number with 4 places. Required by launch4j -->
<property name="jabref.version.full" value="2.11.4.0" /> <!-- a version number with 4 places. Required by launch4j -->
<property name="jabref.year" value="2015" />
<property name="jabref.placeholder.version" value="@version@" />
<property name="jabref.placeholder.year" value="@year@" />
Expand Down
3 changes: 3 additions & 0 deletions src/main/java/net/sf/jabref/JabRefFrame.java
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@
import net.sf.jabref.groups.EntryTableTransferHandler;
import net.sf.jabref.groups.GroupSelector;
import net.sf.jabref.gui.*;
import net.sf.jabref.gui.menus.help.ForkMeOnGitHubAction;
import net.sf.jabref.help.HelpAction;
import net.sf.jabref.help.HelpDialog;
import net.sf.jabref.imports.EntryFetcher;
Expand Down Expand Up @@ -158,6 +159,7 @@ void addAction(Action a) {
newDatabaseAction = new NewDatabaseAction(),
newSubDatabaseAction = new NewSubDatabaseAction(),
integrityCheckAction = new IntegrityCheckAction(),
forkMeOnGitHubAction = new ForkMeOnGitHubAction(),
help = new HelpAction("JabRef help", helpDiag,
GUIGlobals.baseFrameHelp, Globals.lang("JabRef help"),
prefs.getKey("Help")),
Expand Down Expand Up @@ -1485,6 +1487,7 @@ public void actionPerformed(ActionEvent e) {
helpMenu.add(contents);
helpMenu.addSeparator();
helpMenu.add(errorConsole);
helpMenu.add(forkMeOnGitHubAction);
helpMenu.addSeparator();
helpMenu.add(about);
mb.add(helpMenu);
Expand Down
23 changes: 19 additions & 4 deletions src/main/java/net/sf/jabref/Util.java
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
/* Copyright (C) 2003-2012 JabRef contributors.
Copyright (C) 2015 Oliver Kopp
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
Expand Down Expand Up @@ -602,10 +604,7 @@ else if (split[split.length - 1].equalsIgnoreCase("ps")

if (fieldName.equals("url")) { // html
try {
link = sanitizeUrl(link);
ExternalFileType fileType = Globals.prefs.getExternalFileTypeByExt("html");
openExternalFilePlatformIndependent(fileType, link);

openBrowser(link);
} catch (IOException e) {
System.err.println(Globals.lang("Error_opening_file_'%0'.", link));
e.printStackTrace();
Expand Down Expand Up @@ -785,6 +784,9 @@ public void run() {
}

private static void openExternalFilePlatformIndependent(ExternalFileType fileType, String filePath) throws IOException {
// For URLs, other solutions are
// * https://github.com/rajing/browserlauncher2, but it is not available in maven
// * a the solution combining http://stackoverflow.com/a/5226244/873282 and http://stackoverflow.com/a/28807079/873282
if (Globals.ON_MAC) {
// Use "-a <application>" if the app is specified, and just "open <filename>" otherwise:
String[] cmd = ((fileType.getOpenWith() != null) && (fileType.getOpenWith().length() > 0)) ?
Expand Down Expand Up @@ -3130,5 +3132,18 @@ public static String stripBrackets(String s) {
int endIndex = (s.endsWith("]") ? s.length() - 1 : s.length());
return s.substring(beginIndex, endIndex);
}

/**
* Opens the given URL using the system browser
*
* @param url the URL to open
* @throws IOException
*/
public static void openBrowser(String url) throws IOException {
url = sanitizeUrl(url);
ExternalFileType fileType = Globals.prefs.getExternalFileTypeByExt("html");
openExternalFilePlatformIndependent(fileType, url);
}

}

Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
/* Copyright (C) 2015 Oliver Kopp
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License along
with this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
package net.sf.jabref.gui.menus.help;

import java.awt.event.ActionEvent;
import java.io.IOException;

import javax.swing.AbstractAction;

import net.sf.jabref.Globals;
import net.sf.jabref.JabRef;
import net.sf.jabref.Util;

@SuppressWarnings("serial")
public class ForkMeOnGitHubAction extends AbstractAction {

public ForkMeOnGitHubAction() {
super(Globals.menuTitle("Fork me on GitHub"));
putValue(SHORT_DESCRIPTION, Globals.lang("Opens JabRef's GitHub page"));
}

public void actionPerformed(ActionEvent e) {
try {
Util.openBrowser("https://github.com/JabRef/jabref");
} catch (IOException ex) {
ex.printStackTrace();
JabRef.jrf.basePanel().output(Globals.lang("Could not open browser.") + " " + Globals.lang("Please open http://github.com/JabRef/jabref manually."));
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@
/**
* This class uses Manas Tungare's ISBN to BibTeX Converter to convert an ISBN to a BibTeX entry <br />
* The online version of the converter is available at http://manas.tungare.name/software/isbn-to-bibtex/
* This was not approved by him, see discussion https://sourceforge.net/p/jabref/bugs/1241/.
* We are currently working on sorting things out
*/
public class ISBNtoBibTeXFetcher implements EntryFetcher {

Expand Down
96 changes: 96 additions & 0 deletions src/main/resources/images/splash-beta3.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src/main/resources/images/splash.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 2 additions & 0 deletions src/main/resources/plugins/net.sf.jabref.core/plugin.xml
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,7 @@
value="Fetch Entries from DBLP." />
</extension>

<!-- disabled because of https://sourceforge.net/p/jabref/bugs/1241/
<extension id="ISBNtoBibTeXFetcher" plugin-id="net.sf.jabref.core"
point-id="EntryFetcher">
<parameter id="entryFetcher"
Expand All @@ -177,6 +178,7 @@
<parameter id="description"
value="Fetch entries based on ISBN." />
</extension>
-->

<extension id="GoogleScholarFetcher" plugin-id="net.sf.jabref.core"
point-id="EntryFetcher">
Expand Down
4 changes: 4 additions & 0 deletions src/main/resources/resource/JabRef_da.properties
Original file line number Diff line number Diff line change
Expand Up @@ -1722,3 +1722,7 @@ Unmarked_selected_entry=
Unmarked_all_entries=

Unable_to_find_the_requested_Look_&_Feel_and_thus_the_default_one_is_used.=

Could_not_open_browser.=
Opens_JabRef's_GitHub_page=
Please_open_http\://github.com/JabRef/jabref_manually.=
4 changes: 4 additions & 0 deletions src/main/resources/resource/JabRef_de.properties
Original file line number Diff line number Diff line change
Expand Up @@ -2478,3 +2478,7 @@ Unmarked_all_%0_selected_entries=Markierung_f\u00fcr_alle_%0_ausgew\u00e4hlte_Ei
Unmarked_all_entries=

Unable_to_find_the_requested_Look_&_Feel_and_thus_the_default_one_is_used.=

Could_not_open_browser.=Konnte_Browser_nicht_öffnen.
Opens_JabRef's_GitHub_page=Öffnet_JabRefs_GitHub-Seite
Please_open_http\://github.com/JabRef/jabref_manually.=Bitte_öffnen_Sie_http://github.com/JabRef/jabref_von_Hand.
4 changes: 4 additions & 0 deletions src/main/resources/resource/JabRef_en.properties
Original file line number Diff line number Diff line change
Expand Up @@ -2467,3 +2467,7 @@ Toggle_print_status=Toggle_print_status
Unmarked_all_entries=Unmarked_all_entries

Unable_to_find_the_requested_Look_&_Feel_and_thus_the_default_one_is_used.=Unable_to_find_the_requested_Look_&_Feel_and_thus_the_default_one_is_used.

Opens_JabRef's_GitHub_page=Opens_JabRef's_GitHub_page
Could_not_open_browser.=Could_not_open_browser.
Please_open_http\://github.com/JabRef/jabref_manually.=Please_open_http://github.com/JabRef/jabref_manually.
4 changes: 4 additions & 0 deletions src/main/resources/resource/JabRef_es.properties
Original file line number Diff line number Diff line change
Expand Up @@ -1614,3 +1614,7 @@ Unmarked_selected_entry=
Unmarked_all_entries=

Unable_to_find_the_requested_Look_&_Feel_and_thus_the_default_one_is_used.=

Could_not_open_browser.=
Opens_JabRef's_GitHub_page=
Please_open_http\://github.com/JabRef/jabref_manually.=
4 changes: 4 additions & 0 deletions src/main/resources/resource/JabRef_fr.properties
Original file line number Diff line number Diff line change
Expand Up @@ -1662,3 +1662,7 @@ Unmarked_all_entries=Toutes_les_entrées_désétiquetées
Unable_to_find_the_requested_Look_&_Feel_and_thus_the_default_one_is_used.=Impossible_de_trouver_l'apparence_demandée._Aussi,_celle_par_défaut_est_utilisée.



Could_not_open_browser.=
Opens_JabRef's_GitHub_page=
Please_open_http\://github.com/JabRef/jabref_manually.=
4 changes: 4 additions & 0 deletions src/main/resources/resource/JabRef_in.properties
Original file line number Diff line number Diff line change
Expand Up @@ -1633,3 +1633,7 @@ Unmarked_selected_entry=
Unmarked_all_entries=

Unable_to_find_the_requested_Look_&_Feel_and_thus_the_default_one_is_used.=

Could_not_open_browser.=
Opens_JabRef's_GitHub_page=
Please_open_http\://github.com/JabRef/jabref_manually.=
4 changes: 4 additions & 0 deletions src/main/resources/resource/JabRef_it.properties
Original file line number Diff line number Diff line change
Expand Up @@ -1744,3 +1744,7 @@ Unmarked_selected_entry=
Unmarked_all_entries=

Unable_to_find_the_requested_Look_&_Feel_and_thus_the_default_one_is_used.=

Could_not_open_browser.=
Opens_JabRef's_GitHub_page=
Please_open_http\://github.com/JabRef/jabref_manually.=
4 changes: 4 additions & 0 deletions src/main/resources/resource/JabRef_ja.properties
Original file line number Diff line number Diff line change
Expand Up @@ -2463,3 +2463,7 @@ Unmarked_selected_entry=
Unmarked_all_entries=

Unable_to_find_the_requested_Look_&_Feel_and_thus_the_default_one_is_used.=

Could_not_open_browser.=
Opens_JabRef's_GitHub_page=
Please_open_http\://github.com/JabRef/jabref_manually.=
4 changes: 4 additions & 0 deletions src/main/resources/resource/JabRef_nl.properties
Original file line number Diff line number Diff line change
Expand Up @@ -2464,3 +2464,7 @@ Unmarked_selected_entry=
Unmarked_all_entries=

Unable_to_find_the_requested_Look_&_Feel_and_thus_the_default_one_is_used.=

Could_not_open_browser.=
Opens_JabRef's_GitHub_page=
Please_open_http\://github.com/JabRef/jabref_manually.=
4 changes: 4 additions & 0 deletions src/main/resources/resource/JabRef_no.properties
Original file line number Diff line number Diff line change
Expand Up @@ -2929,3 +2929,7 @@ Unmarked_selected_entry=
Unmarked_all_entries=

Unable_to_find_the_requested_Look_&_Feel_and_thus_the_default_one_is_used.=

Could_not_open_browser.=
Opens_JabRef's_GitHub_page=
Please_open_http\://github.com/JabRef/jabref_manually.=
4 changes: 4 additions & 0 deletions src/main/resources/resource/JabRef_pt_BR.properties
Original file line number Diff line number Diff line change
Expand Up @@ -1629,3 +1629,7 @@ Unmarked_selected_entry=
Unmarked_all_entries=

Unable_to_find_the_requested_Look_&_Feel_and_thus_the_default_one_is_used.=

Could_not_open_browser.=
Opens_JabRef's_GitHub_page=
Please_open_http\://github.com/JabRef/jabref_manually.=
4 changes: 4 additions & 0 deletions src/main/resources/resource/JabRef_ru.properties
Original file line number Diff line number Diff line change
Expand Up @@ -2466,3 +2466,7 @@ Unmarked_selected_entry=
Unmarked_all_entries=

Unable_to_find_the_requested_Look_&_Feel_and_thus_the_default_one_is_used.=

Could_not_open_browser.=
Opens_JabRef's_GitHub_page=
Please_open_http\://github.com/JabRef/jabref_manually.=
4 changes: 4 additions & 0 deletions src/main/resources/resource/JabRef_tr.properties
Original file line number Diff line number Diff line change
Expand Up @@ -1651,3 +1651,7 @@ Unmarked_selected_entry=
Unmarked_all_entries=

Unable_to_find_the_requested_Look_&_Feel_and_thus_the_default_one_is_used.=

Could_not_open_browser.=
Opens_JabRef's_GitHub_page=
Please_open_http\://github.com/JabRef/jabref_manually.=
4 changes: 4 additions & 0 deletions src/main/resources/resource/JabRef_vi.properties
Original file line number Diff line number Diff line change
Expand Up @@ -2460,3 +2460,7 @@ Unmarked_selected_entry=
Unmarked_all_entries=

Unable_to_find_the_requested_Look_&_Feel_and_thus_the_default_one_is_used.=

Could_not_open_browser.=
Opens_JabRef's_GitHub_page=
Please_open_http\://github.com/JabRef/jabref_manually.=
Loading

0 comments on commit bcf47fd

Please sign in to comment.