Changeset 6143 in josm
- Timestamp:
- 2013-08-11T23:47:22+02:00 (11 years ago)
- Location:
- trunk/src/org/openstreetmap/josm
- Files:
-
- 17 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/Main.java
r6125 r6143 69 69 import org.openstreetmap.josm.gui.NavigatableComponent.ViewportData; 70 70 import org.openstreetmap.josm.gui.dialogs.LayerListDialog; 71 import org.openstreetmap.josm.gui.help.HelpUtil; 71 72 import org.openstreetmap.josm.gui.io.SaveLayersDialog; 72 73 import org.openstreetmap.josm.gui.layer.Layer; … … 101 102 abstract public class Main { 102 103 104 /** 105 * The JOSM website URL. 106 * @since 6143 107 */ 108 public static final String JOSM_WEBSITE = "http://josm.openstreetmap.de"; 109 103 110 /** 104 111 * Replies true if JOSM currently displays a map view. False, if it doesn't, i.e. if … … 922 929 "<li>use an earlier (Java 5 compatible) version of JOSM.</li></ul>"+ 923 930 "More Info:", version)+"</html>"); 924 JTextArea link = new JTextArea( "http://josm.openstreetmap.de/wiki/Help/SystemRequirements");931 JTextArea link = new JTextArea(HelpUtil.getWikiBaseHelpUrl()+"/Help/SystemRequirements"); 925 932 link.setEditable(false); 926 933 link.setBackground(panel.getBackground()); -
trunk/src/org/openstreetmap/josm/actions/AboutAction.java
r6084 r6143 85 85 info.add(GBC.glue(0,10), GBC.eol()); 86 86 info.add(new JLabel(tr("Homepage")), GBC.std().insets(10,0,10,0)); 87 info.add(new UrlLabel( "http://josm.openstreetmap.de",2), GBC.eol().fill(GBC.HORIZONTAL));87 info.add(new UrlLabel(Main.JOSM_WEBSITE,2), GBC.eol().fill(GBC.HORIZONTAL)); 88 88 info.add(GBC.glue(0,5), GBC.eol()); 89 89 info.add(new JLabel(tr("Bug Reports")), GBC.std().insets(10,0,10,0)); -
trunk/src/org/openstreetmap/josm/data/Preferences.java
r6142 r6143 1370 1370 */ 1371 1371 private final static String[] DEFAULT_PLUGIN_SITE = { 1372 "http://josm.openstreetmap.de/plugin%<?plugins=>"};1372 Main.JOSM_WEBSITE+"/plugin%<?plugins=>"}; 1373 1373 1374 1374 /** … … 1612 1612 StringBuilder b = new StringBuilder( 1613 1613 "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n" + 1614 "<preferences xmlns=\" http://josm.openstreetmap.de/preferences-1.0\" version=\""+1614 "<preferences xmlns=\""+Main.JOSM_WEBSITE+"/preferences-1.0\" version=\""+ 1615 1615 Version.getInstance().getVersion() + "\">\n"); 1616 1616 SettingToXml toXml = new SettingToXml(b, nopass); 1617 Map<String, Setting > settings = new TreeMap<String, Setting>();1617 Map<String, Setting<?>> settings = new TreeMap<String, Setting<?>>(); 1618 1618 1619 1619 for (Entry<String, String> e : properties.entrySet()) { … … 1629 1629 settings.put(e.getKey(), new MapListSetting(e.getValue())); 1630 1630 } 1631 for (Entry<String, Setting > e : settings.entrySet()) {1631 for (Entry<String, Setting<?>> e : settings.entrySet()) { 1632 1632 toXml.setKey(e.getKey()); 1633 1633 e.getValue().visit(toXml); -
trunk/src/org/openstreetmap/josm/data/gpx/GpxConstants.java
r5910 r6143 4 4 import java.util.Arrays; 5 5 import java.util.List; 6 7 import org.openstreetmap.josm.Main; 6 8 7 9 /** … … 24 26 public static final String META_EXTENSIONS = META_PREFIX + "extensions"; 25 27 26 public static final String JOSM_EXTENSIONS_NAMESPACE_URI = "http://josm.openstreetmap.de/gpx-extensions-1.0";28 public static final String JOSM_EXTENSIONS_NAMESPACE_URI = Main.JOSM_WEBSITE + "/gpx-extensions-1.0"; 27 29 28 30 public static List<String> WPT_KEYS = Arrays.asList("ele", "time", "magvar", "geoidheight", -
trunk/src/org/openstreetmap/josm/data/imagery/ImageryLayerInfo.java
r6093 r6143 27 27 28 28 private final static String[] DEFAULT_LAYER_SITES = { 29 "http://josm.openstreetmap.de/maps"29 Main.JOSM_WEBSITE+"/maps" 30 30 }; 31 31 -
trunk/src/org/openstreetmap/josm/gui/GettingStarted.java
r6084 r6143 152 152 153 153 private String fixImageLinks(String s) { 154 Matcher m = Pattern.compile("src=\" http://josm.openstreetmap.de/browser/trunk(/images/.*?\\.png)\\?format=raw\"").matcher(s);154 Matcher m = Pattern.compile("src=\""+Main.JOSM_WEBSITE+"/browser/trunk(/images/.*?\\.png)\\?format=raw\"").matcher(s); 155 155 StringBuffer sb = new StringBuffer(); 156 156 while (m.find()) { -
trunk/src/org/openstreetmap/josm/gui/MainApplication.java
r6125 r6143 92 92 /** 93 93 * Displays help on the console 94 * 94 * @since 2748 95 95 */ 96 96 public static void showHelp() { … … 132 132 } 133 133 134 /** 135 * JOSM command line options. 136 * @see <a href="http://josm.openstreetmap.de/wiki/Help/CommandLineOptions">Help/CommandLineOptions</a> 137 * @since 5279 138 */ 134 139 public enum Option { 140 /** --help|-h Show this help */ 135 141 HELP(false), 142 /** --version Displays the JOSM version and exits */ 136 143 VERSION(false), 144 /** --language=<language> Set the language */ 137 145 LANGUAGE(true), 146 /** --reset-preferences Reset the preferences to default */ 138 147 RESET_PREFERENCES(false), 148 /** --load-preferences=<url-to-xml> Changes preferences according to the XML file */ 139 149 LOAD_PREFERENCES(true), 150 /** --set=<key>=<value> Set preference key to value */ 140 151 SET(true), 152 /** --geometry=widthxheight(+|-)x(+|-)y Standard unix geometry argument */ 141 153 GEOMETRY(true), 154 /** --no-maximize Do not launch in maximized mode */ 142 155 NO_MAXIMIZE(false), 156 /** --maximize Launch in maximized mode */ 143 157 MAXIMIZE(false), 158 /** --download=minlat,minlon,maxlat,maxlon Download the bounding box <br> 159 * --download=<URL> Download the location at the URL (with lat=x&lon=y&zoom=z) <br> 160 * --download=<filename> Open a file (any file type that can be opened with File/Open) */ 144 161 DOWNLOAD(true), 162 /** --downloadgps=minlat,minlon,maxlat,maxlon Download the bounding box as raw GPS <br> 163 * --downloadgps=<URL> Download the location at the URL (with lat=x&lon=y&zoom=z) as raw GPS */ 145 164 DOWNLOADGPS(true), 165 /** --selection=<searchstring> Select with the given search */ 146 166 SELECTION(true); 147 167 … … 154 174 } 155 175 176 /** 177 * Replies the option name 178 * @return The option name, in lowercase 179 */ 156 180 public String getName() { 157 181 return name; 158 182 } 159 183 184 /** 185 * Determines if this option requires an argument. 186 * @return {@code true} if this option requires an argument, {@code false} otherwise 187 */ 160 188 public boolean requiresArgument() { 161 189 return requiresArgument; -
trunk/src/org/openstreetmap/josm/gui/help/HelpUtil.java
r5916 r6143 24 24 */ 25 25 static public String getWikiBaseUrl() { 26 return Main.pref.get("help.baseurl", "http://josm.openstreetmap.de");26 return Main.pref.get("help.baseurl", Main.JOSM_WEBSITE); 27 27 } 28 28 -
trunk/src/org/openstreetmap/josm/gui/layer/WMSLayer.java
r6104 r6143 787 787 public void actionPerformed(ActionEvent ev) { 788 788 // Delete small files, because they're probably blank tiles. 789 // See https://josm.openstreetmap.de/ticket/2307789 // See #2307 790 790 cache.cleanSmallFiles(4096); 791 791 -
trunk/src/org/openstreetmap/josm/gui/mappaint/xml/XmlStyleSource.java
r6084 r6143 71 71 XmlObjectParser parser = new XmlObjectParser(new XmlStyleSourceHandler(this)); 72 72 parser.startWithValidation(reader, 73 "http://josm.openstreetmap.de/mappaint-style-1.0",73 Main.JOSM_WEBSITE+"/mappaint-style-1.0", 74 74 "resource://data/mappaint-style.xsd"); 75 75 while(parser.hasNext()) { -
trunk/src/org/openstreetmap/josm/gui/preferences/map/MapPaintPreference.java
r6084 r6143 89 89 90 90 public MapPaintSourceEditor() { 91 super(true, "http://josm.openstreetmap.de/styles", styleSourceProviders);91 super(true, Main.JOSM_WEBSITE+"/styles", styleSourceProviders); 92 92 } 93 93 -
trunk/src/org/openstreetmap/josm/gui/preferences/map/TaggingPresetPreference.java
r6084 r6143 190 190 191 191 public TaggingPresetSourceEditor() { 192 super(false, "http://josm.openstreetmap.de/presets", presetSourceProviders);192 super(false, Main.JOSM_WEBSITE+"/presets", presetSourceProviders); 193 193 } 194 194 -
trunk/src/org/openstreetmap/josm/gui/tagging/TaggingPresetReader.java
r6139 r6143 75 75 76 76 if (validate) { 77 parser.startWithValidation(in, "http://josm.openstreetmap.de/tagging-preset-1.0", "resource://data/tagging-preset.xsd");77 parser.startWithValidation(in, Main.JOSM_WEBSITE+"/tagging-preset-1.0", "resource://data/tagging-preset.xsd"); 78 78 } else { 79 79 parser.start(in); -
trunk/src/org/openstreetmap/josm/io/remotecontrol/RequestProcessor.java
r6142 r6143 24 24 import java.util.regex.Pattern; 25 25 26 import org.openstreetmap.josm.Main; 27 import org.openstreetmap.josm.gui.help.HelpUtil; 26 28 import org.openstreetmap.josm.io.remotecontrol.handler.AddNodeHandler; 27 29 import org.openstreetmap.josm.io.remotecontrol.handler.AddWayHandler; … … 211 213 if (handlerClass == null) { 212 214 String usage = getUsageAsHtml(); 213 String websiteDoc = "http://josm.openstreetmap.de/wiki/Help/Preferences/RemoteControl";215 String websiteDoc = HelpUtil.getWikiBaseHelpUrl() +"/Help/Preferences/RemoteControl"; 214 216 String help = "No command specified! The following commands are available:<ul>" 215 217 + usage.toString() -
trunk/src/org/openstreetmap/josm/io/remotecontrol/handler/ImportHandler.java
r6091 r6143 53 53 @Override 54 54 public String[] getUsageExamples() { 55 return new String[] { "/import?url http://josm.openstreetmap.de/browser/josm/trunk/data_nodist/direction-arrows.osm" };55 return new String[] { "/import?url="+Main.JOSM_WEBSITE+"/browser/josm/trunk/data_nodist/direction-arrows.osm" }; 56 56 } 57 57 -
trunk/src/org/openstreetmap/josm/tools/BugReportExceptionHandler.java
r6084 r6143 135 135 tr("You have encountered an error in JOSM. Before you file a bug report " + 136 136 "make sure you have updated to the latest version of JOSM here:")), GBC.eol()); 137 p.add(new UrlLabel( "http://josm.openstreetmap.de",2), GBC.eop().insets(8,0,0,0));137 p.add(new UrlLabel(Main.JOSM_WEBSITE,2), GBC.eop().insets(8,0,0,0)); 138 138 p.add(new JMultilineLabel( 139 139 tr("You should also update your plugins. If neither of those help please " + … … 147 147 tr("Alternatively, if that does not work you can manually fill in the information " + 148 148 "below at this URL:")), GBC.eol()); 149 p.add(new UrlLabel( "http://josm.openstreetmap.de/newticket",2), GBC.eop().insets(8,0,0,0));149 p.add(new UrlLabel(Main.JOSM_WEBSITE+"/newticket",2), GBC.eop().insets(8,0,0,0)); 150 150 if (Utils.copyToClipboard(text)) { 151 151 p.add(new JLabel(tr("(The text has already been copied to your clipboard.)")), GBC.eop()); … … 196 196 Utils.close(gzip); 197 197 198 return new URL( "http://josm.openstreetmap.de/josmticket?" +198 return new URL(Main.JOSM_WEBSITE+"/josmticket?" + 199 199 "gdata="+Base64.encode(ByteBuffer.wrap(out.toByteArray()), true)); 200 200 } catch (IOException e) { … … 213 213 URL url = getBugReportUrl(debugText); 214 214 if (url != null) { 215 return new UrlLabel(url.toString(), "http://josm.openstreetmap.de/josmticket?...", 2);215 return new UrlLabel(url.toString(), Main.JOSM_WEBSITE+"/josmticket?...", 2); 216 216 } 217 217 return null; -
trunk/src/org/openstreetmap/josm/tools/WikiReader.java
r5937 r6143 23 23 24 24 public WikiReader() { 25 this.baseurl = Main.pref.get("help.baseurl", "http://josm.openstreetmap.de");25 this.baseurl = Main.pref.get("help.baseurl", Main.JOSM_WEBSITE); 26 26 } 27 27
Note:
See TracChangeset
for help on using the changeset viewer.