diff --git a/checkstyle_config/checkstyle_packages.xml b/checkstyle_config/checkstyle_packages.xml new file mode 100644 index 0000000..4279531 --- /dev/null +++ b/checkstyle_config/checkstyle_packages.xml @@ -0,0 +1,9 @@ + + + + + + + diff --git a/checkstyle_config/gpl-header-check.txt b/checkstyle_config/gpl-header-check.txt new file mode 100644 index 0000000..5d4846d --- /dev/null +++ b/checkstyle_config/gpl-header-check.txt @@ -0,0 +1,17 @@ +^/\* +^ \* jMemorize - Learning made easy \(and fun\) - A Leitner flashcards tool +^ \* Copyright\(C\).* +^ \* +^ \* 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; .* +^ \* .*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\., .* diff --git a/checkstyle_config/jmemorize-checkstyle.xml b/checkstyle_config/jmemorize-checkstyle.xml new file mode 100644 index 0000000..8b5fb0d --- /dev/null +++ b/checkstyle_config/jmemorize-checkstyle.xml @@ -0,0 +1,57 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/jmemorize/core/Main.java b/src/jmemorize/core/Main.java index 2c6f185..48ab5da 100644 --- a/src/jmemorize/core/Main.java +++ b/src/jmemorize/core/Main.java @@ -545,9 +545,22 @@ private void fireLessonModified(Lesson lesson) /** * @param args the command line arguments */ - public static void main(String args[]) + public static void main(String args[]) { - File file = args.length >= 1 ? new File(args[0]) : null; - Main.getInstance().run(file); + File file = null; + if (args.length >= 1) + { + file = new File(args[0]); + } + else if (Main.getInstance().getRecentLessonFiles().size() >= 1) + { + String filename = Main.getInstance().getRecentLessonFiles().get(0); + file = new File(filename); + if (!file.exists()) + { + file = null; + } + } + Main.getInstance().run(file); } }