Changeset 32395 in osm for applications/editors/josm/plugins/reltoolbox/src/relcontext/actions/RelationHelpAction.java
- Timestamp:
- 2016-06-24T09:10:57+02:00 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/reltoolbox/src/relcontext/actions/RelationHelpAction.java
r30737 r32395 1 // License: GPL. For details, see LICENSE file. 1 2 package relcontext.actions; 2 3 3 4 import static org.openstreetmap.josm.tools.I18n.tr; 5 4 6 import java.awt.event.ActionEvent; 5 7 import java.net.HttpURLConnection; … … 8 10 import java.util.ArrayList; 9 11 import java.util.List; 12 10 13 import javax.swing.AbstractAction; 14 11 15 import org.openstreetmap.josm.Main; 12 16 import org.openstreetmap.josm.data.osm.Relation; … … 14 18 import org.openstreetmap.josm.tools.LanguageInfo; 15 19 import org.openstreetmap.josm.tools.OpenBrowser; 20 16 21 import relcontext.ChosenRelation; 17 22 import relcontext.ChosenRelationListener; … … 20 25 private ChosenRelation rel; 21 26 22 public RelationHelpAction( ChosenRelation rel) {27 public RelationHelpAction(ChosenRelation rel) { 23 28 super(); 24 29 putValue(NAME, tr("Open relation wiki page")); … … 30 35 } 31 36 32 public void chosenRelationChanged( Relation oldRelation, Relation newRelation ) { 37 @Override 38 public void chosenRelationChanged(Relation oldRelation, Relation newRelation) { 33 39 setEnabled(newRelation != null); 34 40 } … … 37 43 * Copypasted from {@link org.openstreetmap.josm.gui.dialogs.properties.PropertiesDialog.HelpAction}. 38 44 */ 39 public void actionPerformed( ActionEvent e ) { 40 if( rel.get() == null ) 45 @Override 46 public void actionPerformed(ActionEvent e) { 47 if (rel.get() == null ) 41 48 return; 42 49 try { … … 55 62 56 63 Main.worker.execute(new Runnable(){ 64 @Override 57 65 public void run() { 58 66 try { … … 73 81 .replace("=", "%3D") /* do not URLencode whole string! */ 74 82 .replaceFirst("/wiki/", "/w/index.php?redirect=no&title=") 75 ).toURL().openConnection();83 ).toURL().openConnection(); 76 84 conn.setConnectTimeout(5000); 77 85
Note:
See TracChangeset
for help on using the changeset viewer.