[Lutinutil-commits] r1039 - in trunk/maven-i18n-plugin: . src/main/java/org/codelutin/i18n/plugin src/main/java/org/codelutin/i18n/plugin/core src/main/java/org/codelutin/i18n/plugin/extension src/main/java/org/codelutin/i18n/plugin/ui
Author: tchemit Date: 2008-08-17 21:01:38 +0000 (Sun, 17 Aug 2008) New Revision: 1039 Added: trunk/maven-i18n-plugin/LICENSE.txt Modified: trunk/maven-i18n-plugin/src/main/java/org/codelutin/i18n/plugin/PluginHelper.java trunk/maven-i18n-plugin/src/main/java/org/codelutin/i18n/plugin/core/AbstractI18nParser.java trunk/maven-i18n-plugin/src/main/java/org/codelutin/i18n/plugin/core/AbstractI18nPlugin.java trunk/maven-i18n-plugin/src/main/java/org/codelutin/i18n/plugin/core/Generate.java trunk/maven-i18n-plugin/src/main/java/org/codelutin/i18n/plugin/core/Getter.java trunk/maven-i18n-plugin/src/main/java/org/codelutin/i18n/plugin/core/Parser.java trunk/maven-i18n-plugin/src/main/java/org/codelutin/i18n/plugin/core/ParserEvent.java trunk/maven-i18n-plugin/src/main/java/org/codelutin/i18n/plugin/core/ParserException.java trunk/maven-i18n-plugin/src/main/java/org/codelutin/i18n/plugin/core/SourceEntry.java trunk/maven-i18n-plugin/src/main/java/org/codelutin/i18n/plugin/extension/ParserJava.java trunk/maven-i18n-plugin/src/main/java/org/codelutin/i18n/plugin/extension/ParserJavaActionConfig.java trunk/maven-i18n-plugin/src/main/java/org/codelutin/i18n/plugin/extension/ParserJavaTabConfig.java trunk/maven-i18n-plugin/src/main/java/org/codelutin/i18n/plugin/extension/ParserJaxx.java trunk/maven-i18n-plugin/src/main/java/org/codelutin/i18n/plugin/extension/ParserSwixat.java trunk/maven-i18n-plugin/src/main/java/org/codelutin/i18n/plugin/extension/ParserXml.java trunk/maven-i18n-plugin/src/main/java/org/codelutin/i18n/plugin/ui/KeysModifier.java Log: application license lgpl v3 (mvn org.codelutin.plugin:maven-license-switcher:switch) + utilisation FileUtil (de org.codelutin:lutinpluginutil) Added: trunk/maven-i18n-plugin/LICENSE.txt =================================================================== --- trunk/maven-i18n-plugin/LICENSE.txt (rev 0) +++ trunk/maven-i18n-plugin/LICENSE.txt 2008-08-17 21:01:38 UTC (rev 1039) @@ -0,0 +1,166 @@ + GNU LESSER GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/> + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + + This version of the GNU Lesser General Public License incorporates +the terms and conditions of version 3 of the GNU General Public +License, supplemented by the additional permissions listed below. + + 0. Additional Definitions. + + As used herein, "this License" refers to version 3 of the GNU Lesser +General Public License, and the "GNU GPL" refers to version 3 of the GNU +General Public License. + + "The Library" refers to a covered work governed by this License, +other than an Application or a Combined Work as defined below. + + An "Application" is any work that makes use of an interface provided +by the Library, but which is not otherwise based on the Library. +Defining a subclass of a class defined by the Library is deemed a mode +of using an interface provided by the Library. + + A "Combined Work" is a work produced by combining or linking an +Application with the Library. The particular version of the Library +with which the Combined Work was made is also called the "Linked +Version". + + The "Minimal Corresponding Source" for a Combined Work means the +Corresponding Source for the Combined Work, excluding any source code +for portions of the Combined Work that, considered in isolation, are +based on the Application, and not on the Linked Version. + + The "Corresponding Application Code" for a Combined Work means the +object code and/or source code for the Application, including any data +and utility programs needed for reproducing the Combined Work from the +Application, but excluding the System Libraries of the Combined Work. + + 1. Exception to Section 3 of the GNU GPL. + + You may convey a covered work under sections 3 and 4 of this License +without being bound by section 3 of the GNU GPL. + + 2. Conveying Modified Versions. + + If you modify a copy of the Library, and, in your modifications, a +facility refers to a function or data to be supplied by an Application +that uses the facility (other than as an argument passed when the +facility is invoked), then you may convey a copy of the modified +version: + + a) under this License, provided that you make a good faith effort to + ensure that, in the event an Application does not supply the + function or data, the facility still operates, and performs + whatever part of its purpose remains meaningful, or + + b) under the GNU GPL, with none of the additional permissions of + this License applicable to that copy. + + 3. Object Code Incorporating Material from Library Header Files. + + The object code form of an Application may incorporate material from +a header file that is part of the Library. You may convey such object +code under terms of your choice, provided that, if the incorporated +material is not limited to numerical parameters, data structure +layouts and accessors, or small macros, inline functions and templates +(ten or fewer lines in length), you do both of the following: + + a) Give prominent notice with each copy of the object code that the + Library is used in it and that the Library and its use are + covered by this License. + + b) Accompany the object code with a copy of the GNU GPL and this license + document. + + 4. Combined Works. + + You may convey a Combined Work under terms of your choice that, +taken together, effectively do not restrict modification of the +portions of the Library contained in the Combined Work and reverse +engineering for debugging such modifications, if you also do each of +the following: + + a) Give prominent notice with each copy of the Combined Work that + the Library is used in it and that the Library and its use are + covered by this License. + + b) Accompany the Combined Work with a copy of the GNU GPL and this license + document. + + c) For a Combined Work that displays copyright notices during + execution, include the copyright notice for the Library among + these notices, as well as a reference directing the user to the + copies of the GNU GPL and this license document. + + d) Do one of the following: + + 0) Convey the Minimal Corresponding Source under the terms of this + License, and the Corresponding Application Code in a form + suitable for, and under terms that permit, the user to + recombine or relink the Application with a modified version of + the Linked Version to produce a modified Combined Work, in the + manner specified by section 6 of the GNU GPL for conveying + Corresponding Source. + + 1) Use a suitable shared library mechanism for linking with the + Library. A suitable mechanism is one that (a) uses at run time + a copy of the Library already present on the user's computer + system, and (b) will operate properly with a modified version + of the Library that is interface-compatible with the Linked + Version. + + e) Provide Installation Information, but only if you would otherwise + be required to provide such information under section 6 of the + GNU GPL, and only to the extent that such information is + necessary to install and execute a modified version of the + Combined Work produced by recombining or relinking the + Application with a modified version of the Linked Version. (If + you use option 4d0, the Installation Information must accompany + the Minimal Corresponding Source and Corresponding Application + Code. If you use option 4d1, you must provide the Installation + Information in the manner specified by section 6 of the GNU GPL + for conveying Corresponding Source.) + + 5. Combined Libraries. + + You may place library facilities that are a work based on the +Library side by side in a single library together with other library +facilities that are not Applications and are not covered by this +License, and convey such a combined library under terms of your +choice, if you do both of the following: + + a) Accompany the combined library with a copy of the same work based + on the Library, uncombined with any other library facilities, + conveyed under the terms of this License. + + b) Give prominent notice with the combined library that part of it + is a work based on the Library, and explaining where to find the + accompanying uncombined form of the same work. + + 6. Revised Versions of the GNU Lesser General Public License. + + The Free Software Foundation may publish revised and/or new versions +of the GNU Lesser General Public License from time to time. Such new +versions will be similar in spirit to the present version, but may +differ in detail to address new problems or concerns. + + Each version is given a distinguishing version number. If the +Library as you received it specifies that a certain numbered version +of the GNU Lesser General Public License "or any later version" +applies to it, you have the option of following the terms and +conditions either of that published version or of any later version +published by the Free Software Foundation. If the Library as you +received it does not specify a version number of the GNU Lesser +General Public License, you may choose any version of the GNU Lesser +General Public License ever published by the Free Software Foundation. + + If the Library as you received it specifies that a proxy can decide +whether future versions of the GNU Lesser General Public License shall +apply, that proxy's public statement of acceptance of any version is +permanent authorization for you to choose that version for the +Library. + Modified: trunk/maven-i18n-plugin/src/main/java/org/codelutin/i18n/plugin/PluginHelper.java =================================================================== --- trunk/maven-i18n-plugin/src/main/java/org/codelutin/i18n/plugin/PluginHelper.java 2008-08-17 20:33:30 UTC (rev 1038) +++ trunk/maven-i18n-plugin/src/main/java/org/codelutin/i18n/plugin/PluginHelper.java 2008-08-17 21:01:38 UTC (rev 1039) @@ -1,30 +1,27 @@ /** - * ##% Copyright (C) 2008 Code Lutin, Tony Chemit - * 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., 59 Temple Place - * - Suite 330, Boston, MA 02111-1307, USA. - * ##% + * *##% Plugin maven pour lutini18n + * Copyright (C) 2007 - 2008 CodeLutin + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 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 Lesser Public License for more details. + * + * You should have received a copy of the GNU General Lesser Public + * License along with this program. If not, see <http://www.gnu.org/licenses/lgpl-3.0.html>. ##%* */ package org.codelutin.i18n.plugin; -import java.io.BufferedReader; -import java.io.BufferedWriter; import java.io.File; -import java.io.FileInputStream; import java.io.FileOutputStream; import java.io.FilterOutputStream; import java.io.IOException; -import java.io.InputStreamReader; import java.io.OutputStream; -import java.io.OutputStreamWriter; -import java.nio.channels.FileChannel; import java.text.MessageFormat; import java.util.Collections; import java.util.Enumeration; @@ -99,54 +96,6 @@ } /** - * Permet de copier le fichier source vers le fichier cible. - * - * @param source le fichier source - * @param target le fichier cible - * @throws java.io.IOException Erreur de copie - */ - public static void copy(File source, File target) throws IOException { - target.getParentFile().mkdirs(); - FileChannel sourceChannel = new FileInputStream(source).getChannel(); - FileChannel targetChannel = new FileOutputStream(target).getChannel(); - sourceChannel.transferTo(0, sourceChannel.size(), targetChannel); - // or - // targetChannel.transferFrom(sourceChannel, 0, sourceChannel.size()); - sourceChannel.close(); - targetChannel.close(); - } - - /** - * Permet de lire un fichier et de retourner sont contenu sous forme d'une - * chaine de carateres - * - * @param file le fichier a lire - * @param encoding encoding to read file - * @return the content of the file - * @throws IOException if IO pb - */ - static public String readAsString(File file, String encoding) throws IOException { - StringBuffer result = new StringBuffer(); - char[] cbuf = new char[2000]; - FileInputStream inf = new FileInputStream(file); - BufferedReader in = new BufferedReader(new InputStreamReader(inf, encoding)); - int nb = in.read(cbuf); - while (nb != -1) { - result.append(cbuf, 0, nb); - nb = in.read(cbuf); - } - in.close(); - return result.toString(); - } - - static public void writeString(File file, String content, String encoding) throws IOException { - file.getParentFile().mkdirs(); - BufferedWriter out = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(file), encoding)); - out.write(content); - out.close(); - } - - /** * Permet de convertir une liste non typee, en une liste typee. * <p/> * La liste en entree en juste bien castee. @@ -268,8 +217,6 @@ out.write(b); } } - } - } Modified: trunk/maven-i18n-plugin/src/main/java/org/codelutin/i18n/plugin/core/AbstractI18nParser.java =================================================================== --- trunk/maven-i18n-plugin/src/main/java/org/codelutin/i18n/plugin/core/AbstractI18nParser.java 2008-08-17 20:33:30 UTC (rev 1038) +++ trunk/maven-i18n-plugin/src/main/java/org/codelutin/i18n/plugin/core/AbstractI18nParser.java 2008-08-17 21:01:38 UTC (rev 1039) @@ -1,21 +1,19 @@ /* -* \#\#% Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008 Code Lutin, -* Tony Chemit -* -* 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -* \#\#% */ +* *##% Plugin maven pour lutini18n + * Copyright (C) 2007 - 2008 CodeLutin + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 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 Lesser Public License for more details. + * + * You should have received a copy of the GNU General Lesser Public + * License along with this program. If not, see <http://www.gnu.org/licenses/lgpl-3.0.html>. ##%* */ package org.codelutin.i18n.plugin.core; import org.apache.maven.plugin.MojoExecutionException; @@ -23,6 +21,7 @@ import org.codelutin.i18n.plugin.PluginHelper; import org.codelutin.i18n.plugin.ui.KeysModifier; import org.codelutin.util.FileUpdater; +import org.codelutin.util.FileUtil; import java.io.BufferedOutputStream; import java.io.File; @@ -141,7 +140,7 @@ oldParser.load(new FileInputStream(oldParserFile)); - PluginHelper.copy(oldParserFile, saveFile); + FileUtil.copy(oldParserFile, saveFile); // Anciennes cles disponnibles File oldLanguageFile = PluginHelper.getI18nFile(src, artifactId, bundles[0], true); Modified: trunk/maven-i18n-plugin/src/main/java/org/codelutin/i18n/plugin/core/AbstractI18nPlugin.java =================================================================== --- trunk/maven-i18n-plugin/src/main/java/org/codelutin/i18n/plugin/core/AbstractI18nPlugin.java 2008-08-17 20:33:30 UTC (rev 1038) +++ trunk/maven-i18n-plugin/src/main/java/org/codelutin/i18n/plugin/core/AbstractI18nPlugin.java 2008-08-17 21:01:38 UTC (rev 1039) @@ -1,21 +1,19 @@ -/* *##% - * Copyright (C) 2007 - * I18nPlugin, Code Lutin - * - * 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. - * +/* + * *##% Plugin maven pour lutini18n + * Copyright (C) 2007 - 2008 CodeLutin + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - *##%*/ + * GNU General Lesser Public License for more details. + * + * You should have received a copy of the GNU General Lesser Public + * License along with this program. If not, see <http://www.gnu.org/licenses/lgpl-3.0.html>. ##%* */ package org.codelutin.i18n.plugin.core; @@ -41,6 +39,7 @@ /** * Langues des bundles generes. + * * @parameter expression="${i18n.bundles}" default-value="" * @required */ @@ -48,6 +47,7 @@ /** * Repertoire sources des fichiers i18n. + * * @parameter expression="${i18n.src}" default-value="${basedir}/src/resources/i18n" * @required */ @@ -55,12 +55,14 @@ /** * Met les fichiers generes dans le repertoire des sources i18n. + * * @parameter expression="${i18n.genSrc}" default-value="true" */ protected boolean genSrc; /** * Repertoire des fichiers generes i18n. + * * @parameter expression="${i18n.out}" default-value="${basedir}/target/gen/i18n" * @required */ @@ -68,18 +70,21 @@ /** * Active la modification de cle + * * @parameter expression="${i18n.keysModifier}" default-value="false" */ protected boolean keysModifier; /** * verbose flag + * * @parameter expression="${i18n.verbose}" default-value="false" */ protected boolean verbose; /** * Nom du projet. + * * @parameter expression="${i18n.artifactId}" default-value="${project.artifactId}" * @readonly */ @@ -87,18 +92,21 @@ /** * conserve les anciens fichiers de traduction avec un suffix ~ + * * @parameter expression="${i18n.keepBackup}" default-value="true" */ protected boolean keepBackup; /** * ne conserve que les clef scannees (et donc traite tous les fichiers) + * * @parameter expression="${i18n.strictMode}" default-value="false" */ protected boolean strictMode; /** * encoding a utiliser pour charger et sauver les bundles + * * @parameter expression="${i18n.encoding}" default-value="${maven.compile.encoding}" * @required */ Modified: trunk/maven-i18n-plugin/src/main/java/org/codelutin/i18n/plugin/core/Generate.java =================================================================== --- trunk/maven-i18n-plugin/src/main/java/org/codelutin/i18n/plugin/core/Generate.java 2008-08-17 20:33:30 UTC (rev 1038) +++ trunk/maven-i18n-plugin/src/main/java/org/codelutin/i18n/plugin/core/Generate.java 2008-08-17 21:01:38 UTC (rev 1039) @@ -1,21 +1,19 @@ -/* *##% - * Copyright (C) 2007 - * I18nPlugin, Code Lutin - * - * 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. - * +/* + * *##% Plugin maven pour lutini18n + * Copyright (C) 2007 - 2008 CodeLutin + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - *##%*/ + * GNU General Lesser Public License for more details. + * + * You should have received a copy of the GNU General Lesser Public + * License along with this program. If not, see <http://www.gnu.org/licenses/lgpl-3.0.html>. ##%* */ package org.codelutin.i18n.plugin.core; @@ -23,6 +21,7 @@ import org.apache.maven.plugin.MojoFailureException; import org.codelutin.i18n.plugin.PluginHelper; import org.codelutin.i18n.plugin.PluginHelper.I18nProperties; +import org.codelutin.util.FileUtil; import java.io.File; import java.io.FileInputStream; @@ -88,7 +87,7 @@ // Sauvegarde avant copie if (genSrc && keepBackup) { - PluginHelper.copy(bundleSrc, PluginHelper.getI18nFileBackup(src, artifactId, bundle)); + FileUtil.copy(bundleSrc, PluginHelper.getI18nFileBackup(src, artifactId, bundle)); //FileUtil.copy(bundleSrc, new File(src.getAbsolutePath() + File.separatorChar + artifactId + "-" + bundle + ".properties" + "~")); } @@ -97,7 +96,7 @@ if (genSrc) { // Copie des fichiers dans les sources - PluginHelper.copy(bundleOut, bundleSrc); + FileUtil.copy(bundleOut, bundleSrc); getLog().info("Copy bundle " + bundleSrc.getAbsolutePath()); } Modified: trunk/maven-i18n-plugin/src/main/java/org/codelutin/i18n/plugin/core/Getter.java =================================================================== --- trunk/maven-i18n-plugin/src/main/java/org/codelutin/i18n/plugin/core/Getter.java 2008-08-17 20:33:30 UTC (rev 1038) +++ trunk/maven-i18n-plugin/src/main/java/org/codelutin/i18n/plugin/core/Getter.java 2008-08-17 21:01:38 UTC (rev 1039) @@ -1,21 +1,19 @@ -/* *##% - * Copyright (C) 2007 - * I18nPlugin, Code Lutin - * - * 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. - * +/* + * *##% Plugin maven pour lutini18n + * Copyright (C) 2007 - 2008 CodeLutin + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - *##%*/ + * GNU General Lesser Public License for more details. + * + * You should have received a copy of the GNU General Lesser Public + * License along with this program. If not, see <http://www.gnu.org/licenses/lgpl-3.0.html>. ##%* */ package org.codelutin.i18n.plugin.core; @@ -23,6 +21,7 @@ import org.apache.maven.plugin.MojoFailureException; import org.codehaus.plexus.util.DirectoryScanner; import org.codelutin.i18n.plugin.PluginHelper; +import org.codelutin.util.FileUtil; import java.io.File; import java.io.IOException; @@ -66,7 +65,7 @@ for (String bundle : bundles) { //File bundleOut = new File(out.getAbsolutePath() + File.separatorChar + artifactId + "-" + bundle + ".properties"); File bundleOut = PluginHelper.getI18nFile(out, artifactId, bundle, false); - PluginHelper.copy(bundleGetters, bundleOut); + FileUtil.copy(bundleGetters, bundleOut); getLog().info("Generate bundle " + bundleOut.getAbsolutePath()); } Modified: trunk/maven-i18n-plugin/src/main/java/org/codelutin/i18n/plugin/core/Parser.java =================================================================== --- trunk/maven-i18n-plugin/src/main/java/org/codelutin/i18n/plugin/core/Parser.java 2008-08-17 20:33:30 UTC (rev 1038) +++ trunk/maven-i18n-plugin/src/main/java/org/codelutin/i18n/plugin/core/Parser.java 2008-08-17 21:01:38 UTC (rev 1039) @@ -1,21 +1,19 @@ -/* *##% - * Copyright (C) 2007 - * I18nPlugin, Code Lutin - * - * 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. - * +/* + * *##% Plugin maven pour lutini18n + * Copyright (C) 2007 - 2008 CodeLutin + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - *##%*/ + * GNU General Lesser Public License for more details. + * + * You should have received a copy of the GNU General Lesser Public + * License along with this program. If not, see <http://www.gnu.org/licenses/lgpl-3.0.html>. ##%* */ package org.codelutin.i18n.plugin.core; Modified: trunk/maven-i18n-plugin/src/main/java/org/codelutin/i18n/plugin/core/ParserEvent.java =================================================================== --- trunk/maven-i18n-plugin/src/main/java/org/codelutin/i18n/plugin/core/ParserEvent.java 2008-08-17 20:33:30 UTC (rev 1038) +++ trunk/maven-i18n-plugin/src/main/java/org/codelutin/i18n/plugin/core/ParserEvent.java 2008-08-17 21:01:38 UTC (rev 1039) @@ -1,21 +1,19 @@ -/* *##% - * Copyright (C) 2007 - * I18nPlugin, Code Lutin - * - * 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. - * +/* + * *##% Plugin maven pour lutini18n + * Copyright (C) 2007 - 2008 CodeLutin + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - *##%*/ + * GNU General Lesser Public License for more details. + * + * You should have received a copy of the GNU General Lesser Public + * License along with this program. If not, see <http://www.gnu.org/licenses/lgpl-3.0.html>. ##%* */ package org.codelutin.i18n.plugin.core; Modified: trunk/maven-i18n-plugin/src/main/java/org/codelutin/i18n/plugin/core/ParserException.java =================================================================== --- trunk/maven-i18n-plugin/src/main/java/org/codelutin/i18n/plugin/core/ParserException.java 2008-08-17 20:33:30 UTC (rev 1038) +++ trunk/maven-i18n-plugin/src/main/java/org/codelutin/i18n/plugin/core/ParserException.java 2008-08-17 21:01:38 UTC (rev 1039) @@ -1,21 +1,19 @@ -/* *##% - * Copyright (C) 2007 - * I18nPlugin, Code Lutin - * - * 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. - * +/* + * *##% Plugin maven pour lutini18n + * Copyright (C) 2007 - 2008 CodeLutin + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - *##%*/ + * GNU General Lesser Public License for more details. + * + * You should have received a copy of the GNU General Lesser Public + * License along with this program. If not, see <http://www.gnu.org/licenses/lgpl-3.0.html>. ##%* */ package org.codelutin.i18n.plugin.core; Modified: trunk/maven-i18n-plugin/src/main/java/org/codelutin/i18n/plugin/core/SourceEntry.java =================================================================== --- trunk/maven-i18n-plugin/src/main/java/org/codelutin/i18n/plugin/core/SourceEntry.java 2008-08-17 20:33:30 UTC (rev 1038) +++ trunk/maven-i18n-plugin/src/main/java/org/codelutin/i18n/plugin/core/SourceEntry.java 2008-08-17 21:01:38 UTC (rev 1039) @@ -1,21 +1,19 @@ /* -* \#\#% Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008 Code Lutin, -* Tony Chemit -* -* 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -* \#\#% */ +* *##% Plugin maven pour lutini18n + * Copyright (C) 2007 - 2008 CodeLutin + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 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 Lesser Public License for more details. + * + * You should have received a copy of the GNU General Lesser Public + * License along with this program. If not, see <http://www.gnu.org/licenses/lgpl-3.0.html>. ##%* */ package org.codelutin.i18n.plugin.core; import org.apache.maven.plugin.logging.Log; @@ -32,7 +30,7 @@ * A simple model for a sourceEntry represents by a basedir and includes and/or exlucdes pattern. * <p/> * The class offers the usefull method : - * {@link #getIncludedFiles(File, String[])} + * {@link #getIncludedFiles(File, String[], String[])} * <p/> * to obtain the list of files from * the {@link #basedir} directory which respects the {@link #includes} and/or Modified: trunk/maven-i18n-plugin/src/main/java/org/codelutin/i18n/plugin/extension/ParserJava.java =================================================================== --- trunk/maven-i18n-plugin/src/main/java/org/codelutin/i18n/plugin/extension/ParserJava.java 2008-08-17 20:33:30 UTC (rev 1038) +++ trunk/maven-i18n-plugin/src/main/java/org/codelutin/i18n/plugin/extension/ParserJava.java 2008-08-17 21:01:38 UTC (rev 1039) @@ -1,21 +1,19 @@ -/* *##% - * Copyright (C) 2007 - * I18nPlugin, Code Lutin - * - * 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. - * +/* + * *##% Plugin maven pour lutini18n + * Copyright (C) 2007 - 2008 CodeLutin + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - *##%*/ + * GNU General Lesser Public License for more details. + * + * You should have received a copy of the GNU General Lesser Public + * License along with this program. If not, see <http://www.gnu.org/licenses/lgpl-3.0.html>. ##%* */ package org.codelutin.i18n.plugin.extension; Modified: trunk/maven-i18n-plugin/src/main/java/org/codelutin/i18n/plugin/extension/ParserJavaActionConfig.java =================================================================== --- trunk/maven-i18n-plugin/src/main/java/org/codelutin/i18n/plugin/extension/ParserJavaActionConfig.java 2008-08-17 20:33:30 UTC (rev 1038) +++ trunk/maven-i18n-plugin/src/main/java/org/codelutin/i18n/plugin/extension/ParserJavaActionConfig.java 2008-08-17 21:01:38 UTC (rev 1039) @@ -1,21 +1,19 @@ /* -* ##% Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008 Code Lutin, -* Tony Chemit -* -* 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -* ##% */ +* *##% Plugin maven pour lutini18n + * Copyright (C) 2007 - 2008 CodeLutin + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 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 Lesser Public License for more details. + * + * You should have received a copy of the GNU General Lesser Public + * License along with this program. If not, see <http://www.gnu.org/licenses/lgpl-3.0.html>. ##%* */ package org.codelutin.i18n.plugin.extension; import org.codelutin.i18n.plugin.core.ParserEvent; Modified: trunk/maven-i18n-plugin/src/main/java/org/codelutin/i18n/plugin/extension/ParserJavaTabConfig.java =================================================================== --- trunk/maven-i18n-plugin/src/main/java/org/codelutin/i18n/plugin/extension/ParserJavaTabConfig.java 2008-08-17 20:33:30 UTC (rev 1038) +++ trunk/maven-i18n-plugin/src/main/java/org/codelutin/i18n/plugin/extension/ParserJavaTabConfig.java 2008-08-17 21:01:38 UTC (rev 1039) @@ -1,16 +1,19 @@ /** - * ##% Copyright (C) 2008 Code Lutin, Tony Chemit - * 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., 59 Temple Place - * - Suite 330, Boston, MA 02111-1307, USA. - * ##% + * *##% Plugin maven pour lutini18n + * Copyright (C) 2007 - 2008 CodeLutin + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 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 Lesser Public License for more details. + * + * You should have received a copy of the GNU General Lesser Public + * License along with this program. If not, see <http://www.gnu.org/licenses/lgpl-3.0.html>. ##%* */ package org.codelutin.i18n.plugin.extension; Modified: trunk/maven-i18n-plugin/src/main/java/org/codelutin/i18n/plugin/extension/ParserJaxx.java =================================================================== --- trunk/maven-i18n-plugin/src/main/java/org/codelutin/i18n/plugin/extension/ParserJaxx.java 2008-08-17 20:33:30 UTC (rev 1038) +++ trunk/maven-i18n-plugin/src/main/java/org/codelutin/i18n/plugin/extension/ParserJaxx.java 2008-08-17 21:01:38 UTC (rev 1039) @@ -1,21 +1,19 @@ -/* *##% - * Copyright (C) 2007 - * I18nPlugin, Code Lutin - * - * 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. - * +/* + * *##% Plugin maven pour lutini18n + * Copyright (C) 2007 - 2008 CodeLutin + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - *##%*/ + * GNU General Lesser Public License for more details. + * + * You should have received a copy of the GNU General Lesser Public + * License along with this program. If not, see <http://www.gnu.org/licenses/lgpl-3.0.html>. ##%* */ package org.codelutin.i18n.plugin.extension; Modified: trunk/maven-i18n-plugin/src/main/java/org/codelutin/i18n/plugin/extension/ParserSwixat.java =================================================================== --- trunk/maven-i18n-plugin/src/main/java/org/codelutin/i18n/plugin/extension/ParserSwixat.java 2008-08-17 20:33:30 UTC (rev 1038) +++ trunk/maven-i18n-plugin/src/main/java/org/codelutin/i18n/plugin/extension/ParserSwixat.java 2008-08-17 21:01:38 UTC (rev 1039) @@ -1,21 +1,19 @@ -/* *##% - * Copyright (C) 2007 - * I18nPlugin, Code Lutin - * - * 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. - * +/* + * *##% Plugin maven pour lutini18n + * Copyright (C) 2007 - 2008 CodeLutin + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - *##%*/ + * GNU General Lesser Public License for more details. + * + * You should have received a copy of the GNU General Lesser Public + * License along with this program. If not, see <http://www.gnu.org/licenses/lgpl-3.0.html>. ##%* */ package org.codelutin.i18n.plugin.extension; Modified: trunk/maven-i18n-plugin/src/main/java/org/codelutin/i18n/plugin/extension/ParserXml.java =================================================================== --- trunk/maven-i18n-plugin/src/main/java/org/codelutin/i18n/plugin/extension/ParserXml.java 2008-08-17 20:33:30 UTC (rev 1038) +++ trunk/maven-i18n-plugin/src/main/java/org/codelutin/i18n/plugin/extension/ParserXml.java 2008-08-17 21:01:38 UTC (rev 1039) @@ -1,21 +1,19 @@ -/* *##% - * Copyright (C) 2007 - * I18nPlugin, Code Lutin - * - * 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. - * +/* + * *##% Plugin maven pour lutini18n + * Copyright (C) 2007 - 2008 CodeLutin + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - *##%*/ + * GNU General Lesser Public License for more details. + * + * You should have received a copy of the GNU General Lesser Public + * License along with this program. If not, see <http://www.gnu.org/licenses/lgpl-3.0.html>. ##%* */ package org.codelutin.i18n.plugin.extension; @@ -49,6 +47,7 @@ /** * default src for an entry. + * * @parameter expression="${i18n.defaultBasedir}" default-value="${basedir}/src/uimodel" * @required */ Modified: trunk/maven-i18n-plugin/src/main/java/org/codelutin/i18n/plugin/ui/KeysModifier.java =================================================================== --- trunk/maven-i18n-plugin/src/main/java/org/codelutin/i18n/plugin/ui/KeysModifier.java 2008-08-17 20:33:30 UTC (rev 1038) +++ trunk/maven-i18n-plugin/src/main/java/org/codelutin/i18n/plugin/ui/KeysModifier.java 2008-08-17 21:01:38 UTC (rev 1039) @@ -1,27 +1,25 @@ -/* *##% - * Copyright (C) 2007 - * I18nPlugin, Code Lutin - * - * 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. - * +/* + * *##% Plugin maven pour lutini18n + * Copyright (C) 2007 - 2008 CodeLutin + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - *##%*/ + * GNU General Lesser Public License for more details. + * + * You should have received a copy of the GNU General Lesser Public + * License along with this program. If not, see <http://www.gnu.org/licenses/lgpl-3.0.html>. ##%* */ package org.codelutin.i18n.plugin.ui; -import org.codelutin.i18n.plugin.PluginHelper; import org.codelutin.i18n.plugin.core.ParserEvent; import org.codelutin.i18n.plugin.core.ParserException; +import org.codelutin.util.FileUtil; import javax.swing.JButton; import javax.swing.JCheckBox; @@ -156,7 +154,7 @@ int region = 0; try { - content = PluginHelper.readAsString(file, encoding); + content = FileUtil.readAsString(file, encoding); } catch (IOException e) { throw new ParserException(e); } @@ -173,7 +171,7 @@ } try { - PluginHelper.writeString(file, content, encoding); + FileUtil.writeString(file, content, encoding); } catch (IOException e) { throw new ParserException(e); }
participants (1)
-
tchemit@users.labs.libre-entreprise.org