Changeset 29778 in osm


Ignore:
Timestamp:
2013-07-25T21:57:38+02:00 (11 years ago)
Author:
akks
Message:

[josm_plugins]: see #josm6355 - Move most of the other plugins to suitable menus, add Netbeans projects

Location:
applications/editors/josm/plugins
Files:
30 added
3 deleted
50 edited

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/CommandLine/nbproject

    • Property svn:ignore set to
      private
  • applications/editors/josm/plugins/DirectUpload/build.xml

    r29719 r29778  
    55    <property name="commit.message" value="applied JOSM Ticket 4498 (patch by ax) - oauth support for gpx upload (I accidentally committed parts of the path in [24236])"/>
    66    <!-- enter the *lowest* JOSM version this plugin is currently compatible with -->
    7     <property name="plugin.main.version" value="5587"/>
     7    <property name="plugin.main.version" value="6082"/>
    88
    99    <!-- Configure these properties (replace "..." accordingly).
  • applications/editors/josm/plugins/DirectUpload/nbproject/project.properties

    r11949 r29778  
    44build.dir=build
    55build.generated.dir=${build.dir}/generated
     6build.generated.sources.dir=${build.dir}/generated-sources
    67# Only compile against the classpath explicitly listed here:
    78build.sysclasspath=ignore
  • applications/editors/josm/plugins/DirectUpload/src/org/openstreetmap/josm/plugins/DirectUpload/UploadDataGuiPlugin.java

    r27852 r29778  
    2929        super(info);
    3030        openaction = new UploadAction();
    31         Main.main.menu.toolsMenu.add(openaction);
     31        Main.main.menu.gpsMenu.add(openaction);
    3232    }
    3333
  • applications/editors/josm/plugins/FixAddresses/build.xml

    r29661 r29778  
    11<?xml version="1.0" encoding="utf-8"?>
    22<project name="FixAddresses" default="dist" basedir=".">
    3         <!-- enter the SVN commit message -->
    4         <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="6010"/>
     3    <!-- enter the SVN commit message -->
     4    <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="6082"/>
    77       
    88    <!-- Configure these properties (replace "..." accordingly).
  • applications/editors/josm/plugins/FixAddresses/src/org/openstreetmap/josm/plugins/fixAddresses/FixAddressesPlugin.java

    r29500 r29778  
    1414package org.openstreetmap.josm.plugins.fixAddresses;
    1515
     16import javax.swing.JMenu;
    1617import org.openstreetmap.josm.Main;
    1718import org.openstreetmap.josm.gui.IconToggleButton;
     19import org.openstreetmap.josm.gui.MainMenu;
    1820import org.openstreetmap.josm.gui.MapFrame;
    1921import org.openstreetmap.josm.gui.preferences.PreferenceSetting;
     
    4143
    4244                // ... and add them to the tools menu in main
    43                 Main.main.menu.toolsMenu.addSeparator();
    44                 Main.main.menu.toolsMenu.add(action);
    45                 Main.main.menu.toolsMenu.add(incAddrAction);
     45                MainMenu.add(Main.main.menu.dataMenu, action, false, 0);
     46                MainMenu.add(Main.main.menu.selectionMenu, incAddrAction);
    4647
    4748                // create preferences instance
  • applications/editors/josm/plugins/HouseNumberTaggingTool/build.xml

    r29435 r29778  
    3232    <property name="commit.message" value="Initial version."/>
    3333    <!-- enter the *lowest* JOSM version this plugin is currently compatible with -->
    34     <property name="plugin.main.version" value="4980"/>
    35     <!-- should not be necessary to change the following properties -->
    36     <property name="josm" location="../../core/dist/josm-custom.jar"/>
    37     <property name="plugin.build.dir" value="build"/>
    38     <property name="plugin.src.dir" value="src"/>
    39     <!-- this is the directory where the plugin jar is copied to -->
    40     <property name="plugin.dist.dir" value="../../dist"/>
    41     <property name="ant.build.javac.target" value="1.5"/>
    42     <property name="plugin.dist.dir" value="../../dist"/>
    43     <property name="plugin.jar" value="${plugin.dist.dir}/${ant.project.name}.jar"/>
    44     <!--
    45     **********************************************************
    46     ** init - initializes the build
    47     **********************************************************
     34    <property name="plugin.main.version" value="6082"/>
     35    <!-- Configure these properties (replace "..." accordingly).
     36         See http://josm.openstreetmap.de/wiki/DevelopersGuide/DevelopingPlugins
    4837    -->
    49     <target name="init">
    50         <mkdir dir="${plugin.build.dir}"/>
    51     </target>
    52     <!--
    53     **********************************************************
    54     ** compile - complies the source tree
    55     **********************************************************
    56     -->
    57     <target name="compile" depends="init">
    58         <echo message="compiling sources for  ${plugin.jar} ... "/>
    59         <javac srcdir="src" classpath="${josm}" debug="true" destdir="${plugin.build.dir}">
    60             <compilerarg value="-Xlint:deprecation"/>
    61             <compilerarg value="-Xlint:unchecked"/>
    62         </javac>
    63     </target>
    64     <!--
    65     **********************************************************
    66     ** dist - creates the plugin jar
    67     **********************************************************
    68     -->
    69     <target name="dist" depends="compile,revision">
    70         <echo message="creating ${ant.project.name}.jar ... "/>
    71         <copy todir="${plugin.build.dir}/resources">
    72             <fileset dir="resources"/>
    73         </copy>
    74         <copy todir="${plugin.build.dir}/images">
    75             <fileset dir="images"/>
    76         </copy>
    77         <copy todir="${plugin.build.dir}/data">
    78             <fileset dir="data"/>
    79         </copy>
    80         <copy todir="${plugin.build.dir}">
    81             <fileset dir=".">
    82                 <include name="README"/>
    83                 <include name="LICENSE"/>
    84             </fileset>
    85         </copy>
    86         <jar destfile="${plugin.jar}" basedir="${plugin.build.dir}">
    87             <!--
    88             ************************************************
    89             ** configure these properties. Most of them will be copied to the plugins
    90             ** manifest file. Property values will also show up in the list available
    91             ** plugins: http://josm.openstreetmap.de/wiki/Plugins.
    92             **
    93             ************************************************
    94             -->
    95             <manifest>
    96                 <attribute name="Author" value="Oliver Raupach"/>
    97                 <attribute name="Plugin-Class" value="org.openstreetmap.josm.plugins.housenumbertool.HouseNumberTaggingToolPlugin"/>
    98                 <attribute name="Plugin-Description" value="Simple tool to tag house numbers."/>
    99                 <attribute name="Plugin-Mainversion" value="${plugin.main.version}"/>
    100                 <attribute name="Plugin-Version" value="${version.entry.commit.revision}"/>
    101                 <attribute name="Plugin-Date" value="${version.entry.commit.date}"/>
    102                 <attribute name="Plugin-Icon" value="images/home-icon32.png"/>
    103                 <attribute name="Plugin-Link" value="http://josm.openstreetmap.de/wiki/Help/Plugin/HouseNumberTaggingTool"/>
    104             </manifest>
    105         </jar>
    106     </target>
    107     <!--
    108     **********************************************************
    109     ** revision - extracts the current revision number for the
    110     **    file build.number and stores it in the XML property
    111     **    version.*
    112     **********************************************************
    113     -->
    114     <target name="revision">
    115         <exec append="false" output="REVISION" executable="svn" failifexecutionfails="false">
    116             <env key="LANG" value="C"/>
    117             <arg value="info"/>
    118             <arg value="--xml"/>
    119             <arg value="."/>
    120         </exec>
    121         <xmlproperty file="REVISION" prefix="version" keepRoot="false" collapseAttributes="true"/>
    122         <delete file="REVISION"/>
    123     </target>
    124     <!--
    125     **********************************************************
    126     ** clean - clean up the build environment
    127     **********************************************************
    128     -->
    129     <target name="clean">
    130         <delete dir="${plugin.build.dir}"/>
    131         <delete file="${plugin.jar}"/>
    132     </target>
    133     <!--
    134     **********************************************************
    135     ** install - install the plugin in your local JOSM installation
    136     **********************************************************
    137     -->
    138     <target name="install" depends="dist">
    139         <property environment="env"/>
    140         <condition property="josm.plugins.dir" value="${env.APPDATA}/JOSM/plugins" else="${user.home}/.josm/plugins">
    141             <and>
    142                 <os family="windows"/>
    143             </and>
    144         </condition>
    145         <copy file="${plugin.jar}" todir="${josm.plugins.dir}"/>
    146     </target>
    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     <target name="core-info">
    155         <exec append="false" output="core.info.xml" executable="svn" failifexecutionfails="false">
    156             <env key="LANG" value="C"/>
    157             <arg value="info"/>
    158             <arg value="--xml"/>
    159             <arg value="../../core"/>
    160         </exec>
    161         <xmlproperty file="core.info.xml" prefix="coreversion" keepRoot="true" collapseAttributes="true"/>
    162         <echo>Building against core revision ${coreversion.info.entry.revision}.</echo>
    163         <echo>Plugin-Mainversion is set to ${plugin.main.version}.</echo>
    164         <delete file="core.info.xml"/>
    165     </target>
    166     <!-- commits the source tree for this plugin -->
    167     <target name="commit-current">
    168         <echo>Commiting the plugin source with message '${commit.message}' ...</echo>
    169         <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
    170             <env key="LANG" value="C"/>
    171             <arg value="commit"/>
    172             <arg value="-m '${commit.message}'"/>
    173             <arg value="."/>
    174         </exec>
    175     </target>
    176     <!-- updates (svn up) the source tree for this plugin -->
    177     <target name="update-current">
    178         <echo>Updating plugin source ...</echo>
    179         <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
    180             <env key="LANG" value="C"/>
    181             <arg value="up"/>
    182             <arg value="."/>
    183         </exec>
    184         <echo>Updating ${plugin.jar} ...</echo>
    185         <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
    186             <env key="LANG" value="C"/>
    187             <arg value="up"/>
    188             <arg value="../dist/${plugin.jar}"/>
    189         </exec>
    190     </target>
    191     <!-- commits the plugin.jar -->
    192     <target name="commit-dist">
    193         <echo>
    194     ***** Properties of published ${plugin.jar} *****
    195     Commit message    : '${commit.message}'                   
    196     Plugin-Mainversion: ${plugin.main.version}
    197     JOSM build version: ${coreversion.info.entry.revision}
    198     Plugin-Version    : ${version.entry.commit.revision}
    199     ***** / Properties of published ${plugin.jar} *****                   
    200                        
    201     Now commiting ${plugin.jar} ...
    202     </echo>
    203         <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
    204             <env key="LANG" value="C"/>
    205             <arg value="-m '${commit.message}'"/>
    206             <arg value="commit"/>
    207             <arg value="${plugin.jar}"/>
    208         </exec>
    209     </target>
    210     <!-- make sure svn is present as a command line tool -->
    211     <target name="ensure-svn-present">
    212         <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false" failonerror="false" resultproperty="svn.exit.code">
    213             <env key="LANG" value="C"/>
    214             <arg value="--version"/>
    215         </exec>
    216         <fail message="Fatal: command 'svn --version' failed. Please make sure svn is installed on your system.">
    217             <!-- return code not set at all? Most likely svn isn't installed -->
    218             <condition>
    219                 <not>
    220                     <isset property="svn.exit.code"/>
    221                 </not>
    222             </condition>
    223         </fail>
    224         <fail message="Fatal: command 'svn --version' failed. Please make sure a working copy of svn is installed on your system.">
    225             <!-- error code from SVN? Most likely svn is not what we are looking on this system -->
    226             <condition>
    227                 <isfailure code="${svn.exit.code}"/>
    228             </condition>
    229         </fail>
    230     </target>
    231     <target name="publish" depends="ensure-svn-present,core-info,commit-current,update-current,clean,dist,commit-dist">
    232     </target>
     38    <property name="plugin.author" value="Oliver Raupach"/>
     39    <property name="plugin.class" value="org.openstreetmap.josm.plugins.housenumbertool.HouseNumberTaggingToolPlugin"/>
     40    <property name="plugin.description" value="Simple tool to tag house numbers."/>
     41    <property name="plugin.icon" value="images/home-icon32.png"/>
     42    <property name="plugin.link" value="http://josm.openstreetmap.de/wiki/Help/Plugin/HouseNumberTaggingTool"/>
     43
     44    <!-- ** include targets that all plugins have in common ** -->
     45    <import file="../build-common.xml"/>
    23346</project>
  • applications/editors/josm/plugins/HouseNumberTaggingTool/src/org/openstreetmap/josm/plugins/housenumbertool/HouseNumberTaggingToolPlugin.java

    r27510 r29778  
    66import org.openstreetmap.josm.plugins.PluginInformation;
    77
    8 public class HouseNumberTaggingToolPlugin extends Plugin
    9 {
     8public class HouseNumberTaggingToolPlugin extends Plugin {
    109   LaunchAction action;
    1110
     
    1312    * constructor
    1413    */
    15    public HouseNumberTaggingToolPlugin(PluginInformation info)
    16    {
     14   public HouseNumberTaggingToolPlugin(PluginInformation info) {
    1715      super(info);
    1816      action = new LaunchAction(getPluginDir());
    19       MainMenu.add(Main.main.menu.editMenu, action);
     17      MainMenu.add(Main.main.menu.dataMenu, action, false,0);
    2018   }
    2119}
  • applications/editors/josm/plugins/HouseNumberTaggingTool/src/org/openstreetmap/josm/plugins/housenumbertool/LaunchAction.java

    r29475 r29778  
    4848   }
    4949
     50   @Override
    5051   public void actionPerformed(ActionEvent e)
    5152   {
     
    5354   }
    5455
     56   @Override
    5557   public void selectionChanged(Collection<? extends OsmPrimitive> newSelection)
    5658   {
  • applications/editors/josm/plugins/HouseNumberTaggingTool/src/org/openstreetmap/josm/plugins/housenumbertool/TagDialog.java

    r29487 r29778  
    102102      setLocationRelativeTo(null);
    103103
    104       SwingUtilities.invokeLater(new Runnable()
    105       {
    106          public void run()
    107          {
     104      SwingUtilities.invokeLater(new Runnable()  {
     105         @Override
     106         public void run() {
    108107            housnumber.requestFocus();
    109108            housnumber.selectAll();
     
    112111   }
    113112
    114    private JPanel createContentPane()
    115    {
     113   private JPanel createContentPane() {
    116114      acm = selection.getDataSet().getAutoCompletionManager();
    117115
     
    267265     
    268266      int number = 0;
    269       try
    270       {
     267      try {
    271268         number = Integer.valueOf(dto.getHousenumber()) + dto.getHousenumberChangeValue();
    272269      }
    273       catch (NumberFormatException e)
    274       {
    275       }
    276       if (number > 0)
    277       {
     270      catch (NumberFormatException e)  { }
     271      if (number > 0) {
    278272         housnumber.setText(String.valueOf(number));
    279273      }
     
    310304   protected void buttonAction(int buttonIndex, ActionEvent evt)
    311305   {
    312       if (buttonIndex == 0)
    313       {
     306      if (buttonIndex == 0)  {
    314307         Dto dto = new Dto();
    315308         dto.setSaveBuilding(buildingEnabled.isSelected());
     
    339332   {
    340333      Object item = box.getSelectedItem();
    341       if (item != null)
    342       {
    343          if (item instanceof String)
    344          {
     334      if (item != null) {
     335         if (item instanceof String) {
    345336            return (String) item;
    346337         }
    347          if (item instanceof AutoCompletionListItem)
    348          {
     338         if (item instanceof AutoCompletionListItem) {
    349339            return ((AutoCompletionListItem) item).getValue();
    350340         }
    351341         return item.toString();
    352       }
    353       else
    354       {
     342      } else {
    355343         return "";
    356344      }
     
    362350      File fileName = new File(pluginDir + TagDialog.TEMPLATE_DATA);
    363351
    364       try
    365       {
     352      try {
    366353         path.mkdirs();
    367354
     
    370357         o.writeObject(dto);
    371358         o.close();
    372       }
    373       catch (Exception ex)
    374       {
     359      } catch (Exception ex) {
    375360         logger.log(Level.SEVERE, ex.getMessage());
    376 
    377          if (fileName != null)
    378          {
    379             fileName.delete();
    380          }
     361         fileName.delete();
    381362      }
    382363   }
     
    386367      ArrayList<Command> commands = new ArrayList<Command>();
    387368
    388       if (dto.isSaveBuilding())
    389       {
     369      if (dto.isSaveBuilding()) {
    390370         String value = selection.get(TagDialog.TAG_BUILDING);
    391          if (value == null || (value != null && !value.equals(dto.getBuilding())))
    392          {
     371         if (value == null || (value != null && !value.equals(dto.getBuilding()))) {
    393372            ChangePropertyCommand command = new ChangePropertyCommand(selection, TagDialog.TAG_BUILDING, dto.getBuilding());
    394373            commands.add(command);
     
    396375      }
    397376
    398       if (dto.isSaveCity())
    399       {
     377      if (dto.isSaveCity()) {
    400378         String value = selection.get(TagDialog.TAG_ADDR_CITY);
    401          if (value == null || (value != null && !value.equals(dto.getCity())))
    402          {
     379         if (value == null || (value != null && !value.equals(dto.getCity()))) {
    403380            ChangePropertyCommand command = new ChangePropertyCommand(selection, TagDialog.TAG_ADDR_CITY, dto.getCity());
    404381            commands.add(command);
     
    406383      }
    407384
    408       if (dto.isSaveCountry())
    409       {
     385      if (dto.isSaveCountry())  {
    410386         String value = selection.get(TagDialog.TAG_ADDR_COUNTRY);
    411387         if (value == null || (value != null && !value.equals(dto.getCountry())))
     
    416392      }
    417393
    418       if (dto.isSaveHousenumber())
    419       {
     394      if (dto.isSaveHousenumber())  {
    420395         String value = selection.get(TagDialog.TAG_ADDR_HOUSENUMBER);
    421          if (value == null || (value != null && !value.equals(dto.getHousenumber())))
    422          {
     396         if (value == null || (value != null && !value.equals(dto.getHousenumber())))  {
    423397            ChangePropertyCommand command = new ChangePropertyCommand(selection, TagDialog.TAG_ADDR_HOUSENUMBER, dto.getHousenumber());
    424398            commands.add(command);
     
    426400      }
    427401
    428       if (dto.isSavePostcode())
    429       {
     402      if (dto.isSavePostcode()) {
    430403         String value = selection.get(TagDialog.TAG_ADDR_POSTCODE);
    431          if (value == null || (value != null && !value.equals(dto.getPostcode())))
    432          {
     404         if (value == null || (value != null && !value.equals(dto.getPostcode()))) {
    433405            ChangePropertyCommand command = new ChangePropertyCommand(selection, TagDialog.TAG_ADDR_POSTCODE, dto.getPostcode());
    434406            commands.add(command);
     
    436408      }
    437409
    438       if (dto.isSaveStreet())
    439       {
     410      if (dto.isSaveStreet()) {
    440411         String value = selection.get(TagDialog.TAG_ADDR_STREET);
    441412         if (value == null || (value != null && !value.equals(dto.getStreet())))
     
    446417      }
    447418
    448       if (dto.isSaveState())
    449       {
     419      if (dto.isSaveState()) {
    450420         String value = selection.get(TagDialog.TAG_ADDR_STATE);
    451          if (value == null || (value != null && !value.equals(dto.getState())))
    452          {
     421         if (value == null || (value != null && !value.equals(dto.getState())))  {
    453422            ChangePropertyCommand command = new ChangePropertyCommand(selection, TagDialog.TAG_ADDR_STATE, dto.getState());
    454423            commands.add(command);
     
    456425      }
    457426
    458       if (commands.size() > 0)
    459       {
     427      if (commands.size() > 0) {
    460428         SequenceCommand sequenceCommand = new SequenceCommand(trn("Updating properties of up to {0} object", "Updating properties of up to {0} objects", commands.size(), commands.size()), commands);
    461429
     
    465433   }
    466434
    467    private Collection<String> getPossibleStreets()
    468    {
     435   private Collection<String> getPossibleStreets() {
    469436      /**
    470437       * Generates a list of all visible names of highways in order to do autocompletion on the road name.
     
    481448   }
    482449
    483    private Dto loadDto()
    484    {
     450   private Dto loadDto() {
    485451      Dto dto = new Dto();
    486452      File fileName = new File(pluginDir + TagDialog.TEMPLATE_DATA);
    487453
    488       try
    489       {
    490 
    491          if (fileName.exists())
    492          {
     454      try {
     455
     456         if (fileName.exists()) {
    493457            FileInputStream file = new FileInputStream(fileName);
    494458            ObjectInputStream o = new ObjectInputStream(file);
     
    496460            dto = (Dto) o.readObject();
    497461            o.close();
    498          }
    499          else
    500          {
     462         } else {
    501463            dto.setCity(selection.get(TagDialog.TAG_ADDR_CITY));
    502464            dto.setCountry(selection.get(TagDialog.TAG_ADDR_COUNTRY));
     
    506468            dto.setState(selection.get(TagDialog.TAG_ADDR_STATE));
    507469         }
    508 
    509       }
    510       catch (Exception ex)
    511       {
    512          logger.log(Level.SEVERE, ex.getMessage());
    513          if (fileName != null)
    514          {
     470      } catch (Exception ex) {
     471            logger.log(Level.SEVERE, ex.getMessage());
    515472            fileName.delete();
    516          }
    517       }
    518 
     473      }
    519474      return dto;
    520475
  • applications/editors/josm/plugins/OpeningHoursEditor/nbproject

    • Property svn:ignore set to
      private
  • applications/editors/josm/plugins/OpeningHoursEditor/src/org/openstreetmap/josm/plugins/ohe/OhePlugin.java

    r29771 r29778  
    7373    public OhePlugin(PluginInformation info) {
    7474        super(info);
    75         MainMenu.add(Main.main.menu.dataMenu, new OheMenuAction());
     75        MainMenu.add(Main.main.menu.dataMenu, new OheMenuAction(), false, 0);
    7676    }
    7777
  • applications/editors/josm/plugins/addrinterpolation/build.xml

    r29435 r29778  
    2222-->
    2323<project name="AddrInterpolation" default="dist" basedir=".">
     24    <!-- enter the SVN commit message -->
    2425    <property name="commit.message" value="Impoved Icon"/>
    25     <property name="plugin.main.version" value="5053"/>
    26     <!--
    27       ************************************************
    28       ** should not be necessary to change the following properties
    29      -->
    30     <property name="josm" location="../../core/dist/josm-custom.jar"/>
    31     <property name="plugin.build.dir" value="build"/>
    32     <property name="plugin.src.dir" value="src"/>
    33     <!-- this is the directory where the plugin jar is copied to -->
    34     <property name="plugin.dist.dir" value="../../dist"/>
    35     <property name="ant.build.javac.target" value="1.5"/>
    36     <property name="plugin.dist.dir" value="../../dist"/>
    37     <property name="plugin.jar" value="${plugin.dist.dir}/${ant.project.name}.jar"/>
    38     <!--
    39     **********************************************************
    40     ** init - initializes the build
    41     **********************************************************
     26    <!-- enter the *lowest* JOSM version this plugin is currently compatible with -->
     27    <property name="plugin.main.version" value="6082"/>
     28   
     29    <!-- Configure these properties (replace "..." accordingly).
     30         See http://josm.openstreetmap.de/wiki/DevelopersGuide/DevelopingPlugins
    4231    -->
    43     <target name="init">
    44         <mkdir dir="${plugin.build.dir}"/>
    45     </target>
    46     <!--
    47     **********************************************************
    48     ** compile - complies the source tree
    49     **********************************************************
    50     -->
    51     <target name="compile" depends="init">
    52         <echo message="compiling sources for  ${plugin.jar} ... "/>
    53         <javac srcdir="src" classpath="${josm}" debug="true" destdir="${plugin.build.dir}">
    54             <compilerarg value="-Xlint:deprecation"/>
    55             <compilerarg value="-Xlint:unchecked"/>
    56         </javac>
    57     </target>
    58     <!--
    59     **********************************************************
    60     ** dist - creates the plugin jar
    61     **********************************************************
    62     -->
    63     <target name="dist" depends="compile,revision">
    64         <echo message="creating ${plugin.jar} ... "/>
    65         <copy todir="${plugin.build.dir}/resources">
    66             <fileset dir="resources"/>
    67         </copy>
    68         <copy todir="${plugin.build.dir}/images">
    69             <fileset dir="images"/>
    70         </copy>
    71         <copy todir="${plugin.build.dir}/data">
    72             <fileset dir="data"/>
    73         </copy>
    74         <copy todir="${plugin.build.dir}">
    75             <fileset dir=".">
    76                 <include name="README"/>
    77                 <include name="LICENSE"/>
    78             </fileset>
    79         </copy>
    80         <jar destfile="${plugin.jar}" basedir="${plugin.build.dir}">
    81             <!--
    82         ************************************************
    83         ** configure these properties. Most of them will be copied to the plugins
    84         ** manifest file. Property values will also show up in the list available
    85         ** plugins: http://josm.openstreetmap.de/wiki/Plugins.
    86         **
    87         ************************************************
    88     -->
    89             <manifest>
    90                 <attribute name="Author" value="Mike Nice"/>
    91                 <attribute name="Plugin-Class" value="org.openstreetmap.josm.plugins.AddrInterpolation.AddrInterpolationPlugin"/>
    92                 <attribute name="Plugin-Date" value="${version.entry.commit.date}"/>
    93                 <attribute name="Plugin-Description" value="Group common Address Interpolation inputs in a single dialog, as well as an option to automatically generate individual house number nodes from a Way."/>
    94                 <attribute name="Plugin-Icon" value="images/AddrInterpolation.png"/>
    95                 <attribute name="Plugin-Link" value="http://wiki.openstreetmap.org/wiki/JOSM/Plugins/AddrInterpolation"/>
    96                 <attribute name="Plugin-Mainversion" value="${plugin.main.version}"/>
    97                 <attribute name="Plugin-Version" value="${version.entry.commit.revision}"/>
    98             </manifest>
    99         </jar>
    100     </target>
    101     <!--
    102     **********************************************************
    103     ** revision - extracts the current revision number for the
    104     **    file build.number and stores it in the XML property
    105     **    version.*
    106     **********************************************************
    107     -->
    108     <target name="revision">
    109         <exec append="false" output="REVISION" executable="svn" failifexecutionfails="false">
    110             <env key="LANG" value="C"/>
    111             <arg value="info"/>
    112             <arg value="--xml"/>
    113             <arg value="."/>
    114         </exec>
    115         <xmlproperty file="REVISION" prefix="version" keepRoot="false" collapseAttributes="true"/>
    116         <delete file="REVISION"/>
    117     </target>
    118     <!--
    119     **********************************************************
    120     ** clean - clean up the build environment
    121     **********************************************************
    122     -->
    123     <target name="clean">
    124         <delete dir="${plugin.build.dir}"/>
    125         <delete file="${plugin.jar}"/>
    126     </target>
    127     <!--
    128     **********************************************************
    129     ** install - install the plugin in your local JOSM installation
    130     **********************************************************
    131     -->
    132     <target name="install" depends="dist">
    133         <property environment="env"/>
    134         <condition property="josm.plugins.dir" value="${env.APPDATA}/JOSM/plugins" else="${user.home}/.josm/plugins">
    135             <and>
    136                 <os family="windows"/>
    137             </and>
    138         </condition>
    139         <copy file="${plugin.jar}" todir="${josm.plugins.dir}"/>
    140     </target>
    141     <!--
    142      ************************** Publishing the plugin ***********************************
    143     -->
    144     <!--
    145     ** extracts the JOSM release for the JOSM version in ../core and saves it in the
    146     ** property ${coreversion.info.entry.revision}
    147     **
    148     -->
    149     <target name="core-info">
    150         <exec append="false" output="core.info.xml" executable="svn" failifexecutionfails="false">
    151             <env key="LANG" value="C"/>
    152             <arg value="info"/>
    153             <arg value="--xml"/>
    154             <arg value="../../core"/>
    155         </exec>
    156         <xmlproperty file="core.info.xml" prefix="coreversion" keepRoot="true" collapseAttributes="true"/>
    157         <echo>Building against core revision ${coreversion.info.entry.revision}.</echo>
    158         <echo>Plugin-Mainversion is set to ${plugin.main.version}.</echo>
    159         <delete file="core.info.xml"/>
    160     </target>
    161     <!--
    162     ** commits the source tree for this plugin
    163     -->
    164     <target name="commit-current">
    165         <echo>Commiting the plugin source with message '${commit.message}' ...</echo>
    166         <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
    167             <env key="LANG" value="C"/>
    168             <arg value="commit"/>
    169             <arg value="-m '${commit.message}'"/>
    170             <arg value="."/>
    171         </exec>
    172     </target>
    173     <!--
    174     ** updates (svn up) the source tree for this plugin
    175     -->
    176     <target name="update-current">
    177         <echo>Updating plugin source ...</echo>
    178         <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
    179             <env key="LANG" value="C"/>
    180             <arg value="up"/>
    181             <arg value="."/>
    182         </exec>
    183         <echo>Updating ${plugin.jar} ...</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="../dist/${plugin.jar}"/>
    188         </exec>
    189     </target>
    190     <!--
    191     ** commits the plugin.jar
    192     -->
    193     <target name="commit-dist">
    194         <echo>
    195 ***** Properties of published ${plugin.jar} *****
    196 Commit message    : '${commit.message}'                 
    197 Plugin-Mainversion: ${plugin.main.version}
    198 JOSM build version: ${coreversion.info.entry.revision}
    199 Plugin-Version    : ${version.entry.commit.revision}
    200 ***** / Properties of published ${plugin.jar} *****                 
    201                    
    202 Now commiting ${plugin.jar} ...
    203 </echo>
    204         <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
    205             <env key="LANG" value="C"/>
    206             <arg value="-m '${commit.message}'"/>
    207             <arg value="commit"/>
    208             <arg value="${plugin.jar}"/>
    209         </exec>
    210     </target>
    211     <!-- ** make sure svn is present as a command line tool ** -->
    212     <target name="ensure-svn-present">
    213         <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false" failonerror="false" resultproperty="svn.exit.code">
    214             <env key="LANG" value="C"/>
    215             <arg value="--version"/>
    216         </exec>
    217         <fail message="Fatal: command 'svn --version' failed. Please make sure svn is installed on your system.">
    218             <!-- return code not set at all? Most likely svn isn't installed -->
    219             <condition>
    220                 <not>
    221                     <isset property="svn.exit.code"/>
    222                 </not>
    223             </condition>
    224         </fail>
    225         <fail message="Fatal: command 'svn --version' failed. Please make sure a working copy of svn is installed on your system.">
    226             <!-- error code from SVN? Most likely svn is not what we are looking on this system -->
    227             <condition>
    228                 <isfailure code="${svn.exit.code}"/>
    229             </condition>
    230         </fail>
    231     </target>
    232     <target name="publish" depends="ensure-svn-present,core-info,commit-current,update-current,clean,dist,commit-dist">
    233     </target>
     32    <property name="plugin.author" value="Mike Nice"/>
     33    <property name="plugin.class" value="org.openstreetmap.josm.plugins.AddrInterpolation.AddrInterpolationPlugin"/>
     34    <property name="plugin.description" value="Group common Address Interpolation inputs in a single dialog, as well as an option to automatically generate individual house number nodes from a Way."/>
     35    <property name="plugin.icon" value="images/AddrInterpolation.png"/>
     36    <property name="plugin.link" value="http://wiki.openstreetmap.org/wiki/JOSM/Plugins/AddrInterpolation"/>
     37
     38    <!-- ** include targets that all plugins have in common ** -->
     39    <import file="../build-common.xml"/>
    23440</project>
  • applications/editors/josm/plugins/addrinterpolation/src/org/openstreetmap/josm/plugins/AddrInterpolation/AddrInterpolationPlugin.java

    r23191 r29778  
    44
    55import org.openstreetmap.josm.Main;
     6import org.openstreetmap.josm.gui.MainMenu;
    67import org.openstreetmap.josm.plugins.Plugin;
    78import org.openstreetmap.josm.plugins.PluginInformation;
     
    1718        super(info);
    1819        action = new AddrInterpolationAction();
    19         Main.main.menu.toolsMenu.add(action);
     20        MainMenu.add(Main.main.menu.dataMenu, action, false, 0);
    2021    }
    2122}
  • applications/editors/josm/plugins/buildings_tools/nbproject

    • Property svn:ignore set to
      private
  • applications/editors/josm/plugins/czechaddress/build.xml

    r29661 r29778  
    3333            <attribute name="Plugin-Link" value="http://wiki.openstreetmap.org/wiki/CS:JOSM/Plugins/CzechAddress"/>
    3434            <attribute name="Plugin-Icon" value="images/preferences/czech_flag.png"/>
    35             <attribute name="Plugin-Mainversion" value="6010"/>
     35            <attribute name="Plugin-Mainversion" value="6082"/>
    3636            <attribute name="Plugin-Version" value="${version.entry.commit.revision}"/>
    3737        </manifest>
  • applications/editors/josm/plugins/czechaddress/src/org/openstreetmap/josm/plugins/czechaddress/CzechAddressPlugin.java

    r29765 r29778  
    9999        if (assertionsEnabled) initLoggers();
    100100
    101         MainMenu.add(Main.main.menu.toolsMenu, new SplitAreaByEmptyWayAction());
     101        MainMenu.add(Main.main.menu.moreToolsMenu, new SplitAreaByEmptyWayAction());
    102102
    103103        // Prepare for filling the database.
  • applications/editors/josm/plugins/czechaddress/src/org/openstreetmap/josm/plugins/czechaddress/actions/SplitAreaByEmptyWayAction.java

    r29727 r29778  
    6464                if (prim2.equals(area))      continue;
    6565                Way border = (Way) prim2;
    66                 if (border.getNodes().size() == 0)   continue;
     66                if (border.getNodes().isEmpty())   continue;
    6767                if (border.keySet().size() > 0) continue;
    6868                if (!area.getNodes().contains(border.firstNode())) continue;
  • applications/editors/josm/plugins/download_along/build.xml

    r29746 r29778  
    44    <property name="commit.message" value="Changed the constructor signature of the plugin main class"/>
    55    <!-- enter the *lowest* JOSM version this plugin is currently compatible with -->
    6     <property name="plugin.main.version" value="6054"/>
     6    <property name="plugin.main.version" value="6082"/>
    77
    88        <!-- Configure these properties (replace "..." accordingly).
  • applications/editors/josm/plugins/download_along/src/org/openstreetmap/josm/plugin/download_along/DownloadAlong.java

    r29746 r29778  
    1010        public DownloadAlong(PluginInformation info) {
    1111                super(info);
    12                 MainMenu.add(Main.main.menu.toolsMenu, new DownloadAlongWayAction());
     12                MainMenu.add(Main.main.menu.moreToolsMenu, new DownloadAlongWayAction());
    1313        }
    1414}
  • applications/editors/josm/plugins/download_along/src/org/openstreetmap/josm/plugin/download_along/DownloadAlongWayAction.java

    r29746 r29778  
    3939        }
    4040
     41        @Override
    4142        public void actionPerformed(ActionEvent e) {
    4243        Set<Way> selectedWays = OsmPrimitive.getFilteredSet(Main.main.getCurrentDataSet().getSelected(), Way.class);
  • applications/editors/josm/plugins/gpxfilter/build.xml

    r29435 r29778  
    3232    <property name="commit.message" value="GPXFilter: moved to Alt-Shift-X"/>
    3333    <!-- enter the *lowest* JOSM version this plugin is currently compatible with -->
    34     <property name="plugin.main.version" value="5679"/>
    35     <!--
    36       ************************************************
    37       ** should not be necessary to change the following properties
    38      -->
    39     <property name="josm" location="../../core/dist/josm-custom.jar"/>
    40     <property name="plugin.build.dir" value="build"/>
    41     <property name="plugin.src.dir" value="src"/>
    42     <!-- this is the directory where the plugin jar is copied to -->
    43     <property name="plugin.dist.dir" value="../../dist"/>
    44     <property name="ant.build.javac.target" value="1.5"/>
    45     <property name="plugin.dist.dir" value="../../dist"/>
    46     <property name="plugin.jar" value="${plugin.dist.dir}/${ant.project.name}.jar"/>
    47     <!--
    48     **********************************************************
    49     ** init - initializes the build
    50     **********************************************************
    51     -->
    52     <target name="init">
    53         <mkdir dir="${plugin.build.dir}"/>
    54     </target>
    55     <!--
    56     **********************************************************
    57     ** compile - complies the source tree
    58     **********************************************************
    59     -->
    60     <target name="compile" depends="init">
    61         <echo message="compiling sources for  ${plugin.jar} ... "/>
    62         <javac srcdir="src" classpath="${josm}" debug="true" destdir="${plugin.build.dir}">
    63             <compilerarg value="-Xlint:deprecation"/>
    64             <compilerarg value="-Xlint:unchecked"/>
    65         </javac>
    66     </target>
    67     <!--
    68     **********************************************************
    69     ** dist - creates the plugin jar
    70     **********************************************************
    71     -->
    72     <target name="dist" depends="compile,revision">
    73         <echo message="creating ${ant.project.name}.jar ... "/>
    74         <copy todir="${plugin.build.dir}/resources">
    75             <fileset dir="resources"/>
    76         </copy>
    77         <copy todir="${plugin.build.dir}/images">
    78             <fileset dir="images"/>
    79         </copy>
    80         <copy todir="${plugin.build.dir}/data">
    81             <fileset dir="data"/>
    82         </copy>
    83         <copy todir="${plugin.build.dir}">
    84             <fileset dir=".">
    85                 <include name="README"/>
    86                 <include name="LICENSE"/>
    87             </fileset>
    88         </copy>
    89         <jar destfile="${plugin.jar}" basedir="${plugin.build.dir}">
    90             <!--
    91         ************************************************
    92         ** configure these properties. Most of them will be copied to the plugins
    93         ** manifest file. Property values will also show up in the list available
    94         ** plugins: http://josm.openstreetmap.de/wiki/Plugins.
    95         **
    96         ************************************************
    97     -->
    98             <manifest>
    99                 <attribute name="Author" value="Upliner"/>
    100                 <attribute name="Plugin-Class" value="gpxfilter.GpxFilterPlugin"/>
    101                 <attribute name="Plugin-Date" value="${version.entry.commit.date}"/>
    102                 <attribute name="Plugin-Description" value="Allows to filter out unnecessary GPS tracks"/>
    103                 <attribute name="Plugin-Link" value="http://wiki.openstreetmap.org/wiki/JOSM/Plugins/GPXFilter"/>
    104                 <attribute name="Plugin-Mainversion" value="${plugin.main.version}"/>
    105                 <attribute name="Plugin-Version" value="${version.entry.commit.revision}"/>
    106             </manifest>
    107         </jar>
    108     </target>
    109     <!--
    110     **********************************************************
    111     ** revision - extracts the current revision number for the
    112     **    file build.number and stores it in the XML property
    113     **    version.*
    114     **********************************************************
    115     -->
    116     <target name="revision">
    117         <exec append="false" output="REVISION" executable="svn" failifexecutionfails="false">
    118             <env key="LANG" value="C"/>
    119             <arg value="info"/>
    120             <arg value="--xml"/>
    121             <arg value="."/>
    122         </exec>
    123         <xmlproperty file="REVISION" prefix="version" keepRoot="false" collapseAttributes="true"/>
    124         <delete file="REVISION"/>
    125     </target>
    126     <!--
    127     **********************************************************
    128     ** clean - clean up the build environment
    129     **********************************************************
    130     -->
    131     <target name="clean">
    132         <delete dir="${plugin.build.dir}"/>
    133         <delete file="${plugin.jar}"/>
    134     </target>
    135     <!--
    136     **********************************************************
    137     ** install - install the plugin in your local JOSM installation
    138     **********************************************************
    139     -->
    140     <target name="install" depends="dist">
    141         <property environment="env"/>
    142         <condition property="josm.plugins.dir" value="${env.APPDATA}/JOSM/plugins" else="${user.home}/.josm/plugins">
    143             <and>
    144                 <os family="windows"/>
    145             </and>
    146         </condition>
    147         <copy file="${plugin.jar}" todir="${josm.plugins.dir}"/>
    148     </target>
    149     <!--
    150     ************************** Publishing the plugin ***********************************
    151     -->
    152     <!--
    153         ** extracts the JOSM release for the JOSM version in ../core and saves it in the
    154         ** property ${coreversion.info.entry.revision}
    155         **
    156         -->
    157     <target name="core-info">
    158         <exec append="false" output="core.info.xml" executable="svn" failifexecutionfails="false">
    159             <env key="LANG" value="C"/>
    160             <arg value="info"/>
    161             <arg value="--xml"/>
    162             <arg value="../../core"/>
    163         </exec>
    164         <xmlproperty file="core.info.xml" prefix="coreversion" keepRoot="true" collapseAttributes="true"/>
    165         <echo>Building against core revision ${coreversion.info.entry.revision}.</echo>
    166         <echo>Plugin-Mainversion is set to ${plugin.main.version}.</echo>
    167         <delete file="core.info.xml"/>
    168     </target>
    169     <!--
    170         ** commits the source tree for this plugin
    171         -->
    172     <target name="commit-current">
    173         <echo>Commiting the plugin source with message '${commit.message}' ...</echo>
    174         <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
    175             <env key="LANG" value="C"/>
    176             <arg value="commit"/>
    177             <arg value="-m '${commit.message}'"/>
    178             <arg value="."/>
    179         </exec>
    180     </target>
    181     <!--
    182         ** updates (svn up) the source tree for this plugin
    183         -->
    184     <target name="update-current">
    185         <echo>Updating plugin source ...</echo>
    186         <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
    187             <env key="LANG" value="C"/>
    188             <arg value="up"/>
    189             <arg value="."/>
    190         </exec>
    191         <echo>Updating ${plugin.jar} ...</echo>
    192         <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
    193             <env key="LANG" value="C"/>
    194             <arg value="up"/>
    195             <arg value="../dist/${plugin.jar}"/>
    196         </exec>
    197     </target>
    198     <!--
    199         ** commits the plugin.jar
    200         -->
    201     <target name="commit-dist">
    202         <echo>
    203     ***** Properties of published ${plugin.jar} *****
    204     Commit message    : '${commit.message}'
    205     Plugin-Mainversion: ${plugin.main.version}
    206     JOSM build version: ${coreversion.info.entry.revision}
    207     Plugin-Version    : ${version.entry.commit.revision}
    208     ***** / Properties of published ${plugin.jar} *****
     34    <property name="plugin.main.version" value="6082"/>
    20935
    210     Now commiting ${plugin.jar} ...
    211     </echo>
    212         <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
    213             <env key="LANG" value="C"/>
    214             <arg value="-m '${commit.message}'"/>
    215             <arg value="commit"/>
    216             <arg value="${plugin.jar}"/>
    217         </exec>
    218     </target>
    219     <!-- ** make sure svn is present as a command line tool ** -->
    220     <target name="ensure-svn-present">
    221         <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false" failonerror="false" resultproperty="svn.exit.code">
    222             <env key="LANG" value="C"/>
    223             <arg value="--version"/>
    224         </exec>
    225         <fail message="Fatal: command 'svn --version' failed. Please make sure svn is installed on your system.">
    226             <!-- return code not set at all? Most likely svn isn't installed -->
    227             <condition>
    228                 <not>
    229                     <isset property="svn.exit.code"/>
    230                 </not>
    231             </condition>
    232         </fail>
    233         <fail message="Fatal: command 'svn --version' failed. Please make sure a working copy of svn is installed on your system.">
    234             <!-- error code from SVN? Most likely svn is not what we are looking on this system -->
    235             <condition>
    236                 <isfailure code="${svn.exit.code}"/>
    237             </condition>
    238         </fail>
    239     </target>
    240     <target name="publish" depends="ensure-svn-present,core-info,commit-current,update-current,clean,dist,commit-dist">
    241     </target>
     36    <property name="plugin.author" value="Upliner"/>
     37    <property name="plugin.class" value="gpxfilter.GpxFilterPlugin"/>
     38    <property name="plugin.description" value="Allows to filter out unnecessary GPS tracks"/>
     39<!--    <property name="plugin.icon" value="images/preferences/walkingpapers.png"/>-->
     40    <property name="plugin.link" value="http://wiki.openstreetmap.org/wiki/JOSM/Plugins/GPXFilter"/>
     41
     42    <!-- ** include targets that all plugins have in common ** -->
     43    <import file="../build-common.xml"/>
    24244</project>
  • applications/editors/josm/plugins/gpxfilter/src/gpxfilter/GpxFilterPlugin.java

    r27760 r29778  
    1010    public GpxFilterPlugin(PluginInformation info) {
    1111        super(info);
    12         MainMenu.add(Main.main.menu.toolsMenu, new AddEGpxLayerAction());
     12        MainMenu.add(Main.main.menu.gpsMenu, new AddEGpxLayerAction(), false, 0);
    1313    }
    1414
  • applications/editors/josm/plugins/livegps/src/livegps/LiveGpsPlugin.java

    r29771 r29778  
    125125        lgpsmenu.add(lgpscapture);
    126126        lgpscapture.setAccelerator(captureAction.getShortcut().getKeyStroke());
    127 
     127       
    128128        JosmAction centerAction = new CenterAction();
    129         JMenuItem centerMenu = new JMenuItem(centerAction);
    130         lgpsmenu.add(centerMenu);
    131         centerMenu.setAccelerator(centerAction.getShortcut().getKeyStroke());
    132 
     129        MainMenu.add(lgpsmenu, centerAction);
     130       
    133131        JosmAction autoCenterAction = new AutoCenterAction();
    134132        lgpsautocenter = new JCheckBoxMenuItem(autoCenterAction);
  • applications/editors/josm/plugins/merge-overlap/build.xml

    r29645 r29778  
    44    <property name="commit.message" value="MergeOverlap: help shortcut parser, rebuild"/>
    55    <!-- enter the *lowest* JOSM version this plugin is currently compatible with -->
    6     <property name="plugin.main.version" value="4980"/>
     6    <property name="plugin.main.version" value="6082"/>
    77   
    88    <!-- Configure these properties (replace "..." accordingly).
  • applications/editors/josm/plugins/merge-overlap/src/mergeoverlap/MergeOverlapAction.java

    r27852 r29778  
    7070         *            Action Event
    7171         */
     72        @Override
    7273        public void actionPerformed(ActionEvent e) {
    7374
     
    261262                }
    262263
     264                @Override
    263265                public String toString() {
    264266                        return "NodePos: " + pos + ", " + opositPos + ", " + node;
  • applications/editors/josm/plugins/merge-overlap/src/mergeoverlap/MergeOverlapPlugin.java

    r26705 r29778  
    33import static org.openstreetmap.josm.tools.I18n.tr;
    44
    5 import javax.swing.JMenu;
    6 import javax.swing.JMenuItem;
    7 
    85import org.openstreetmap.josm.Main;
     6import org.openstreetmap.josm.gui.MainMenu;
    97import org.openstreetmap.josm.plugins.Plugin;
    108import org.openstreetmap.josm.plugins.PluginInformation;
     
    1715    protected String name;
    1816
    19         public MergeOverlapPlugin(PluginInformation info) {
     17    public MergeOverlapPlugin(PluginInformation info) {
    2018        super(info);
    21         name = tr("Merge overlap", null);
    22         JMenu toolsMenu = null;
    23         for (int i = 0; i < Main.main.menu.getMenuCount() && toolsMenu == null; i++) {
    24             JMenu menu = Main.main.menu.getMenu(i);
    25             String name = menu.getText();
    26             if (name != null && name.equals(tr("Tools", null))) {
    27                 toolsMenu = menu;
    28             }
    29         }
    30 
    31         if (toolsMenu == null) {
    32             toolsMenu = new JMenu(name);
    33             toolsMenu.add(new JMenuItem(new MergeOverlapAction()));
    34             Main.main.menu.add(toolsMenu, 2);
    35         } else {
    36             toolsMenu.addSeparator();
    37             toolsMenu.add(new JMenuItem(new MergeOverlapAction()));
    38         }
     19        name = tr("Merge overlap");
     20        MainMenu.add(Main.main.menu.moreToolsMenu, new MergeOverlapAction());
    3921    }
    4022}
  • applications/editors/josm/plugins/merge-overlap/src/mergeoverlap/MyCombinePrimitiveResolverDialog.java

    r29644 r29778  
    324324        JPanel pnl = new JPanel();
    325325        pnl.setLayout(new BorderLayout());
    326         pnl.add(new JLabel(tr("No conflicts to resolve", null)));
     326        pnl.add(new JLabel(tr("No conflicts to resolve")));
    327327        return pnl;
    328328    }
     
    386386
    387387        public CancelAction() {
    388             putValue(Action.SHORT_DESCRIPTION, tr("Cancel conflict resolution", null));
    389             putValue(Action.NAME, tr("Cancel", null));
     388            putValue(Action.SHORT_DESCRIPTION, tr("Cancel conflict resolution"));
     389            putValue(Action.NAME, tr("Cancel"));
    390390            putValue(Action.SMALL_ICON, ImageProvider.get("", "cancel"));
    391391            setEnabled(true);
    392392        }
    393393
     394        @Override
    394395        public void actionPerformed(ActionEvent arg0) {
    395396            setCancelled(true);
     
    401402
    402403        public ApplyAction() {
    403             putValue(Action.SHORT_DESCRIPTION, tr("Apply resolved conflicts", null));
    404             putValue(Action.NAME, tr("Apply", null));
     404            putValue(Action.SHORT_DESCRIPTION, tr("Apply resolved conflicts"));
     405            putValue(Action.NAME, tr("Apply"));
    405406            putValue(Action.SMALL_ICON, ImageProvider.get("ok"));
    406407            updateEnabledState();
    407408        }
    408409
     410        @Override
    409411        public void actionPerformed(ActionEvent arg0) {
    410412            setVisible(false);
     
    417419        }
    418420
     421        @Override
    419422        public void propertyChange(PropertyChangeEvent evt) {
    420423            if (evt.getPropertyName().equals(MyTagConflictResolverModel.NUM_CONFLICTS_PROP)) {
     
    447450        }
    448451
     452        @Override
    449453        public void ancestorResized(HierarchyEvent e) {
    450454            setDividerLocation((int) (dividerLocation * getHeight()));
    451455        }
    452456
     457        @Override
    453458        public void ancestorMoved(HierarchyEvent e) {
    454459            // do nothing
    455460        }
    456461
     462        @Override
    457463        public void propertyChange(PropertyChangeEvent evt) {
    458464            if (evt.getPropertyName().equals(JSplitPane.DIVIDER_LOCATION_PROPERTY)) {
     
    800806            JPanel pnl = new JPanel();
    801807            pnl.setLayout(new FlowLayout(FlowLayout.LEFT));
    802             pnl.add(new JLabel(tr("Role:", null)));
     808            pnl.add(new JLabel(tr("Role:")));
    803809            pnl.add(tfRole = new AutoCompletingTextField(10));
    804             tfRole.setToolTipText(tr("Enter a role for all relation memberships", null));
     810            tfRole.setToolTipText(tr("Enter a role for all relation memberships"));
    805811            pnl.add(new JButton(new ApplyRoleAction()));
    806812            tfRole.addActionListener(new ApplyRoleAction());
     
    819825            JPanel pnl = new JPanel();
    820826            pnl.setLayout(new FlowLayout(FlowLayout.LEFT));
    821             cbTagRelations = new JCheckBox(tr("Tag modified relations with ", null));
     827            cbTagRelations = new JCheckBox(tr("Tag modified relations with "));
    822828            cbTagRelations.addChangeListener(new ToggleTagRelationsAction());
    823829            cbTagRelations.setToolTipText(
    824830                    tr("<html>Select to enable entering a tag which will be applied<br>"
    825                             + "to all modified relations.</html>", null));
     831                            + "to all modified relations.</html>"));
    826832            pnl.add(cbTagRelations);
    827833            pnl.add(new JLabel(trc("tag", "Key:")));
    828834            pnl.add(tfKey = new AutoCompletingTextField(10));
    829             tfKey.setToolTipText(tr("<html>Enter a tag key, i.e. <strong><tt>fixme</tt></strong></html>", null));
    830             pnl.add(new JLabel(tr("Value:", null)));
     835            tfKey.setToolTipText(tr("<html>Enter a tag key, i.e. <strong><tt>fixme</tt></strong></html>"));
     836            pnl.add(new JLabel(tr("Value:")));
    831837            pnl.add(tfValue = new AutoCompletingTextField(10));
    832             tfValue.setToolTipText(tr("<html>Enter a tag value, i.e. <strong><tt>check members</tt></strong></html>", null));
     838            tfValue.setToolTipText(tr("<html>Enter a tag value, i.e. <strong><tt>check members</tt></strong></html>"));
    833839            cbTagRelations.setSelected(false);
    834840            tfKey.setEnabled(false);
     
    848854                    + "the other ways that are members of the same relation: the combined way will "
    849855                    + "take the place of the original way in the relation."
    850                     + "</html>", null));
     856                    + "</html>"));
    851857            invalidate();
    852858        }
     
    859865                    + "the other nodes that are members of the same relation: the target node will "
    860866                    + "take the place of the original node in the relation."
    861                     + "</html>", null));
     867                    + "</html>"));
    862868            invalidate();
    863869        }
     
    865871        class ApplyRoleAction extends AbstractAction {
    866872            public ApplyRoleAction() {
    867                 putValue(NAME, tr("Apply", null));
     873                putValue(NAME, tr("Apply"));
    868874                putValue(SMALL_ICON, ImageProvider.get("ok"));
    869                 putValue(SHORT_DESCRIPTION, tr("Apply this role to all members", null));
    870             }
    871 
     875                putValue(SHORT_DESCRIPTION, tr("Apply this role to all members"));
     876            }
     877
     878            @Override
    872879            public void actionPerformed(ActionEvent e) {
    873880                model.applyRole(tfRole.getText());
     
    876883
    877884        class ToggleTagRelationsAction implements ChangeListener {
     885            @Override
    878886            public void stateChanged(ChangeEvent e) {
    879887                ButtonModel buttonModel = ((AbstractButton) e.getSource()).getModel();
     
    957965         */
    958966        class SelectNextColumnCellAction extends AbstractAction {
     967            @Override
    959968            public void actionPerformed(ActionEvent e) {
    960969                run();
     
    987996        class SelectPreviousColumnCellAction extends AbstractAction {
    988997
     998            @Override
    989999            public void actionPerformed(ActionEvent e) {
    9901000                run();
     
    10101020        }
    10111021
     1022        @Override
    10121023        public void gotoNextDecision() {
    10131024            selectNextColumnCellAction.run();
    10141025        }
    10151026
     1027        @Override
    10161028        public void gotoPreviousDecision() {
    10171029            selectPreviousColumnCellAction.run();
     
    10671079                    displayedKeys,
    10681080                    new Comparator<String>() {
     1081                        @Override
    10691082                        public int compare(String key1, String key2) {
    10701083                            if (decisions.get(key1).isDecided() && ! decisions.get(key2).isDecided())
     
    12701283            gc.weightx = 1.0;
    12711284            gc.anchor = GridBagConstraints.LINE_START;
    1272             pnl.add(new JLabel(tr("<html>Please select the values to keep for the following tags.</html>", null)), gc);
     1285            pnl.add(new JLabel(tr("<html>Please select the values to keep for the following tags.</html>")), gc);
    12731286
    12741287            gc.gridy = 1;
    12751288            gc.fill = GridBagConstraints.HORIZONTAL;
    12761289            gc.weighty = 0.0;
    1277             pnl.add(cbShowTagsWithConflictsOnly = new JCheckBox(tr("Show tags with conflicts only", null)), gc);
    1278             pnl.add(cbShowTagsWithMultiValuesOnly = new JCheckBox(tr("Show tags with multiple values only", null)), gc);
     1290            pnl.add(cbShowTagsWithConflictsOnly = new JCheckBox(tr("Show tags with conflicts only")), gc);
     1291            pnl.add(cbShowTagsWithMultiValuesOnly = new JCheckBox(tr("Show tags with multiple values only")), gc);
    12791292            cbShowTagsWithConflictsOnly.addChangeListener(
    12801293                    new ChangeListener() {
     1294                        @Override
    12811295                        public void stateChanged(ChangeEvent e) {
    12821296                            model.setShowTagsWithConflictsOnly(cbShowTagsWithConflictsOnly.isSelected());
     
    12901304            cbShowTagsWithMultiValuesOnly.addChangeListener(
    12911305                    new ChangeListener() {
     1306                        @Override
    12921307                        public void stateChanged(ChangeEvent e) {
    12931308                            model.setShowTagsWithMultiValuesOnly(cbShowTagsWithMultiValuesOnly.isSelected());
     
    13731388         */
    13741389        class SelectNextColumnCellAction extends AbstractAction {
     1390            @Override
    13751391            public void actionPerformed(ActionEvent e) {
    13761392                run();
     
    14031419        class SelectPreviousColumnCellAction extends AbstractAction {
    14041420
     1421            @Override
    14051422            public void actionPerformed(ActionEvent e) {
    14061423                run();
     
    14261443        }
    14271444
     1445        @Override
    14281446        public void gotoNextDecision() {
    14291447            selectNextColumnCellAction.run();
    14301448        }
    14311449
     1450        @Override
    14321451        public void gotoPreviousDecision() {
    14331452            selectPreviousColumnCellAction.run();
  • applications/editors/josm/plugins/michigan_left/build.xml

    r29435 r29778  
    3232    <property name="commit.message" value="Changed the constructor signature of the plugin main class"/>
    3333    <!-- enter the *lowest* JOSM version this plugin is currently compatible with -->
    34     <property name="plugin.main.version" value="4980"/>
    35     <!--
    36       ************************************************
    37       ** should not be necessary to change the following properties
    38      -->
    39     <property name="josm" location="../../core/dist/josm-custom.jar"/>
    40     <property name="plugin.build.dir" value="build"/>
    41     <property name="plugin.src.dir" value="src"/>
    42     <!-- this is the directory where the plugin jar is copied to -->
    43     <property name="plugin.dist.dir" value="../../dist"/>
    44     <property name="ant.build.javac.target" value="1.5"/>
    45     <property name="plugin.dist.dir" value="../../dist"/>
    46     <property name="plugin.jar" value="${plugin.dist.dir}/${ant.project.name}.jar"/>
    47     <!--
    48     **********************************************************
    49     ** init - initializes the build
    50     **********************************************************
     34    <property name="plugin.main.version" value="6082"/>
     35       
     36    <!-- Configure these properties (replace "..." accordingly).
     37         See http://josm.openstreetmap.de/wiki/DevelopersGuide/DevelopingPlugins
    5138    -->
    52     <target name="init">
    53         <mkdir dir="${plugin.build.dir}"/>
    54     </target>
    55     <!--
    56     **********************************************************
    57     ** compile - complies the source tree
    58     **********************************************************
    59     -->
    60     <target name="compile" depends="init">
    61         <echo message="compiling sources for  ${plugin.jar} ... "/>
    62         <javac srcdir="src" classpath="${josm}" debug="true" destdir="${plugin.build.dir}">
    63             <compilerarg value="-Xlint:deprecation"/>
    64             <compilerarg value="-Xlint:unchecked"/>
    65         </javac>
    66     </target>
    67     <!--
    68     **********************************************************
    69     ** dist - creates the plugin jar
    70     **********************************************************
    71     -->
    72     <target name="dist" depends="compile,revision">
    73         <echo message="creating ${plugin.jar.name} ... "/>
    74         <copy todir="${plugin.build.dir}/images">
    75             <fileset dir="images"/>
    76         </copy>
    77         <copy todir="${plugin.build.dir}">
    78             <fileset dir=".">
    79                 <include name="README"/>
    80                 <include name="LICENSE"/>
    81             </fileset>
    82         </copy>
    83         <copy todir="${plugin.build.dir}/data">
    84             <fileset dir="data"/>
    85         </copy>
    86         <jar destfile="${plugin.jar}" basedir="${plugin.build.dir}">
    87             <!--
    88         ************************************************
    89         ** configure these properties. Most of them will be copied to the plugins
    90         ** manifest file. Property values will also show up in the list available
    91         ** plugins: http://josm.openstreetmap.de/wiki/Plugins.
    92         **
    93         ************************************************
    94     -->
    95             <manifest>
    96                 <attribute name="Author" value="Nakor"/>
    97                 <attribute name="Plugin-Class" value="MichiganLeft.MichiganLeft"/>
    98                 <attribute name="Plugin-Date" value="${version.entry.commit.date}"/>
    99                 <attribute name="Plugin-Description" value="Adds no left turn for sets of 4 or 5 ways"/>
    100                 <attribute name="Plugin-Icon" value="images/michigan_left.png"/>
    101                 <attribute name="Plugin-Link" value="http://wiki.openstreetmap.org/wiki/JOSM/Plugins/MichiganLeft"/>
    102                 <attribute name="Plugin-Mainversion" value="${plugin.main.version}"/>
    103                 <attribute name="Plugin-Version" value="${version.entry.commit.revision}"/>
    104             </manifest>
    105         </jar>
    106     </target>
    107     <!--
    108     **********************************************************
    109     ** revision - extracts the current revision number for the
    110     **    file build.number and stores it in the XML property
    111     **    version.*
    112     **********************************************************
    113     -->
    114     <target name="revision">
    115         <exec append="false" output="REVISION" executable="svn" failifexecutionfails="false">
    116             <env key="LANG" value="C"/>
    117             <arg value="info"/>
    118             <arg value="--xml"/>
    119             <arg value="."/>
    120         </exec>
    121         <xmlproperty file="REVISION" prefix="version" keepRoot="false" collapseAttributes="true"/>
    122         <delete file="REVISION"/>
    123     </target>
    124     <!--
    125     **********************************************************
    126     ** clean - clean up the build environment
    127     **********************************************************
    128     -->
    129     <target name="clean">
    130         <delete dir="${plugin.build.dir}"/>
    131         <delete file="${plugin.jar}"/>
    132     </target>
    133     <!--
    134     **********************************************************
    135     ** install - install the plugin in your local JOSM installation
    136     **********************************************************
    137     -->
    138     <target name="install" depends="dist">
    139         <property environment="env"/>
    140         <condition property="josm.plugins.dir" value="${env.APPDATA}/JOSM/plugins" else="${user.home}/.josm/plugins">
    141             <and>
    142                 <os family="windows"/>
    143             </and>
    144         </condition>
    145         <copy file="${plugin.jar}" todir="${josm.plugins.dir}"/>
    146     </target>
    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>
     39    <property name="plugin.author" value="Nakor"/>
     40    <property name="plugin.class" value="MichiganLeft.MichiganLeft"/>
     41    <property name="plugin.description" value="Adds no left turn for sets of 4 or 5 ways"/>
     42    <property name="plugin.icon" value="images/michigan_left.png"/>
     43    <property name="plugin.link" value="http://wiki.openstreetmap.org/wiki/JOSM/Plugins/MichiganLeft"/>
     44
     45    <!-- ** include targets that all plugins have in common ** -->
     46    <import file="../build-common.xml"/>
    24047</project>
  • applications/editors/josm/plugins/michigan_left/src/MichiganLeft/MichiganLeft.java

    r27852 r29778  
    3434  public MichiganLeft(PluginInformation info) {
    3535    super(info);
    36     MichiganLeft = MainMenu.add(Main.main.menu.toolsMenu,
    37         new MichiganLeftAction());
    38 
     36    MichiganLeft = MainMenu.add(Main.main.menu.dataMenu, new MichiganLeftAction());
    3937  }
    4038
     
    5351    }
    5452
     53    @Override
    5554    public void actionPerformed(ActionEvent e) {
    5655      Collection<OsmPrimitive> mainSelection = Main.main.getCurrentDataSet()
  • applications/editors/josm/plugins/namemanager/build.xml

    r29435 r29778  
    3232    <property name="commit.message" value="..."/>
    3333    <!-- enter the *lowest* JOSM version this plugin is currently compatible with -->
    34     <property name="plugin.main.version" value="4394"/>
    35     <!--
    36       ************************************************
    37       ** should not be necessary to change the following properties
    38      -->
    39     <property name="josm" location="../../core/dist/josm-custom.jar"/>
    40     <property name="plugin.build.dir" value="build"/>
    41     <property name="plugin.src.dir" value="src"/>
    42     <!-- this is the directory where the plugin jar is copied to -->
    43     <property name="plugin.dist.dir" value="../../dist"/>
    44     <property name="ant.build.javac.target" value="1.5"/>
    45     <property name="plugin.dist.dir" value="../../dist"/>
    46     <property name="plugin.jar" value="${plugin.dist.dir}/${ant.project.name}.jar"/>
    47     <!--
    48     **********************************************************
    49     ** init - initializes the build
    50     **********************************************************
     34    <property name="plugin.main.version" value="6082"/>
     35
     36    <!-- Configure these properties (replace "..." accordingly).
     37         See http://josm.openstreetmap.de/wiki/DevelopersGuide/DevelopingPlugins
    5138    -->
    52     <target name="init">
    53         <mkdir dir="${plugin.build.dir}"/>
    54     </target>
    55     <!--
    56     **********************************************************
    57     ** compile - complies the source tree
    58     **********************************************************
    59     -->
    60     <target name="compile" depends="init">
    61         <echo message="compiling sources for  ${plugin.jar} ... "/>
    62         <javac srcdir="src" classpath="${josm}" debug="true" destdir="${plugin.build.dir}">
    63             <compilerarg value="-Xlint:deprecation"/>
    64             <compilerarg value="-Xlint:unchecked"/>
    65         </javac>
    66     </target>
    67     <!--
    68     **********************************************************
    69     ** dist - creates the plugin jar
    70     **********************************************************
    71     -->
    72     <target name="dist" depends="compile,revision">
    73         <echo message="creating ${ant.project.name}.jar ... "/>
    74         <copy todir="${plugin.build.dir}/resources">
    75             <fileset dir="resources"/>
    76         </copy>
    77         <copy todir="${plugin.build.dir}/images">
    78             <fileset dir="images"/>
    79         </copy>
    80         <copy todir="${plugin.build.dir}/data">
    81             <fileset dir="data"/>
    82         </copy>
    83         <copy todir="${plugin.build.dir}">
    84             <fileset dir=".">
    85                 <include name="README"/>
    86                 <include name="LICENSE"/>
    87             </fileset>
    88         </copy>
    89         <jar destfile="${plugin.jar}" basedir="${plugin.build.dir}">
    90             <!--
    91         ************************************************
    92         ** configure these properties. Most of them will be copied to the plugins
    93         ** manifest file. Property values will also show up in the list available
    94         ** plugins: http://josm.openstreetmap.de/wiki/Plugins.
    95         **
    96         ************************************************
    97     -->
    98             <manifest>
    99                 <attribute name="Author" value="Rafal Jachowicz: rjachow@gmail.com"/>
    100                 <attribute name="Main-Class" value="org.openstreetmap.josm.plugins.namemanager.NameManagerMain"/>
    101                 <attribute name="Plugin-Class" value="org.openstreetmap.josm.plugins.namemanager.NameManagerPlugin"/>
    102                 <attribute name="Plugin-Date" value="${version.entry.commit.date}"/>
    103                 <attribute name="Plugin-Description" value="Allows to attribute tags to all objects in any selected area at once"/>
    104                 <attribute name="pl_Plugin-Description" value="Pozwala na dodawanie, edycję i usuwanie tagów znajdujących się we wskazanym obszarze na raz"/>
    105                 <!--                <attribute name="Plugin-Icon" value="..."/>-->
    106                 <!--                <attribute name="Plugin-Link" value="..."/>-->
    107                 <attribute name="Plugin-Mainversion" value="${plugin.main.version}"/>
    108                 <attribute name="Plugin-Version" value="${version.entry.commit.revision}"/>
    109             </manifest>
    110         </jar>
    111     </target>
    112     <!--
    113     **********************************************************
    114     ** revision - extracts the current revision number for the
    115     **    file build.number and stores it in the XML property
    116     **    version.*
    117     **********************************************************
    118     -->
    119     <target name="revision">
    120         <exec append="false" output="REVISION" executable="svn" failifexecutionfails="false">
    121             <env key="LANG" value="C"/>
    122             <arg value="info"/>
    123             <arg value="--xml"/>
    124             <arg value="."/>
    125         </exec>
    126         <xmlproperty file="REVISION" prefix="version" keepRoot="false" collapseAttributes="true"/>
    127         <delete file="REVISION"/>
    128     </target>
    129     <!--
    130     **********************************************************
    131     ** clean - clean up the build environment
    132     **********************************************************
    133     -->
    134     <target name="clean">
    135         <delete dir="${plugin.build.dir}"/>
    136         <delete file="${plugin.jar}"/>
    137     </target>
    138     <!--
    139     **********************************************************
    140     ** install - install the plugin in your local JOSM installation
    141     **********************************************************
    142     -->
    143     <target name="install" depends="dist">
    144         <property environment="env"/>
    145         <condition property="josm.plugins.dir" value="${env.APPDATA}/JOSM/plugins" else="${user.home}/.josm/plugins">
    146             <and>
    147                 <os family="windows"/>
    148             </and>
    149         </condition>
    150         <copy file="${plugin.jar}" todir="${josm.plugins.dir}"/>
    151     </target>
    152     <!--
    153     ************************** Publishing the plugin ***********************************
    154     -->
    155     <!--
    156         ** extracts the JOSM release for the JOSM version in ../core and saves it in the
    157         ** property ${coreversion.info.entry.revision}
    158         **
    159         -->
    160     <target name="core-info">
    161         <exec append="false" output="core.info.xml" executable="svn" failifexecutionfails="false">
    162             <env key="LANG" value="C"/>
    163             <arg value="info"/>
    164             <arg value="--xml"/>
    165             <arg value="../../core"/>
    166         </exec>
    167         <xmlproperty file="core.info.xml" prefix="coreversion" keepRoot="true" collapseAttributes="true"/>
    168         <echo>Building against core revision ${coreversion.info.entry.revision}.</echo>
    169         <echo>Plugin-Mainversion is set to ${plugin.main.version}.</echo>
    170         <delete file="core.info.xml"/>
    171     </target>
    172     <!--
    173         ** commits the source tree for this plugin
    174         -->
    175     <target name="commit-current">
    176         <echo>Commiting the plugin source with message '${commit.message}' ...</echo>
    177         <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
    178             <env key="LANG" value="C"/>
    179             <arg value="commit"/>
    180             <arg value="-m '${commit.message}'"/>
    181             <arg value="."/>
    182         </exec>
    183     </target>
    184     <!--
    185         ** updates (svn up) the source tree for this plugin
    186         -->
    187     <target name="update-current">
    188         <echo>Updating plugin source ...</echo>
    189         <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
    190             <env key="LANG" value="C"/>
    191             <arg value="up"/>
    192             <arg value="."/>
    193         </exec>
    194         <echo>Updating ${plugin.jar} ...</echo>
    195         <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
    196             <env key="LANG" value="C"/>
    197             <arg value="up"/>
    198             <arg value="../dist/${plugin.jar}"/>
    199         </exec>
    200     </target>
    201     <!--
    202         ** commits the plugin.jar
    203         -->
    204     <target name="commit-dist">
    205         <echo>
    206     ***** Properties of published ${plugin.jar} *****
    207     Commit message    : '${commit.message}'                 
    208     Plugin-Mainversion: ${plugin.main.version}
    209     JOSM build version: ${coreversion.info.entry.revision}
    210     Plugin-Version    : ${version.entry.commit.revision}
    211     ***** / Properties of published ${plugin.jar} *****                 
    212                        
    213     Now commiting ${plugin.jar} ...
    214     </echo>
    215         <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
    216             <env key="LANG" value="C"/>
    217             <arg value="-m '${commit.message}'"/>
    218             <arg value="commit"/>
    219             <arg value="${plugin.jar}"/>
    220         </exec>
    221     </target>
    222     <!-- ** make sure svn is present as a command line tool ** -->
    223     <target name="ensure-svn-present">
    224         <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false" failonerror="false" resultproperty="svn.exit.code">
    225             <env key="LANG" value="C"/>
    226             <arg value="--version"/>
    227         </exec>
    228         <fail message="Fatal: command 'svn --version' failed. Please make sure svn is installed on your system.">
    229             <!-- return code not set at all? Most likely svn isn't installed -->
    230             <condition>
    231                 <not>
    232                     <isset property="svn.exit.code"/>
    233                 </not>
    234             </condition>
    235         </fail>
    236         <fail message="Fatal: command 'svn --version' failed. Please make sure a working copy of svn is installed on your system.">
    237             <!-- error code from SVN? Most likely svn is not what we are looking on this system -->
    238             <condition>
    239                 <isfailure code="${svn.exit.code}"/>
    240             </condition>
    241         </fail>
    242     </target>
    243     <target name="publish" depends="ensure-svn-present,core-info,commit-current,update-current,clean,dist,commit-dist">
    244     </target>
     39    <property name="plugin.author" value="Rafal Jachowicz: rjachow@gmail.com"/>
     40    <property name="plugin.class" value="org.openstreetmap.josm.plugins.namemanager.NameManagerPlugin"/>
     41    <property name="plugin.description" value="Allows to attribute tags to all objects in any selected area at once"/>
     42    <property name="plugin.pl_description" value="Pozwala na dodawanie, edycję i usuwanie tagów znajdujących się we wskazanym obszarze na raz"/>
     43<!--    <property name="plugin.icon" value="images/michigan_left.png"/>
     44    <property name="plugin.link" value="http://wiki.openstreetmap.org/wiki/JOSM/Plugins/MichiganLeft"/>-->
     45
     46    <!-- ** include targets that all plugins have in common ** -->
     47    <import file="../build-common.xml"/>
    24548</project>
  • applications/editors/josm/plugins/namemanager/src/org/openstreetmap/josm/plugins/namemanager/NameManagerPlugin.java

    r25594 r29778  
    1616    public NameManagerPlugin(PluginInformation info) {
    1717        super(info);
    18         MainMenu.add(Main.main.menu.toolsMenu, new NameManagerAction());
     18        MainMenu.add(Main.main.menu.dataMenu, new NameManagerAction());
    1919    }
    2020}
  • applications/editors/josm/plugins/namemanager/src/org/openstreetmap/josm/plugins/namemanager/listeners/NameManagerAction.java

    r27906 r29778  
    4545     * @see java.awt.event.ActionListener#actionPerformed(java.awt.event.ActionEvent)
    4646     */
     47    @Override
    4748    public void actionPerformed(ActionEvent e) {
    4849        if (!isEnabled()) {
     
    6768     * @see org.openstreetmap.josm.data.SelectionChangedListener#selectionChanged(java.util.Collection)
    6869     */
     70    @Override
    6971    public void selectionChanged(Collection<? extends OsmPrimitive> newSelection) {
    7072        setEnabled(newSelection != null
  • applications/editors/josm/plugins/openvisible/build.xml

    r29435 r29778  
    3232    <property name="commit.message" value="Changed the constructor signature of the plugin main class; updated build.xml"/>
    3333    <!-- enter the *lowest* JOSM version this plugin is currently compatible with -->
    34     <property name="plugin.main.version" value="5679"/>
     34    <property name="plugin.main.version" value="6082"/>
    3535    <!--
    3636      ************************************************
  • applications/editors/josm/plugins/openvisible/src/at/dallermassl/josm/plugin/openvisible/OpenVisiblePlugin.java

    r19465 r29778  
    1717    public OpenVisiblePlugin(PluginInformation info) {
    1818        super(info);
    19         MainMenu.add(Main.main.menu.fileMenu, new OpenVisibleAction());
     19        MainMenu.add(Main.main.menu.gpsMenu, new OpenVisibleAction());
    2020    }
    2121
  • applications/editors/josm/plugins/simplifyarea/build.xml

    r29435 r29778  
    3232    <property name="commit.message" value="Initial commit"/>
    3333    <!-- enter the *lowest* JOSM version this plugin is currently compatible with -->
    34     <property name="plugin.main.version" value="4980"/>
    35     <!--
    36       ************************************************
    37       ** should not be necessary to change the following properties
    38      -->
    39     <property name="josm" location="../../core/dist/josm-custom.jar"/>
    40     <property name="plugin.build.dir" value="build"/>
    41     <property name="plugin.src.dir" value="src"/>
    42     <!-- this is the directory where the plugin jar is copied to -->
    43     <property name="plugin.dist.dir" value="../../dist"/>
    44     <property name="ant.build.javac.target" value="1.5"/>
    45     <property name="plugin.dist.dir" value="../../dist"/>
    46     <property name="plugin.jar" value="${plugin.dist.dir}/${ant.project.name}.jar"/>
    47     <!--
    48     **********************************************************
    49     ** init - initializes the build
    50     **********************************************************
     34    <property name="plugin.main.version" value="6082"/>
     35       
     36    <!-- Configure these properties (replace "..." accordingly).
     37         See http://josm.openstreetmap.de/wiki/DevelopersGuide/DevelopingPlugins
    5138    -->
    52     <target name="init">
    53         <mkdir dir="${plugin.build.dir}"/>
    54     </target>
    55     <!--
    56     **********************************************************
    57     ** compile - complies the source tree
    58     **********************************************************
    59     -->
    60     <target name="compile" depends="init">
    61         <echo message="compiling sources for  ${plugin.jar} ... "/>
    62         <javac srcdir="src" classpath="${josm}" debug="true" destdir="${plugin.build.dir}">
    63             <compilerarg value="-Xlint:deprecation"/>
    64             <compilerarg value="-Xlint:unchecked"/>
    65         </javac>
    66     </target>
    67     <!--
    68     **********************************************************
    69     ** dist - creates the plugin jar
    70     **********************************************************
    71     -->
    72     <target name="dist" depends="compile,revision">
    73         <echo message="creating ${ant.project.name}.jar ... "/>
    74         <copy todir="${plugin.build.dir}/resources">
    75             <fileset dir="resources"/>
    76         </copy>
    77         <copy todir="${plugin.build.dir}/images">
    78             <fileset dir="images"/>
    79         </copy>
    80         <copy todir="${plugin.build.dir}/data">
    81             <fileset dir="data"/>
    82         </copy>
    83         <copy todir="${plugin.build.dir}">
    84             <fileset dir=".">
    85                 <include name="README"/>
    86                 <include name="LICENSE"/>
    87             </fileset>
    88         </copy>
    89         <jar destfile="${plugin.jar}" basedir="${plugin.build.dir}">
    90             <!--
    91         ************************************************
    92         ** configure these properties. Most of them will be copied to the plugins
    93         ** manifest file. Property values will also show up in the list available
    94         ** plugins: http://josm.openstreetmap.de/wiki/Plugins.
    95         **
    96         ************************************************
    97     -->
    98             <manifest>
    99                 <attribute name="Author" value="Martin Ždila &lt;m.zdila@gmail.com&gt;"/>
    100                 <attribute name="Plugin-Class" value="sk.zdila.josm.plugin.simplify.SimplifyAreaPlugin"/>
    101                 <attribute name="Plugin-Date" value="${version.entry.commit.date}"/>
    102                 <attribute name="Plugin-Description" value="Simplify area by removing nodes on very obtuse angles. This can be constrained by maximum removed area size. Also average nearby nodes."/>
    103                 <attribute name="Plugin-Icon" value="images/preferences/simplifyArea.png"/>
    104                 <!--<attribute name="Plugin-Link" value="..."/>-->
    105                 <attribute name="Plugin-Mainversion" value="${plugin.main.version}"/>
    106                 <attribute name="Plugin-Version" value="${version.entry.commit.revision}"/>
    107             </manifest>
    108         </jar>
    109     </target>
    110     <!--
    111     **********************************************************
    112     ** revision - extracts the current revision number for the
    113     **    file build.number and stores it in the XML property
    114     **    version.*
    115     **********************************************************
    116     -->
    117     <target name="revision">
    118         <exec append="false" output="REVISION" executable="svn" failifexecutionfails="false">
    119             <env key="LANG" value="C"/>
    120             <arg value="info"/>
    121             <arg value="--xml"/>
    122             <arg value="."/>
    123         </exec>
    124         <xmlproperty file="REVISION" prefix="version" keepRoot="false" collapseAttributes="true"/>
    125         <delete file="REVISION"/>
    126     </target>
    127     <!--
    128     **********************************************************
    129     ** clean - clean up the build environment
    130     **********************************************************
    131     -->
    132     <target name="clean">
    133         <delete dir="${plugin.build.dir}"/>
    134         <delete file="${plugin.jar}"/>
    135     </target>
    136     <!--
    137     **********************************************************
    138     ** install - install the plugin in your local JOSM installation
    139     **********************************************************
    140     -->
    141     <target name="install" depends="dist">
    142         <property environment="env"/>
    143         <condition property="josm.plugins.dir" value="${env.APPDATA}/JOSM/plugins" else="${user.home}/.josm/plugins">
    144             <and>
    145                 <os family="windows"/>
    146             </and>
    147         </condition>
    148         <copy file="${plugin.jar}" todir="${josm.plugins.dir}"/>
    149     </target>
    150     <!--
    151     ************************** Publishing the plugin ***********************************
    152     -->
    153     <!--
    154         ** extracts the JOSM release for the JOSM version in ../core and saves it in the
    155         ** property ${coreversion.info.entry.revision}
    156         **
    157         -->
    158     <target name="core-info">
    159         <exec append="false" output="core.info.xml" executable="svn" failifexecutionfails="false">
    160             <env key="LANG" value="C"/>
    161             <arg value="info"/>
    162             <arg value="--xml"/>
    163             <arg value="../../core"/>
    164         </exec>
    165         <xmlproperty file="core.info.xml" prefix="coreversion" keepRoot="true" collapseAttributes="true"/>
    166         <echo>Building against core revision ${coreversion.info.entry.revision}.</echo>
    167         <echo>Plugin-Mainversion is set to ${plugin.main.version}.</echo>
    168         <delete file="core.info.xml"/>
    169     </target>
    170     <!--
    171         ** commits the source tree for this plugin
    172         -->
    173     <target name="commit-current">
    174         <echo>Commiting the plugin source with message '${commit.message}' ...</echo>
    175         <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
    176             <env key="LANG" value="C"/>
    177             <arg value="commit"/>
    178             <arg value="-m '${commit.message}'"/>
    179             <arg value="."/>
    180         </exec>
    181     </target>
    182     <!--
    183         ** updates (svn up) the source tree for this plugin
    184         -->
    185     <target name="update-current">
    186         <echo>Updating plugin source ...</echo>
    187         <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
    188             <env key="LANG" value="C"/>
    189             <arg value="up"/>
    190             <arg value="."/>
    191         </exec>
    192         <echo>Updating ${plugin.jar} ...</echo>
    193         <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
    194             <env key="LANG" value="C"/>
    195             <arg value="up"/>
    196             <arg value="../dist/${plugin.jar}"/>
    197         </exec>
    198     </target>
    199     <!--
    200         ** commits the plugin.jar
    201         -->
    202     <target name="commit-dist">
    203         <echo>
    204     ***** Properties of published ${plugin.jar} *****
    205     Commit message    : '${commit.message}'                 
    206     Plugin-Mainversion: ${plugin.main.version}
    207     JOSM build version: ${coreversion.info.entry.revision}
    208     Plugin-Version    : ${version.entry.commit.revision}
    209     ***** / Properties of published ${plugin.jar} *****                 
    210                        
    211     Now commiting ${plugin.jar} ...
    212     </echo>
    213         <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
    214             <env key="LANG" value="C"/>
    215             <arg value="-m '${commit.message}'"/>
    216             <arg value="commit"/>
    217             <arg value="${plugin.jar}"/>
    218         </exec>
    219     </target>
    220     <!-- ** make sure svn is present as a command line tool ** -->
    221     <target name="ensure-svn-present">
    222         <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false" failonerror="false" resultproperty="svn.exit.code">
    223             <env key="LANG" value="C"/>
    224             <arg value="--version"/>
    225         </exec>
    226         <fail message="Fatal: command 'svn --version' failed. Please make sure svn is installed on your system.">
    227             <!-- return code not set at all? Most likely svn isn't installed -->
    228             <condition>
    229                 <not>
    230                     <isset property="svn.exit.code"/>
    231                 </not>
    232             </condition>
    233         </fail>
    234         <fail message="Fatal: command 'svn --version' failed. Please make sure a working copy of svn is installed on your system.">
    235             <!-- error code from SVN? Most likely svn is not what we are looking on this system -->
    236             <condition>
    237                 <isfailure code="${svn.exit.code}"/>
    238             </condition>
    239         </fail>
    240     </target>
    241     <target name="publish" depends="ensure-svn-present,core-info,commit-current,update-current,clean,dist,commit-dist">
    242     </target>
     39    <property name="plugin.author" value="Martin Ždila &lt;m.zdila@gmail.com&gt;"/>
     40    <property name="plugin.class" value="sk.zdila.josm.plugin.simplify.SimplifyAreaPlugin"/>
     41    <property name="plugin.description" value="Simplify area by removing nodes on very obtuse angles. This can be constrained by maximum removed area size. Also average nearby nodes."/>
     42    <property name="plugin.icon" value="images/preferences/simplifyArea.png"/>
     43    <property name="plugin.link" value="http://wiki.openstreetmap.org/wiki/JOSM/Plugins/SimplifyArea"/>
     44
     45    <!-- ** include targets that all plugins have in common ** -->
     46    <import file="../build-common.xml"/>               
     47               
    24348</project>
  • applications/editors/josm/plugins/simplifyarea/src/sk/zdila/josm/plugin/simplify/SimplifyAreaPlugin.java

    r25881 r29778  
    1111    public SimplifyAreaPlugin(final PluginInformation info) {
    1212        super(info);
    13         MainMenu.add(Main.main.menu.toolsMenu, new SimplifyAreaAction());
     13        MainMenu.add(Main.main.menu.moreToolsMenu, new SimplifyAreaAction());
    1414    }
    1515
  • applications/editors/josm/plugins/smed/build.xml

    r29491 r29778  
    44    <property name="commit.message" value="New release"/>
    55    <!-- enter the *lowest* JOSM version this plugin is currently compatible with -->
    6     <property name="plugin.main.version" value="4394"/>
     6    <property name="plugin.main.version" value="6082"/>
    77    <!-- should not be necessary to change the following properties -->
    88    <property name="josm" location="../../core/dist/josm-custom.jar"/>
  • applications/editors/josm/plugins/smed/src/smed/Smed.java

    r27379 r29778  
    1818
    1919import org.openstreetmap.josm.Main;
     20import org.openstreetmap.josm.gui.MainMenu;
    2021import org.openstreetmap.josm.gui.MapFrame;
    2122import org.openstreetmap.josm.plugins.Plugin;
     
    135136       
    136137        smedTab = new SmedTabAction();
    137         item = Main.main.menu.toolsMenu.add(smedTab);
     138        item = MainMenu.add(Main.main.menu.dataMenu, smedTab);
    138139        smedTab.setOsmItem(item);
    139140       
  • applications/editors/josm/plugins/tagging-preset-tester/nbproject

    • Property svn:ignore set to
      private
  • applications/editors/josm/plugins/terracer/nbproject

    • Property svn:ignore set to
      private
  • applications/editors/josm/plugins/tracer/nbproject

    • Property svn:ignore set to
      private
  • applications/editors/josm/plugins/videomapping/nbproject

    • Property svn:ignore set to
      private
  • applications/editors/josm/plugins/walkingpapers/build.xml

    r29480 r29778  
    1717    <property name="commit.message" value="Changed the constructor signature of the plugin main class"/>
    1818    <!-- enter the *lowest* JOSM version this plugin is currently compatible with -->
    19     <property name="plugin.main.version" value="4549"/>
     19    <property name="plugin.main.version" value="6082"/>
    2020
    2121    <property name="plugin.author" value="Frederik Ram"/>
  • applications/editors/josm/plugins/walkingpapers/src/org/openstreetmap/josm/plugins/walkingpapers/WalkingPapersAddLayerAction.java

    r23190 r29778  
    2121
    2222    public WalkingPapersAddLayerAction() {
    23         super(tr("Scanned Map..."), "walkingpapers",
     23        super(tr("Walking Papers Scanned Map"), "walkingpapers",
    2424            tr("Display a map that was previously scanned and uploaded to walking-papers.org"), null, false);
    2525    }
  • applications/editors/josm/plugins/walkingpapers/src/org/openstreetmap/josm/plugins/walkingpapers/WalkingPapersPlugin.java

    r23190 r29778  
    2727    {
    2828        super(info);
    29         MainMenu menu = Main.main.menu;
    30         walkingPapersMenu = menu.addMenu(marktr("Walking Papers"), KeyEvent.VK_K, menu.defaultMenuPos, ht("/Plugin/WalkingPapers"));
    31         walkingPapersMenu.add(new JMenuItem(new WalkingPapersAddLayerAction()));
     29        walkingPapersMenu = Main.main.menu.imageryMenu;
     30         // ht("/Plugin/WalkingPapers"));
     31        MainMenu.add(Main.main.menu.imageryMenu, new WalkingPapersAddLayerAction(), false, 0);
    3232    }
    3333}
  • applications/editors/josm/plugins/waydownloader/nbproject

    • Property svn:ignore set to
      private
  • applications/editors/josm/plugins/wayselector/nbproject

    • Property svn:ignore set to
      private
  • applications/editors/josm/plugins/wikipedia/build.xml

    r29511 r29778  
    1717    <property name="commit.message" value="Commit message"/>
    1818    <!-- enter the *lowest* JOSM version this plugin is currently compatible with -->
    19     <property name="plugin.main.version" value="5880"/>
     19    <property name="plugin.main.version" value="6082"/>
    2020
    2121    <property name="plugin.author" value="simon04"/>
  • applications/editors/josm/plugins/wikipedia/src/org/wikipedia/WikipediaPlugin.java

    r29033 r29778  
    1313        super(info);
    1414        new WikipediaCopyTemplate();
    15         MainMenu.add(Main.main.menu.toolsMenu, new WikipediaAddNamesAction());
     15        MainMenu.add(Main.main.menu.dataMenu, new WikipediaAddNamesAction());
    1616    }
    1717
Note: See TracChangeset for help on using the changeset viewer.