Changeset 26917 in osm for applications/editors/josm
- Timestamp:
- 2011-10-21T19:34:23+02:00 (13 years ago)
- Location:
- applications/editors/josm/plugins/tag2link
- Files:
-
- 21 added
- 4 edited
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/tag2link/README
r26912 r26917 10 10 11 11 See http://wiki.openstreetmap.org/wiki/JOSM/Plugins/Tag2Link 12 13 The icon has been created by TODO14 12 -
applications/editors/josm/plugins/tag2link/build.xml
r26912 r26917 28 28 ** 29 29 --> 30 <project name=" imagery-xml-bounds" default="dist" basedir=".">30 <project name="tag2link" default="dist" basedir="."> 31 31 <!-- enter the SVN commit message --> 32 32 <property name="commit.message" value="Commit message"/> … … 102 102 <attribute name="fr_Plugin-Description" value="TODO"/> 103 103 <attribute name="Plugin-Early" value="false"/> 104 <attribute name="Plugin-Icon" value="images/tag2link _24.png"/>104 <attribute name="Plugin-Icon" value="images/tag2linkv2_24x24.png"/> 105 105 <attribute name="Plugin-Link" value="http://wiki.openstreetmap.org/wiki/JOSM/Plugins/Tag2Link"/> 106 106 <attribute name="Plugin-Mainversion" value="${plugin.main.version}"/> -
applications/editors/josm/plugins/tag2link/resources/tag2link_sources.xml
r26913 r26917 51 51 <rule> 52 52 <condition k="admin_level" v="8"/> 53 <condition k="ref:INSEE" v="(\p{Digit}{2})(\p{Digit}{3})"/> 54 <link name="View {name} municipality sheet" href="http://www.insee.fr/fr/methodes/nomenclatures/cog/fichecommunale.asp?codedep={v.1}&codecom={v.2}" /> 53 <condition k="ref:INSEE" v="(\p{Digit}{2})(\p{Digit}{3})" id="ref"/> 54 <link name="View {name} municipality sheet" href="http://www.insee.fr/fr/methodes/nomenclatures/cog/fichecommunale.asp?codedep={ref.v.1}&codecom={ref.v.2}" /> 55 55 </rule> 56 56 <rule> 57 57 <condition k="political_division" v="FR:canton"/> 58 <condition k="ref:INSEE" v="(\p{Digit}{2})(\p{Digit}{2})"/> 59 <link name="View {name} map of municipalities" href="http://www.insee.fr/fr/methodes/nomenclatures/cog/carte_comcan.asp?codecan={v}" /> 60 <link name="View {name} list of municipalities" href="http://www.insee.fr/fr/methodes/nomenclatures/cog/comcan.asp?codedep={v.1}&codecan={v.2}" /> 58 <condition k="ref:INSEE" v="(\p{Digit}{2})(\p{Digit}{2})" id="ref"/> 59 <link name="View {name} map of municipalities" href="http://www.insee.fr/fr/methodes/nomenclatures/cog/carte_comcan.asp?codecan={ref.v}" /> 60 <link name="View {name} list of municipalities" href="http://www.insee.fr/fr/methodes/nomenclatures/cog/comcan.asp?codedep={ref.v.1}&codecan={ref.v.2}" /> 61 61 </rule> 62 62 <rule> 63 63 <condition k="admin_level" v="7"/> 64 <condition k="ref:INSEE" v="(\p{Digit}{2})(\p{Digit}{1})"/> 65 <link name="View {name} map of cantons" href="http://www.insee.fr/fr/methodes/nomenclatures/cog/carte_canarr.asp?codearr={v}" /> 66 <link name="View {name} list of cantons" href="http://www.insee.fr/fr/methodes/nomenclatures/cog/canarr.asp?codedep={v.1}&codearr={v.2}" /> 64 <condition k="ref:INSEE" v="(\p{Digit}{2})(\p{Digit}{1})" id="ref"/> 65 <link name="View {name} map of cantons" href="http://www.insee.fr/fr/methodes/nomenclatures/cog/carte_canarr.asp?codearr={ref.v}" /> 66 <link name="View {name} list of cantons" href="http://www.insee.fr/fr/methodes/nomenclatures/cog/canarr.asp?codedep={ref.v.1}&codearr={ref.v.2}" /> 67 67 </rule> 68 68 <rule> 69 69 <condition k="admin_level" v="6"/> 70 <condition k="ref:INSEE" v="\p{Digit}{2}"/> 71 <link name="View {name} map of arrondissements" href="http://www.insee.fr/fr/methodes/nomenclatures/cog/carte_arrdep.asp?codedep={v}" /> 72 <link name="View {name} list of arrondissements" href="http://www.insee.fr/fr/methodes/nomenclatures/cog/arrdep.asp?codedep={v}" /> 70 <condition k="ref:INSEE" v="\p{Digit}{2}" id="ref"/> 71 <link name="View {name} map of arrondissements" href="http://www.insee.fr/fr/methodes/nomenclatures/cog/carte_arrdep.asp?codedep={ref.v}" /> 72 <link name="View {name} list of arrondissements" href="http://www.insee.fr/fr/methodes/nomenclatures/cog/arrdep.asp?codedep={ref.v}" /> 73 73 </rule> 74 74 <rule> 75 75 <condition k="admin_level" v="4"/> 76 <condition k="ref:INSEE" v="\p{Digit}{2}"/> 77 <link name="View {name} map of departments" href="http://www.insee.fr/fr/methodes/nomenclatures/cog/carte_depreg.asp?codereg={v}" /> 78 <link name="View {name} list of departments" href="http://www.insee.fr/fr/methodes/nomenclatures/cog/depreg.asp?codereg={v}" /> 76 <condition k="ref:INSEE" v="\p{Digit}{2}" id="ref"/> 77 <link name="View {name} map of departments" href="http://www.insee.fr/fr/methodes/nomenclatures/cog/carte_depreg.asp?codereg={ref.v}" /> 78 <link name="View {name} list of departments" href="http://www.insee.fr/fr/methodes/nomenclatures/cog/depreg.asp?codereg={ref.v}" /> 79 79 </rule> 80 80 <rule> -
applications/editors/josm/plugins/tag2link/src/org/openstreetmap/josm/plugins/tag2link/Tag2LinkConstants.java
r26912 r26917 16 16 package org.openstreetmap.josm.plugins.tag2link; 17 17 18 import javax.swing.ImageIcon;19 20 import org.openstreetmap.josm.tools.ImageProvider;21 22 18 /** 23 * Main constants of JOSM Imagery XML Boundsplugin.19 * Main constants of JOSM tag2link plugin. 24 20 * @author Don-vip 25 21 * … … 30 26 * XML Schema 31 27 */ 32 public static final String XML_LOCATION = "resource ://data/tag2link_sources.xml";28 public static final String XML_LOCATION = "/resources/tag2link_sources.xml"; 33 29 34 /**35 * XML tags36 */37 // TODO38 39 30 /** 40 31 * File encoding. … … 45 36 * Plugin icons. 46 37 */ 47 public static ImageIconICON_16 =ImageProvider.get("tag2link_16.png");48 public static ImageIconICON_24 =ImageProvider.get("tag2link_24.png");49 public static ImageIconICON_48 =ImageProvider.get("tag2link_48.png");38 public static String ICON_16 = "tag2linkv2_16x16.png"; 39 public static String ICON_24 = "tag2linkv2_24x24.png"; 40 public static String ICON_48 = "tag2linkv2_48x48.png"; 50 41 } -
applications/editors/josm/plugins/tag2link/src/org/openstreetmap/josm/plugins/tag2link/Tag2LinkPlugin.java
r26912 r26917 16 16 package org.openstreetmap.josm.plugins.tag2link; 17 17 18 import org.openstreetmap.josm.gui.MapFrame; 19 import org.openstreetmap.josm.gui.preferences.PreferenceSetting; 18 20 import org.openstreetmap.josm.plugins.Plugin; 19 21 import org.openstreetmap.josm.plugins.PluginInformation; 22 import org.openstreetmap.josm.plugins.tag2link.listeners.MembershipPopupListener; 23 import org.openstreetmap.josm.plugins.tag2link.listeners.PropertyPopupListener; 24 import org.openstreetmap.josm.plugins.tag2link.listeners.RelationPopupListener; 25 import org.openstreetmap.josm.plugins.tag2link.listeners.SelectionPopupListener; 20 26 21 27 /** … … 28 34 public class Tag2LinkPlugin extends Plugin { 29 35 36 private Tag2LinkPreferenceSetting preferenceSetting; 37 30 38 /** 31 39 * Initializes the plugin. … … 34 42 public Tag2LinkPlugin(PluginInformation info) { 35 43 super(info); 44 this.preferenceSetting = new Tag2LinkPreferenceSetting(); 45 Tag2LinkRuleChecker.init(); 36 46 } 47 48 /* (non-Javadoc) 49 * @see org.openstreetmap.josm.plugins.Plugin#getPreferenceSetting() 50 */ 51 @Override 52 public PreferenceSetting getPreferenceSetting() { 53 return this.preferenceSetting; 54 } 55 56 /* (non-Javadoc) 57 * @see org.openstreetmap.josm.plugins.Plugin#mapFrameInitialized(org.openstreetmap.josm.gui.MapFrame, org.openstreetmap.josm.gui.MapFrame) 58 */ 59 @Override 60 public void mapFrameInitialized(MapFrame oldFrame, MapFrame newFrame) { 61 if (newFrame != null) { 62 // Initialize dialogs listeners only after the main frame is created 63 newFrame.selectionListDialog.addPopupMenuListener(new SelectionPopupListener(newFrame)); 64 newFrame.propertiesDialog.addMembershipPopupMenuListener(new MembershipPopupListener(newFrame)); 65 newFrame.propertiesDialog.addPropertyPopupMenuListener(new PropertyPopupListener(newFrame)); 66 newFrame.relationListDialog.addPopupMenuListener(new RelationPopupListener(newFrame)); 67 } 68 } 37 69 }
Note:
See TracChangeset
for help on using the changeset viewer.