Changeset 29461 in osm for applications
- Timestamp:
- 2013-04-02T00:59:43+02:00 (12 years ago)
- Location:
- applications/editors/josm/plugins
- Files:
-
- 2 deleted
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/imagery-xml-bounds/.classpath
r27302 r29461 2 2 <classpath> 3 3 <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"/> 5 5 <classpathentry combineaccessrules="false" kind="src" path="/JOSM"/> 6 6 <classpathentry kind="output" path="bin"/> -
applications/editors/josm/plugins/imagery-xml-bounds/build.xml
r29435 r29461 1 1 <?xml version="1.0" encoding="utf-8"?> 2 <!--3 ** This is a template build file for the imagery-xml-bounds plugin.4 **5 ** Maintaining versions6 ** ====================7 ** see README.template8 **9 ** Usage10 ** =====11 ** To build it run12 **13 ** > ant dist14 **15 ** To install the generated plugin locally (in you default plugin directory) run16 **17 ** > ant install18 **19 ** The generated plugin jar is not automatically available in JOSMs plugin configuration20 ** 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 other23 ** JOSM users:24 ** set the properties commit.message and plugin.main.version25 ** and run26 ** > ant publish27 **28 **29 -->30 2 <project name="imagery-xml-bounds" default="dist" basedir="."> 31 3 <!-- enter the SVN commit message --> 32 4 <property name="commit.message" value="Commit message"/> 33 5 <!-- enter the *lowest* JOSM version this plugin is currently compatible with --> 34 <property name="plugin.main.version" value="5 459"/>6 <property name="plugin.main.version" value="5821"/> 35 7 36 8 <!-- Configure these properties (replace "..." accordingly). … … 42 14 <property name="plugin.icon" value="images/xml_24.png"/> 43 15 <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="..."/>-->47 16 48 17 <!-- ** 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 18 18 import org.openstreetmap.josm.Main; 19 19 import org.openstreetmap.josm.actions.ExtensionFileFilter; 20 import org.openstreetmap.josm.data.Version;21 20 import org.openstreetmap.josm.data.osm.DataSet; 22 21 import org.openstreetmap.josm.gui.MapFrame; … … 24 23 import org.openstreetmap.josm.plugins.Plugin; 25 24 import org.openstreetmap.josm.plugins.PluginInformation; 26 import org.openstreetmap.josm.plugins.imageryxmlbounds.actions.ShowBoundsListAction; 27 import org.openstreetmap.josm.plugins.imageryxmlbounds.actions.ShowBoundsPropertiesAction; 25 import org.openstreetmap.josm.plugins.imageryxmlbounds.actions.ShowBoundsAction; 28 26 import org.openstreetmap.josm.plugins.imageryxmlbounds.actions.ShowBoundsSelectionAction; 29 27 import org.openstreetmap.josm.plugins.imageryxmlbounds.actions.downloadtask.DownloadXmlBoundsTask; … … 46 44 * Action showing bounds of the selected closed ways in Selection dialog 47 45 */ 48 private final ShowBounds ListAction selectionListAction = new ShowBoundsListAction();46 private final ShowBoundsAction selectionListAction = new ShowBoundsAction(); 49 47 50 48 /** 51 49 * Action showing bounds of the selected multipolygons in Properties dialog 52 50 */ 53 private final ShowBounds PropertiesAction propertiesListAction = new ShowBoundsPropertiesAction();51 private final ShowBoundsAction propertiesListAction = new ShowBoundsAction(); 54 52 55 53 /** 56 54 * Action showing bounds of the selected multipolygons in Relations dialog 57 55 */ 58 private final ShowBounds ListAction relationListAction = new ShowBoundsListAction();56 private final ShowBoundsAction relationListAction = new ShowBoundsAction(); 59 57 60 58 /** … … 82 80 Main.toolbar.register(selectionAction); 83 81 // 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); 87 83 } 88 84 … … 102 98 if (newFrame != null) { 103 99 // 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 } 110 117 } 111 118 } -
applications/editors/josm/plugins/imagery-xml-bounds/src/org/openstreetmap/josm/plugins/imageryxmlbounds/actions/ShowBoundsAction.java
r27014 r29461 19 19 import java.awt.Font; 20 20 import java.awt.event.ActionEvent; 21 import java.util.Collection; 21 22 22 23 import javax.swing.Box; … … 27 28 28 29 import org.openstreetmap.josm.Main; 30 import org.openstreetmap.josm.actions.OsmPrimitiveAction; 31 import org.openstreetmap.josm.data.osm.OsmPrimitive; 29 32 import org.openstreetmap.josm.plugins.imageryxmlbounds.XmlBoundsLayer; 30 33 … … 34 37 */ 35 38 @SuppressWarnings("serial") 36 public class ShowBoundsAction extends ComputeBoundsAction {39 public class ShowBoundsAction extends ComputeBoundsAction implements OsmPrimitiveAction { 37 40 38 41 public ShowBoundsAction() { … … 58 61 JOptionPane.showMessageDialog(Main.parent, box, ACTION_NAME, JOptionPane.PLAIN_MESSAGE); 59 62 } 63 64 @Override 65 public void setPrimitives(Collection<? extends OsmPrimitive> primitives) { 66 updateOsmPrimitives(primitives); 67 } 60 68 } -
applications/editors/josm/plugins/tag2link/build.xml
r29440 r29461 1 1 <?xml version="1.0" encoding="utf-8"?> 2 <!--3 ** This is a template build file for a JOSM plugin.4 **5 ** Maintaining versions6 ** ====================7 ** See README.template8 **9 ** Usage10 ** =====11 ** Call "ant help" to get possible build targets.12 **13 -->14 2 <project name="tag2link" default="dist" basedir="."> 15 3 … … 17 5 <property name="commit.message" value="Commit message"/> 18 6 <!-- 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"/> 20 8 21 9 <property name="plugin.author" value="Don-vip & FrViPofm"/> -
applications/editors/josm/plugins/tag2link/src/org/openstreetmap/josm/plugins/tag2link/Tag2LinkPlugin.java
r28599 r29461 74 74 if (newFrame != null) { 75 75 // 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)); 80 80 } else if (oldFrame != null) { 81 81 // Remove listeners from previous frame to avoid memory leaks 82 82 if (oldFrame.selectionListDialog != null) { 83 oldFrame.selectionListDialog. removePopupMenuListener(selectionPopupListener);83 oldFrame.selectionListDialog.getPopupMenuHandler().removeListener(selectionPopupListener); 84 84 } 85 85 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); 88 88 } 89 89 if (oldFrame.relationListDialog != null) { 90 oldFrame.relationListDialog. removePopupMenuListener(relationPopupListener);90 oldFrame.relationListDialog.getPopupMenuHandler().removeListener(relationPopupListener); 91 91 } 92 92 selectionPopupListener = null;
Note:
See TracChangeset
for help on using the changeset viewer.