Changeset 13332 in osm for applications/editors/josm/plugins/validator
- Timestamp:
- 2009-01-23T22:36:04+01:00 (17 years ago)
- Location:
- applications/editors/josm/plugins/validator
- Files:
-
- 3 edited
-
build.xml (modified) (4 diffs)
-
src/org/openstreetmap/josm/plugins/validator/PreferenceEditor.java (modified) (2 diffs)
-
src/org/openstreetmap/josm/plugins/validator/util/Util.java (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/validator/build.xml
r12780 r13332 1 1 <project name="validator" default="dist" basedir="."> 2 <!-- compilation properties --> 3 <property name="josm.build.dir" value="../../core"/> 4 <property name="josm.home.dir" value="${user.home}/.josm"/> 5 <property name="plugin.build.dir" value="build"/> 6 <property name="plugin.dist.dir" value="../../dist"/> 7 <property name="plugin.name" value="${ant.project.name}"/> 8 <property name="plugin.jar" value="../../dist/${plugin.name}.jar"/> 9 <!-- point to your JOSM directory --> 10 <property name="josm" location="../../core/dist/josm-custom.jar" /> 2 <property name="josm" location="../../core/dist/josm-custom.jar" /> 3 <property name="plugin.dist.dir" value="../../dist"/> 4 <property name="plugin.build.dir" value="build"/> 5 <property name="plugin.jar" value="${plugin.dist.dir}/${ant.project.name}.jar"/> 11 6 <property name="ant.build.javac.target" value="1.5"/> 12 7 <target name="init"> … … 15 10 <target name="compile" depends="init"> 16 11 <echo message="creating ${plugin.jar}"/> 17 <javac srcdir="src" classpath="${josm}" destdir="build" debug="true" encoding="UTF-8"> 12 <javac srcdir="src" classpath="${josm}" debug="true" destdir="${plugin.build.dir}" encoding="UTF-8"> 13 <compilerarg value="-Xlint:deprecation"/> 14 <compilerarg value="-Xlint:unchecked"/> 18 15 <include name="**/*.java" /> 19 16 </javac> 20 17 </target> 21 <target name="dist" depends="c lean, compile">22 <copy todir=" build/images">18 <target name="dist" depends="compile"> 19 <copy todir="${plugin.build.dir}/images"> 23 20 <fileset dir="images"/> 24 21 </copy> … … 31 28 <xmlproperty file="REVISION" prefix="version" keepRoot="false" collapseAttributes="true"/> 32 29 <delete file="REVISION"/> 33 <jar destfile="${plugin.jar}" basedir=" build">30 <jar destfile="${plugin.jar}" basedir="${plugin.build.dir}"> 34 31 <manifest> 35 32 <attribute name="Plugin-Class" value="org.openstreetmap.josm.plugins.validator.OSMValidatorPlugin"/> … … 42 39 </jar> 43 40 </target> 44 <!-- clean target -->45 41 <target name="clean"> 46 42 <delete dir="${plugin.build.dir}" /> 47 43 <delete file="${plugin.jar}" /> 48 44 </target> 49 <target name="install" depends="dist">50 <copy file="${plugin.jar}" todir="${user.home}/.josm/plugins"/>51 </target>52 <target name="test" depends="install">53 <java jar="${josm}" fork="true"></java>54 </target>55 45 </project> -
applications/editors/josm/plugins/validator/src/org/openstreetmap/josm/plugins/validator/PreferenceEditor.java
r12991 r13332 16 16 import org.openstreetmap.josm.gui.preferences.PreferenceSetting; 17 17 import org.openstreetmap.josm.plugins.validator.util.Util; 18 import org.openstreetmap.josm.plugins.validator.util.Util.Version;19 18 import org.openstreetmap.josm.tools.GBC; 20 19 … … 89 88 testPane.setBorder(null); 90 89 91 Version ver = Util.getVersion();92 90 String description = tr("An OSM data validator that checks for common errors made by users and editor programs."); 93 if( ver != null )94 description += "<br>" + tr("Version {0} - Last change at {1}", ver.revision, ver.time);95 91 JPanel tab = gui.createPreferenceTab("validator", tr("Data validator"), description); 96 92 tab.add(testPane, GBC.eol().fill(GBC.BOTH)); -
applications/editors/josm/plugins/validator/src/org/openstreetmap/josm/plugins/validator/util/Util.java
r12778 r13332 30 30 { 31 31 return Main.pref.getPreferencesDir() + "plugins/validator/"; 32 }33 34 /**35 * Returns the version36 * @return The version of the application37 */38 public static Version getVersion()39 {40 PluginInformation info = PluginInformation.getLoaded("validator");41 if( info == null )42 return null;43 44 return new Version(info.version, info.attr.get("Plugin-Date"));45 }46 47 /**48 * Utility class for displaying versions49 *50 * @author frsantos51 */52 public static class Version53 {54 /** The revision */55 public String revision;56 /** The build time */57 public String time;58 59 /**60 * Constructor61 * @param revision62 * @param time63 */64 public Version(String revision, String time)65 {66 this.revision = revision;67 this.time = time;68 }69 32 } 70 33
Note:
See TracChangeset
for help on using the changeset viewer.
