Changeset 29461 in osm for applications


Ignore:
Timestamp:
2013-04-02T00:59:43+02:00 (12 years ago)
Author:
donvip
Message:

[josm_plugins] Update xml-imagery-bounds and tag2link plugins to JOSM 5821

Location:
applications/editors/josm/plugins
Files:
2 deleted
6 edited

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/imagery-xml-bounds/.classpath

    r27302 r29461  
    22<classpath>
    33        <classpathentry kind="src" path="src"/>
    4         <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
     4        <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
    55        <classpathentry combineaccessrules="false" kind="src" path="/JOSM"/>
    66        <classpathentry kind="output" path="bin"/>
  • applications/editors/josm/plugins/imagery-xml-bounds/build.xml

    r29435 r29461  
    11<?xml version="1.0" encoding="utf-8"?>
    2 <!--
    3 ** This is a template build file for the imagery-xml-bounds plugin.
    4 **
    5 ** Maintaining versions
    6 ** ====================
    7 ** see README.template
    8 **
    9 ** Usage
    10 ** =====
    11 ** To build it run
    12 **
    13 **    > ant  dist
    14 **
    15 ** To install the generated plugin locally (in you default plugin directory) run
    16 **
    17 **    > ant  install
    18 **
    19 ** The generated plugin jar is not automatically available in JOSMs plugin configuration
    20 ** dialog. You have to check it in first.
    21 **
    22 ** Use the ant target 'publish' to check in the plugin and make it available to other
    23 ** JOSM users:
    24 **    set the properties commit.message and plugin.main.version
    25 ** and run
    26 **    > ant  publish
    27 **
    28 **
    29 -->
    302<project name="imagery-xml-bounds" default="dist" basedir=".">
    313    <!-- enter the SVN commit message -->
    324    <property name="commit.message" value="Commit message"/>
    335    <!-- enter the *lowest* JOSM version this plugin is currently compatible with -->
    34     <property name="plugin.main.version" value="5459"/>
     6    <property name="plugin.main.version" value="5821"/>
    357       
    368    <!-- Configure these properties (replace "..." accordingly).
     
    4214    <property name="plugin.icon" value="images/xml_24.png"/>
    4315    <property name="plugin.link" value="http://wiki.openstreetmap.org/wiki/JOSM/Plugins/Imagery-XML-Bounds"/>
    44     <!--<property name="plugin.early" value="..."/>-->
    45     <!--<property name="plugin.requires" value="..."/>-->
    46     <!--<property name="plugin.stage" value="..."/>-->
    4716
    4817    <!-- ** include targets that all plugins have in common ** -->
  • applications/editors/josm/plugins/imagery-xml-bounds/src/org/openstreetmap/josm/plugins/imageryxmlbounds/ImageryXmlBoundsPlugin.java

    r27015 r29461  
    1818import org.openstreetmap.josm.Main;
    1919import org.openstreetmap.josm.actions.ExtensionFileFilter;
    20 import org.openstreetmap.josm.data.Version;
    2120import org.openstreetmap.josm.data.osm.DataSet;
    2221import org.openstreetmap.josm.gui.MapFrame;
     
    2423import org.openstreetmap.josm.plugins.Plugin;
    2524import org.openstreetmap.josm.plugins.PluginInformation;
    26 import org.openstreetmap.josm.plugins.imageryxmlbounds.actions.ShowBoundsListAction;
    27 import org.openstreetmap.josm.plugins.imageryxmlbounds.actions.ShowBoundsPropertiesAction;
     25import org.openstreetmap.josm.plugins.imageryxmlbounds.actions.ShowBoundsAction;
    2826import org.openstreetmap.josm.plugins.imageryxmlbounds.actions.ShowBoundsSelectionAction;
    2927import org.openstreetmap.josm.plugins.imageryxmlbounds.actions.downloadtask.DownloadXmlBoundsTask;
     
    4644     * Action showing bounds of the selected closed ways in Selection dialog
    4745     */
    48         private final ShowBoundsListAction selectionListAction = new ShowBoundsListAction();
     46        private final ShowBoundsAction selectionListAction = new ShowBoundsAction();
    4947
    5048    /**
    5149     * Action showing bounds of the selected multipolygons in Properties dialog
    5250     */
    53     private final ShowBoundsPropertiesAction propertiesListAction = new ShowBoundsPropertiesAction();
     51    private final ShowBoundsAction propertiesListAction = new ShowBoundsAction();
    5452   
    5553        /**
    5654     * Action showing bounds of the selected multipolygons in Relations dialog
    5755     */
    58         private final ShowBoundsListAction relationListAction = new ShowBoundsListAction();
     56        private final ShowBoundsAction relationListAction = new ShowBoundsAction();
    5957
    6058    /**
     
    8280                Main.toolbar.register(selectionAction);
    8381                // Allow JOSM to download *.imagery.xml files
    84                 if (Version.getInstance().getVersion() >= 4523) {
    85                     Main.main.menu.openLocation.addDownloadTaskClass(DownloadXmlBoundsTask.class);
    86                 }
     82                Main.main.menu.openLocation.addDownloadTaskClass(DownloadXmlBoundsTask.class);
    8783        }
    8884       
     
    10298                if (newFrame != null) {
    10399                    // Initialize dialogs actions only after the main frame is created
    104             newFrame.selectionListDialog.addPopupMenuSeparator();
    105             newFrame.selectionListDialog.addPopupMenuAction(selectionListAction);
    106             newFrame.propertiesDialog.addMembershipPopupMenuSeparator();
    107             newFrame.propertiesDialog.addMembershipPopupMenuAction(propertiesListAction);
    108                         newFrame.relationListDialog.addPopupMenuSeparator();
    109                         newFrame.relationListDialog.addPopupMenuAction(relationListAction);
     100            newFrame.selectionListDialog.getPopupMenuHandler().addSeparator();
     101            newFrame.selectionListDialog.getPopupMenuHandler().addAction(selectionListAction);
     102            newFrame.propertiesDialog.getMembershipPopupMenuHandler().addSeparator();
     103            newFrame.propertiesDialog.getMembershipPopupMenuHandler().addAction(propertiesListAction);
     104                        newFrame.relationListDialog.getPopupMenuHandler().addSeparator();
     105                        newFrame.relationListDialog.getPopupMenuHandler().addAction(relationListAction);
     106                } else if (oldFrame != null) {
     107            // Remove listeners from previous frame to avoid memory leaks
     108                    if (oldFrame.relationListDialog != null) {
     109                        oldFrame.relationListDialog.getPopupMenuHandler().removeAction(relationListAction);
     110                    }
     111                    if (oldFrame.propertiesDialog != null) {
     112                        oldFrame.propertiesDialog.getMembershipPopupMenuHandler().removeAction(propertiesListAction);
     113                    }
     114                    if (oldFrame.selectionListDialog != null) {
     115                        oldFrame.selectionListDialog.getPopupMenuHandler().removeAction(selectionListAction);
     116                    }
    110117                }
    111118        }
  • applications/editors/josm/plugins/imagery-xml-bounds/src/org/openstreetmap/josm/plugins/imageryxmlbounds/actions/ShowBoundsAction.java

    r27014 r29461  
    1919import java.awt.Font;
    2020import java.awt.event.ActionEvent;
     21import java.util.Collection;
    2122
    2223import javax.swing.Box;
     
    2728
    2829import org.openstreetmap.josm.Main;
     30import org.openstreetmap.josm.actions.OsmPrimitiveAction;
     31import org.openstreetmap.josm.data.osm.OsmPrimitive;
    2932import org.openstreetmap.josm.plugins.imageryxmlbounds.XmlBoundsLayer;
    3033
     
    3437 */
    3538@SuppressWarnings("serial")
    36 public class ShowBoundsAction extends ComputeBoundsAction {
     39public class ShowBoundsAction extends ComputeBoundsAction implements OsmPrimitiveAction {
    3740
    3841        public ShowBoundsAction() {
     
    5861        JOptionPane.showMessageDialog(Main.parent, box, ACTION_NAME, JOptionPane.PLAIN_MESSAGE);
    5962        }
     63
     64    @Override
     65    public void setPrimitives(Collection<? extends OsmPrimitive> primitives) {
     66        updateOsmPrimitives(primitives);
     67    }
    6068}
  • applications/editors/josm/plugins/tag2link/build.xml

    r29440 r29461  
    11<?xml version="1.0" encoding="utf-8"?>
    2 <!--
    3 ** This is a template build file for a JOSM  plugin.
    4 **
    5 ** Maintaining versions
    6 ** ====================
    7 ** See README.template
    8 **
    9 ** Usage
    10 ** =====
    11 ** Call "ant help" to get possible build targets.
    12 **
    13 -->
    142<project name="tag2link" default="dist" basedir=".">
    153
     
    175    <property name="commit.message" value="Commit message"/>
    186    <!-- enter the *lowest* JOSM version this plugin is currently compatible with -->
    19     <property name="plugin.main.version" value="4968"/>
     7    <property name="plugin.main.version" value="5821"/>
    208
    219    <property name="plugin.author" value="Don-vip &amp; FrViPofm"/>
  • applications/editors/josm/plugins/tag2link/src/org/openstreetmap/josm/plugins/tag2link/Tag2LinkPlugin.java

    r28599 r29461  
    7474        if (newFrame != null) {
    7575            // Initialize dialogs listeners only after the main frame is created
    76             newFrame.selectionListDialog.addPopupMenuListener(selectionPopupListener = new SelectionPopupListener(newFrame));
    77             newFrame.propertiesDialog.addMembershipPopupMenuListener(membershipPopupListener = new MembershipPopupListener(newFrame));
    78             newFrame.propertiesDialog.addPropertyPopupMenuListener(propertyPopupListener = new PropertyPopupListener(newFrame));
    79             newFrame.relationListDialog.addPopupMenuListener(relationPopupListener = new RelationPopupListener(newFrame));
     76            newFrame.selectionListDialog.getPopupMenuHandler().addListener(selectionPopupListener = new SelectionPopupListener(newFrame));
     77            newFrame.propertiesDialog.getMembershipPopupMenuHandler().addListener(membershipPopupListener = new MembershipPopupListener(newFrame));
     78            newFrame.propertiesDialog.getPropertyPopupMenuHandler().addListener(propertyPopupListener = new PropertyPopupListener(newFrame));
     79            newFrame.relationListDialog.getPopupMenuHandler().addListener(relationPopupListener = new RelationPopupListener(newFrame));
    8080        } else if (oldFrame != null) {
    8181            // Remove listeners from previous frame to avoid memory leaks
    8282            if (oldFrame.selectionListDialog != null) {
    83                 oldFrame.selectionListDialog.removePopupMenuListener(selectionPopupListener);
     83                oldFrame.selectionListDialog.getPopupMenuHandler().removeListener(selectionPopupListener);
    8484            }
    8585            if (oldFrame.propertiesDialog != null) {
    86                 oldFrame.propertiesDialog.removeMembershipPopupMenuListener(membershipPopupListener);
    87                 oldFrame.propertiesDialog.removePropertyPopupMenuListener(propertyPopupListener);
     86                oldFrame.propertiesDialog.getMembershipPopupMenuHandler().removeListener(membershipPopupListener);
     87                oldFrame.propertiesDialog.getPropertyPopupMenuHandler().removeListener(propertyPopupListener);
    8888            }
    8989            if (oldFrame.relationListDialog != null) {
    90                 oldFrame.relationListDialog.removePopupMenuListener(relationPopupListener);
     90                oldFrame.relationListDialog.getPopupMenuHandler().removeListener(relationPopupListener);
    9191            }
    9292            selectionPopupListener = null;
Note: See TracChangeset for help on using the changeset viewer.