Changeset 29519 in osm


Ignore:
Timestamp:
2013-04-19T23:58:30+02:00 (12 years ago)
Author:
donvip
Message:

[josm_fixaddresses] update to last jmapviewer (see #josm8620)

Location:
applications/editors/josm/plugins/FixAddresses
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/FixAddresses/build.xml

    r29435 r29519  
    11<?xml version="1.0" encoding="utf-8"?>
    2 <!--
    3 ** This is a template build file for a JOSM  plugin.
    4 **
    5 ** Maintaining versions
    6 ** ====================
    7 ** see README.template
    8 **
    9 ** Usage
    10 ** =====
    11 ** To build it run
    12 **
    13 **    > ant  dist
    14 **
    15 ** To install the generated plugin locally (in you default plugin directory) run
    16 **
    17 **    > ant  install
    18 **
    19 ** The generated plugin jar is not automatically available in JOSMs plugin configuration
    20 ** dialog. You have to check it in first.
    21 **
    22 -->
    232<project name="FixAddresses" default="dist" basedir=".">
    243        <!-- enter the SVN commit message -->
    254        <property name="commit.message" value="fix compile error (core changes)"/>
     5        <!-- enter the *lowest* JOSM version this plugin is currently compatible with -->
     6    <property name="plugin.main.version" value="5886"/>
    267       
    27     <property name="plugin.main.version" value="4991"/>
    28     <!--
    29       ************************************************
    30       ** should not be necessary to change the following properties
    31      -->
    32     <property name="josm" location="../../core/dist/josm-custom.jar"/>
    33     <property name="plugin.build.dir" value="build"/>
    34     <property name="plugin.src.dir" value="src"/>
    35     <!-- this is the directory where the plugin jar is copied to -->
    36     <property name="plugin.dist.dir" value="../../dist"/>
    37     <property name="ant.build.javac.target" value="1.5"/>
    38     <property name="plugin.jar" value="${plugin.dist.dir}/${ant.project.name}.jar"/>
    39     <!--
    40     **********************************************************
    41     ** init - initializes the build
    42     **********************************************************
     8    <!-- Configure these properties (replace "..." accordingly).
     9         See http://josm.openstreetmap.de/wiki/DevelopersGuide/DevelopingPlugins
    4310    -->
    44     <target name="init">
    45         <mkdir dir="${plugin.build.dir}"/>
    46     </target>
    47     <!--
    48     **********************************************************
    49     ** compile - complies the source tree
    50     **********************************************************
    51     -->
    52     <target name="compile" depends="init">
    53         <echo message="compiling sources for  ${plugin.jar} ... "/>
    54         <javac srcdir="src" classpath="${josm}" debug="true" destdir="${plugin.build.dir}" includeantruntime="false">
    55             <compilerarg value="-Xlint:deprecation"/>
    56             <compilerarg value="-Xlint:unchecked"/>
    57         </javac>
    58     </target>
    59     <!--
    60     **********************************************************
    61     ** dist - creates the plugin jar
    62     **********************************************************
    63     -->
    64     <target name="dist" depends="compile,revision">
    65         <mkdir dir="${plugin.dist.dir}"/>
    66         <echo message="creating ${plugin.jar} ... "/>
    67         <copy todir="${plugin.build.dir}/resources">
    68             <fileset dir="resources"/>
    69         </copy>
    70         <copy todir="${plugin.build.dir}/images">
    71             <fileset dir="images"/>
    72         </copy>
    73         <copy todir="${plugin.build.dir}/data">
    74             <fileset dir="data"/>
    75         </copy>
    76         <copy todir="${plugin.build.dir}">
    77             <fileset dir=".">
    78                 <include name="README"/>
    79                 <include name="GPL-v2.0.txt"/>
    80                 <include name="GPL-v3.0.txt"/>
    81             </fileset>
    82         </copy>
    83         <jar destfile="${plugin.jar}" basedir="${plugin.build.dir}">
    84             <!--
    85         ************************************************
    86         ** configure these properties. Most of them will be copied to the plugins
    87         ** manifest file. Property values will also show up in the list available
    88         ** plugins: http://josm.openstreetmap.de/wiki/Plugins.
    89         **
    90         ************************************************
    91     -->
    92             <manifest>
    93                 <attribute name="Author" value="Oliver Wieland"/>
    94                 <attribute name="Plugin-Class" value="org.openstreetmap.josm.plugins.fixAddresses.FixAddressesPlugin"/>
    95                 <attribute name="Plugin-Date" value="${version.entry.commit.date}"/>
    96                 <attribute name="Plugin-Description" value="Finds and fixes invalid street addresses in a comfortable way."/>
    97                 <attribute name="de_Plugin-Description" value="Findet ungültige Addressen und bietet Unterstützung zur deren Korrektur."/>
    98                 <attribute name="Plugin-Link" value="http://wiki.openstreetmap.org/wiki/JOSM/Plugins/FixAddresses"/>
    99                 <attribute name="Plugin-Mainversion" value="4980"/>
    100                 <attribute name="Plugin-Version" value="${version.entry.commit.revision}"/>
    101                 <attribute name="Plugin-Icon" value="images/fixaddresses.png"/>
    102             </manifest>
    103         </jar>
    104     </target>
    105     <!--
    106     **********************************************************
    107     ** revision - extracts the current revision number for the
    108     **    file build.number and stores it in the XML property
    109     **    version.*
    110     **********************************************************
    111     -->
    112     <target name="revision">
    113         <exec append="false" output="REVISION" executable="svn" failifexecutionfails="false">
    114             <env key="LANG" value="C"/>
    115             <arg value="info"/>
    116             <arg value="--xml"/>
    117             <arg value="."/>
    118         </exec>
    119         <xmlproperty file="REVISION" prefix="version" keepRoot="false" collapseAttributes="true"/>
    120         <echo message="Revision: ${version.entry.commit.revision}"/>
    121         <delete file="REVISION"/>
    122     </target>
    123     <!--
    124     **********************************************************
    125     ** clean - clean up the build environment
    126     **********************************************************
    127     -->
    128     <target name="clean">
    129         <delete dir="${plugin.build.dir}"/>
    130         <delete file="${plugin.jar}"/>
    131     </target>
    132     <!--
    133     **********************************************************
    134     ** install - install the plugin in your local JOSM installation
    135     **********************************************************
    136     -->
    137     <target name="install" depends="dist">
    138         <property environment="env"/>
    139         <condition property="josm.plugins.dir" value="${env.APPDATA}/JOSM/plugins" else="${user.home}/.josm/plugins">
    140             <and>
    141                 <os family="windows"/>
    142             </and>
    143         </condition>
    144         <copy file="${plugin.jar}" todir="${josm.plugins.dir}"/>
    145     </target>
    146        
    147         <!--
    148             ************************** Publishing the plugin ***********************************
    149             -->
    150             <!--
    151                 ** extracts the JOSM release for the JOSM version in ../core and saves it in the
    152                 ** property ${coreversion.info.entry.revision}
    153                 **
    154                 -->
    155             <target name="core-info">
    156                 <exec append="false" output="core.info.xml" executable="svn" failifexecutionfails="false">
    157                     <env key="LANG" value="C"/>
    158                     <arg value="info"/>
    159                     <arg value="--xml"/>
    160                     <arg value="../../core"/>
    161                 </exec>
    162                 <xmlproperty file="core.info.xml" prefix="coreversion" keepRoot="true" collapseAttributes="true"/>
    163                 <echo>Building against core revision ${coreversion.info.entry.revision}.</echo>
    164                 <echo>Plugin-Mainversion is set to ${plugin.main.version}.</echo>
    165                 <delete file="core.info.xml"/>
    166             </target>
    167             <!--
    168                 ** commits the source tree for this plugin
    169                 -->
    170             <target name="commit-current">
    171                 <echo>Commiting the plugin source with message '${commit.message}' ...</echo>
    172                 <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
    173                     <env key="LANG" value="C"/>
    174                     <arg value="commit"/>
    175                     <arg value="-m '${commit.message}'"/>
    176                     <arg value="."/>
    177                 </exec>
    178             </target>
    179             <!--
    180                 ** updates (svn up) the source tree for this plugin
    181                 -->
    182             <target name="update-current">
    183                 <echo>Updating plugin source ...</echo>
    184                 <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
    185                     <env key="LANG" value="C"/>
    186                     <arg value="up"/>
    187                     <arg value="."/>
    188                 </exec>
    189                 <echo>Updating ${plugin.jar} ...</echo>
    190                 <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
    191                     <env key="LANG" value="C"/>
    192                     <arg value="up"/>
    193                     <arg value="../dist/${plugin.jar}"/>
    194                 </exec>
    195             </target>
    196             <!--
    197                 ** commits the plugin.jar
    198                 -->
    199             <target name="commit-dist">
    200                 <echo>
    201             ***** Properties of published ${plugin.jar} *****
    202             Commit message    : '${commit.message}'                 
    203             Plugin-Mainversion: ${plugin.main.version}
    204             JOSM build version: ${coreversion.info.entry.revision}
    205             Plugin-Version    : ${version.entry.commit.revision}
    206             ***** / Properties of published ${plugin.jar} *****                 
    207                                
    208             Now commiting ${plugin.jar} ...
    209             </echo>
    210                 <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
    211                     <env key="LANG" value="C"/>
    212                     <arg value="-m '${commit.message}'"/>
    213                     <arg value="commit"/>
    214                     <arg value="${plugin.jar}"/>
    215                 </exec>
    216             </target>
    217             <!-- ** make sure svn is present as a command line tool ** -->
    218             <target name="ensure-svn-present">
    219                 <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false" failonerror="false" resultproperty="svn.exit.code">
    220                     <env key="LANG" value="C"/>
    221                     <arg value="--version"/>
    222                 </exec>
    223                 <fail message="Fatal: command 'svn --version' failed. Please make sure svn is installed on your system.">
    224                     <!-- return code not set at all? Most likely svn isn't installed -->
    225                     <condition>
    226                         <not>
    227                             <isset property="svn.exit.code"/>
    228                         </not>
    229                     </condition>
    230                 </fail>
    231                 <fail message="Fatal: command 'svn --version' failed. Please make sure a working copy of svn is installed on your system.">
    232                     <!-- error code from SVN? Most likely svn is not what we are looking on this system -->
    233                     <condition>
    234                         <isfailure code="${svn.exit.code}"/>
    235                     </condition>
    236                 </fail>
    237             </target>
    238             <target name="publish" depends="ensure-svn-present,core-info,commit-current,update-current,clean,dist,commit-dist">
    239             </target>
     11    <property name="plugin.author" value="Oliver Wieland"/>
     12    <property name="plugin.class" value="org.openstreetmap.josm.plugins.fixAddresses.FixAddressesPlugin"/>
     13    <property name="plugin.description" value="Finds and fixes invalid street addresses in a comfortable way."/>
     14    <property name="plugin.icon" value="images/fixaddresses.png"/>
     15    <property name="plugin.link" value="http://wiki.openstreetmap.org/wiki/JOSM/Plugins/FixAddresses"/>
     16
     17    <!-- ** include targets that all plugins have in common ** -->
     18    <import file="../build-common.xml"/>
    24019</project>
  • applications/editors/josm/plugins/FixAddresses/src/org/openstreetmap/josm/plugins/fixAddresses/gui/BBoxMapRectangle.java

    r25373 r29519  
    1818
    1919import org.openstreetmap.gui.jmapviewer.Coordinate;
    20 import org.openstreetmap.gui.jmapviewer.interfaces.MapRectangle;
     20import org.openstreetmap.gui.jmapviewer.MapRectangleImpl;
    2121import org.openstreetmap.josm.data.osm.BBox;
    2222
    23 public class BBoxMapRectangle implements MapRectangle {
     23public class BBoxMapRectangle extends MapRectangleImpl {
    2424        private BBox bbox;
    2525
     
    2828         */
    2929        public BBoxMapRectangle(BBox bbox) {
    30                 super();
     30                super(null, null);
    3131                this.bbox = bbox;
    3232        }
     
    4646                        // do nothing here
    4747        }
    48 
    4948}
Note: See TracChangeset for help on using the changeset viewer.