Changeset 14125 in osm for applications/editors/josm


Ignore:
Timestamp:
2009-03-19T09:24:41+01:00 (16 years ago)
Author:
stoecker
Message:

fixed build

Location:
applications/editors/josm/plugins
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins

    • Property svn:ignore deleted
  • applications/editors/josm/plugins/build.xml

    r13636 r14125  
    4343        <ant antfile="build.xml" target="clean" dir="cadastre-fr"/>
    4444        <ant antfile="build.xml" target="clean" dir="colorscheme"/>
     45        <ant antfile="build.xml" target="clean" dir="DirectUpload"/>
    4546        <ant antfile="build.xml" target="clean" dir="duplicateway"/>
    4647        <ant antfile="build.xml" target="clean" dir="globalsat"/>
  • applications/editors/josm/plugins/openlayers/build.xml

    r12780 r14125  
    11<project name="openlayers" default="dist" basedir=".">
    2 <!-- josm "user home" directory depends on the platform used (windows has a different place than unix/linux) -->
    3     <property environment="env"/>
    4     <condition property="josm.home.dir" value="${env.APPDATA}/JOSM" else="${user.home}/.josm">
    5         <and>
    6             <os family="windows"/>
    7         </and>
    8     </condition>
    9 <!-- compilation properties -->
    10     <property name="josm.build.dir"   value="../../core"/>
    11     <property name="josm.plugins.dir" value="${josm.home.dir}/plugins"/>
    12     <property name="josm"             location="../../core/dist/josm-custom.jar" />
    13     <property name="plugin.build.dir" value="build"/>
    14     <property name="plugin.dist.dir"  value="../../dist"/>
    15     <property name="plugin.name"      value="${ant.project.name}"/>
    16     <property name="plugin.jar"       value="../../dist/${plugin.name}.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"/>
    176    <property name="ant.build.javac.target" value="1.5"/>
    18 <!-- All jar files needed -->
    19     <fileset id="required_libs" dir="lib">
    20         <include name="cobra.jar"/>
    21         <include name="js.jar"/>
    22         <include name="ehcache-1.4.1.jar"/>
    23         <include name="backport-util-concurrent-3.0.jar"/>
    24 <!-- needed by ehcache -->
    25         <include name="commons-logging-1.0.4.jar"/>
    26 <!--needed by ehcache -->
    27     </fileset>
    287    <target name="init">
    29         <mkdir dir="build"></mkdir>
    30         <mkdir dir="dist"></mkdir>
     8        <mkdir dir="${plugin.build.dir}"/>
    319    </target>
    3210    <target name="compile" depends="init">
    3311        <echo message="creating ${plugin.jar}"/>
    34         <javac srcdir="src" debug="true" destdir="build">
     12        <javac srcdir="src" debug="true" destdir="${plugin.build.dir}">
     13            <compilerarg value="-Xlint:deprecation"/>
     14            <compilerarg value="-Xlint:unchecked"/>
    3515            <classpath>
    36                 <path path="../../core/dist/josm-custom.jar"/>
    37                 <fileset refid="required_libs"/>
     16                <pathelement location="${josm}"/>
     17                <fileset dir="lib">
     18                    <include name="**/*.jar"/>
     19                </fileset>
    3820            </classpath>
    3921        </javac>
    4022    </target>
    41     <target name="dist" depends="compile">
    42 <!-- jars -->
    43 <!-- TODO: instead of adding library code to the plugin jar, JOSM should
    44          have some kind of library dir loaded in the classpath -->
    45         <unjar dest="build">
    46             <fileset refid="required_libs" />
     23    <target name="dist" depends="compile,revision">
     24        <unjar dest="${plugin.build.dir}">
     25            <fileset dir="lib"/>
    4726        </unjar>
    48 <!-- images -->
    49         <copy todir="build/images">
    50             <fileset dir="images" />
     27        <copy todir="${plugin.build.dir}/resources">
     28            <fileset dir="resources"/>
    5129        </copy>
    52 <!--resources -->
    53         <copy todir="build/resources">
    54             <fileset dir="resources" />
     30        <copy todir="${plugin.build.dir}/images">
     31            <fileset dir="images"/>
    5532        </copy>
    56 <!-- create josm-custom.jar -->
    57         <jar destfile="${plugin.jar}" basedir="build">
     33        <jar destfile="${plugin.jar}" basedir="${plugin.build.dir}">
    5834            <manifest>
    5935                <attribute name="Plugin-Class" value="org.openstreetmap.josm.plugins.openLayers.OpenLayersPlugin" />
    6036                <attribute name="Plugin-Description" value="Displays an OpenLayers background image" />
    61                 <attribute name="Class-Path" value="cobra.jar js.jar ehcache-1.4.1.jar commons-logging-1.0.4.jar backport-util-concurrent-3.0.jar" />
    6237            </manifest>
    6338        </jar>
    6439    </target>
     40    <target name="revision">
     41        <exec append="false" output="REVISION" executable="svn" failifexecutionfails="false">
     42            <env key="LANG" value="C"/>
     43            <arg value="info"/>
     44            <arg value="--xml"/>
     45            <arg value="."/>
     46        </exec>
     47        <xmlproperty file="REVISION" prefix="version" keepRoot="false" collapseAttributes="true"/>
     48        <delete file="REVISION"/>
     49    </target>
    6550    <target name="clean">
    66         <delete dir="${plugin.build.dir}" />
    67         <delete file="${plugin.jar}" />
     51        <delete dir="${plugin.build.dir}"/>
     52        <delete file="${plugin.jar}"/>
    6853    </target>
    6954    <target name="install" depends="dist">
     55        <property environment="env"/>
     56        <condition property="josm.plugins.dir" value="${env.APPDATA}/JOSM/plugins" else="${user.home}/.josm/plugins">
     57            <and>
     58                <os family="windows"/>
     59            </and>
     60        </condition>
    7061        <copy file="${plugin.jar}" todir="${josm.plugins.dir}"/>
    7162    </target>
  • applications/editors/josm/plugins/usertools/src/usertools/UserToolsPlugin.java

    r13497 r14125  
    11package usertools;
    22
     3import static org.openstreetmap.josm.tools.I18n.marktr;
    34import static org.openstreetmap.josm.tools.I18n.tr;
    45
     
    78import java.io.UnsupportedEncodingException;
    89
    9 import javax.swing.*;
     10import javax.swing.JMenu;
     11import javax.swing.JMenuItem;
     12import javax.swing.JOptionPane;
     13import javax.swing.JViewport;
     14import javax.swing.JScrollPane;
     15import javax.swing.JTable;
    1016
    1117import org.openstreetmap.josm.actions.JosmAction;
    12 //import org.openstreetmap.josm.actions.search.*;
    1318import org.openstreetmap.josm.actions.search.SearchAction;
    1419import org.openstreetmap.josm.gui.dialogs.UserListDialog;
     
    6570        MainMenu menu = Main.main.menu;
    6671
    67         if (userJMenu == null) {
    68             userJMenu = new JMenu(tr("User"));
    69             menu.add(userJMenu, KeyEvent.VK_U, "user");
    70             menu.add(userJMenu, 5);
    71         } else {
     72        if (userJMenu == null)
     73            userJMenu = menu.addMenu(marktr("User"), KeyEvent.VK_U, menu.defaultMenuPos);
     74        else
    7275            userJMenu.removeAll();
    73         }
     76
    7477        JosmAction a = new JosmAction(tr("Show Author Panel"),
    7578        "dialogs/userlist", tr("Show Author Panel"), null, false) {
     
    9093        };
    9194        a.putValue("toolbar", "usertools_show");
    92         userJMenu.add(new JMenuItem(a));
     95        menu.add(userJMenu,a);
    9396
    9497        userJMenu.addSeparator();
     
    105108        };
    106109        a.putValue("toolbar", "usertools_open");
    107         userJMenu.add(new JMenuItem(a));
     110        menu.add(userJMenu,a);
    108111
    109112        a = new JosmAction(tr("Select User's Data"),
     
    118121        };
    119122        a.putValue("toolbar", "usertools_search");
    120         userJMenu.add(new JMenuItem(a));
     123        menu.add(userJMenu,a);
    121124
    122125        setEnabledAll(false);
Note: See TracChangeset for help on using the changeset viewer.