source: josm/trunk/src/org/openstreetmap/josm/gui/MainApplication.java@ 10909

Last change on this file since 10909 was 10909, checked in by michael2402, 8 years ago

See #13318. MainApplication: Make log message for log level display the level.

  • Property svn:eol-style set to native
File size: 25.3 KB
Line 
1// License: GPL. For details, see LICENSE file.
2package org.openstreetmap.josm.gui;
3
4import static org.openstreetmap.josm.tools.I18n.tr;
5import static org.openstreetmap.josm.tools.I18n.trn;
6
7import java.awt.Dimension;
8import java.io.File;
9import java.io.IOException;
10import java.io.InputStream;
11import java.net.Authenticator;
12import java.net.Inet6Address;
13import java.net.InetAddress;
14import java.net.InetSocketAddress;
15import java.net.ProxySelector;
16import java.net.Socket;
17import java.net.URL;
18import java.security.AllPermission;
19import java.security.CodeSource;
20import java.security.GeneralSecurityException;
21import java.security.KeyStoreException;
22import java.security.NoSuchAlgorithmException;
23import java.security.PermissionCollection;
24import java.security.Permissions;
25import java.security.Policy;
26import java.security.cert.CertificateException;
27import java.util.Arrays;
28import java.util.Collection;
29import java.util.List;
30import java.util.Locale;
31import java.util.Optional;
32import java.util.Set;
33import java.util.TreeSet;
34import java.util.logging.Level;
35
36import javax.swing.JOptionPane;
37import javax.swing.RepaintManager;
38import javax.swing.SwingUtilities;
39
40import org.jdesktop.swinghelper.debug.CheckThreadViolationRepaintManager;
41import org.openstreetmap.josm.Main;
42import org.openstreetmap.josm.actions.PreferencesAction;
43import org.openstreetmap.josm.actions.RestartAction;
44import org.openstreetmap.josm.data.AutosaveTask;
45import org.openstreetmap.josm.data.CustomConfigurator;
46import org.openstreetmap.josm.data.Version;
47import org.openstreetmap.josm.gui.ProgramArguments.Option;
48import org.openstreetmap.josm.gui.SplashScreen.SplashProgressMonitor;
49import org.openstreetmap.josm.gui.download.DownloadDialog;
50import org.openstreetmap.josm.gui.preferences.server.OAuthAccessTokenHolder;
51import org.openstreetmap.josm.gui.preferences.server.ProxyPreference;
52import org.openstreetmap.josm.gui.util.GuiHelper;
53import org.openstreetmap.josm.io.CertificateAmendment;
54import org.openstreetmap.josm.io.DefaultProxySelector;
55import org.openstreetmap.josm.io.MessageNotifier;
56import org.openstreetmap.josm.io.OnlineResource;
57import org.openstreetmap.josm.io.auth.CredentialsManager;
58import org.openstreetmap.josm.io.auth.DefaultAuthenticator;
59import org.openstreetmap.josm.io.remotecontrol.RemoteControl;
60import org.openstreetmap.josm.plugins.PluginHandler;
61import org.openstreetmap.josm.plugins.PluginInformation;
62import org.openstreetmap.josm.tools.FontsManager;
63import org.openstreetmap.josm.tools.HttpClient;
64import org.openstreetmap.josm.tools.I18n;
65import org.openstreetmap.josm.tools.Logging;
66import org.openstreetmap.josm.tools.OsmUrlToBounds;
67import org.openstreetmap.josm.tools.PlatformHookWindows;
68import org.openstreetmap.josm.tools.Utils;
69import org.openstreetmap.josm.tools.WindowGeometry;
70import org.openstreetmap.josm.tools.bugreport.BugReport;
71import org.openstreetmap.josm.tools.bugreport.BugReportExceptionHandler;
72
73/**
74 * Main window class application.
75 *
76 * @author imi
77 */
78public class MainApplication extends Main {
79
80 private MainFrame mainFrame;
81
82 /**
83 * Constructs a new {@code MainApplication} without a window.
84 */
85 public MainApplication() {
86 // Allow subclassing (see JOSM.java)
87 this(null);
88 }
89
90 /**
91 * Constructs a main frame, ready sized and operating. Does not display the frame.
92 * @param mainFrame The main JFrame of the application
93 * @since 10340
94 */
95 public MainApplication(MainFrame mainFrame) {
96 this.mainFrame = mainFrame;
97 }
98
99 @Override
100 protected void initializeMainWindow() {
101 mainPanel.reAddListeners();
102 if (mainFrame != null) {
103 mainFrame.initialize();
104
105 menu = mainFrame.getMenu();
106 } else {
107 // required for running some tests.
108 menu = new MainMenu();
109 }
110 }
111
112 @Override
113 protected void shutdown() {
114 mainFrame.storeState();
115 super.shutdown();
116 }
117
118 /**
119 * Displays help on the console
120 * @since 2748
121 */
122 public static void showHelp() {
123 // TODO: put in a platformHook for system that have no console by default
124 System.out.println(tr("Java OpenStreetMap Editor")+" ["
125 +Version.getInstance().getAgentString()+"]\n\n"+
126 tr("usage")+":\n"+
127 "\tjava -jar josm.jar <options>...\n\n"+
128 tr("options")+":\n"+
129 "\t--help|-h "+tr("Show this help")+'\n'+
130 "\t--geometry=widthxheight(+|-)x(+|-)y "+tr("Standard unix geometry argument")+'\n'+
131 "\t[--download=]minlat,minlon,maxlat,maxlon "+tr("Download the bounding box")+'\n'+
132 "\t[--download=]<URL> "+tr("Download the location at the URL (with lat=x&lon=y&zoom=z)")+'\n'+
133 "\t[--download=]<filename> "+tr("Open a file (any file type that can be opened with File/Open)")+'\n'+
134 "\t--downloadgps=minlat,minlon,maxlat,maxlon "+tr("Download the bounding box as raw GPS")+'\n'+
135 "\t--downloadgps=<URL> "+tr("Download the location at the URL (with lat=x&lon=y&zoom=z) as raw GPS")+'\n'+
136 "\t--selection=<searchstring> "+tr("Select with the given search")+'\n'+
137 "\t--[no-]maximize "+tr("Launch in maximized mode")+'\n'+
138 "\t--reset-preferences "+tr("Reset the preferences to default")+"\n\n"+
139 "\t--load-preferences=<url-to-xml> "+tr("Changes preferences according to the XML file")+"\n\n"+
140 "\t--set=<key>=<value> "+tr("Set preference key to value")+"\n\n"+
141 "\t--language=<language> "+tr("Set the language")+"\n\n"+
142 "\t--version "+tr("Displays the JOSM version and exits")+"\n\n"+
143 "\t--debug "+tr("Print debugging messages to console")+"\n\n"+
144 "\t--skip-plugins "+tr("Skip loading plugins")+"\n\n"+
145 "\t--offline=<osm_api|josm_website|all> "+tr("Disable access to the given resource(s), separated by comma")+"\n\n"+
146 tr("options provided as Java system properties")+":\n"+
147 // CHECKSTYLE.OFF: SingleSpaceSeparator
148 "\t-Djosm.pref=" +tr("/PATH/TO/JOSM/PREF ")+tr("Set the preferences directory")+"\n\n"+
149 "\t-Djosm.userdata="+tr("/PATH/TO/JOSM/USERDATA")+tr("Set the user data directory")+"\n\n"+
150 "\t-Djosm.cache=" +tr("/PATH/TO/JOSM/CACHE ")+tr("Set the cache directory")+"\n\n"+
151 "\t-Djosm.home=" +tr("/PATH/TO/JOSM/HOMEDIR ")+
152 // CHECKSTYLE.ON: SingleSpaceSeparator
153 tr("Relocate all 3 directories to homedir. Cache directory will be in homedir/cache")+"\n\n"+
154 tr("-Djosm.home has lower precedence, i.e. the specific setting overrides the general one")+"\n\n"+
155 tr("note: For some tasks, JOSM needs a lot of memory. It can be necessary to add the following\n" +
156 " Java option to specify the maximum size of allocated memory in megabytes")+":\n"+
157 "\t-Xmx...m\n\n"+
158 tr("examples")+":\n"+
159 "\tjava -jar josm.jar track1.gpx track2.gpx london.osm\n"+
160 "\tjava -jar josm.jar "+OsmUrlToBounds.getURL(43.2, 11.1, 13)+'\n'+
161 "\tjava -jar josm.jar london.osm --selection=http://www.ostertag.name/osm/OSM_errors_node-duplicate.xml\n"+
162 "\tjava -jar josm.jar 43.2,11.1,43.4,11.4\n"+
163 "\tjava -Djosm.pref=$XDG_CONFIG_HOME -Djosm.userdata=$XDG_DATA_HOME -Djosm.cache=$XDG_CACHE_HOME -jar josm.jar\n"+
164 "\tjava -Djosm.home=/home/user/.josm_dev -jar josm.jar\n"+
165 "\tjava -Xmx1024m -jar josm.jar\n\n"+
166 tr("Parameters --download, --downloadgps, and --selection are processed in this order.")+'\n'+
167 tr("Make sure you load some data if you use --selection.")+'\n'
168 );
169 }
170
171 /**
172 * Main application Startup
173 * @param argArray Command-line arguments
174 */
175 public static void main(final String[] argArray) {
176 I18n.init();
177
178 // construct argument table
179 ProgramArguments args = null;
180 try {
181 args = new ProgramArguments(argArray);
182 } catch (IllegalArgumentException e) {
183 System.exit(1);
184 return;
185 }
186
187 Level logLevel = args.getLogLevel();
188 Logging.setLogLevel(logLevel);
189 Main.info(tr("Log level is at {0} ({1}, {2})", logLevel.getLocalizedName(), logLevel.getName(), logLevel.intValue()));
190
191 Optional<String> language = args.getSingle(Option.LANGUAGE);
192 I18n.set(language.orElse(null));
193
194 Policy.setPolicy(new Policy() {
195 // Permissions for plug-ins loaded when josm is started via webstart
196 private PermissionCollection pc;
197
198 {
199 pc = new Permissions();
200 pc.add(new AllPermission());
201 }
202
203 @Override
204 public PermissionCollection getPermissions(CodeSource codesource) {
205 return pc;
206 }
207 });
208
209 Thread.setDefaultUncaughtExceptionHandler(new BugReportExceptionHandler());
210
211 // initialize the platform hook, and
212 Main.determinePlatformHook();
213 // call the really early hook before we do anything else
214 Main.platform.preStartupHook();
215
216 Main.COMMAND_LINE_ARGS.addAll(Arrays.asList(argArray));
217
218 if (args.showVersion()) {
219 System.out.println(Version.getInstance().getAgentString());
220 System.exit(0);
221 } else if (args.showHelp()) {
222 showHelp();
223 System.exit(0);
224 }
225
226 boolean skipLoadingPlugins = args.hasOption(Option.SKIP_PLUGINS);
227 if (skipLoadingPlugins) {
228 Main.info(tr("Plugin loading skipped"));
229 }
230
231 if (Logging.isLoggingEnabled(Logging.LEVEL_TRACE)) {
232 // Enable debug in OAuth signpost via system preference, but only at trace level
233 Utils.updateSystemProperty("debug", "true");
234 Main.info(tr("Enabled detailed debug level (trace)"));
235 }
236
237 Main.pref.init(args.hasOption(Option.RESET_PREFERENCES));
238
239 args.getPreferencesToSet().forEach(Main.pref::put);
240
241 if (!language.isPresent()) {
242 I18n.set(Main.pref.get("language", null));
243 }
244 Main.pref.updateSystemProperties();
245
246 checkIPv6();
247
248 // asking for help? show help and exit
249 if (args.hasOption(Option.HELP)) {
250 showHelp();
251 System.exit(0);
252 }
253
254 processOffline(args);
255
256 Main.platform.afterPrefStartupHook();
257
258 FontsManager.initialize();
259
260 I18n.setupLanguageFonts();
261
262 WindowGeometry geometry = WindowGeometry.mainWindow("gui.geometry",
263 args.getSingle(Option.GEOMETRY).orElse(null),
264 !args.hasOption(Option.NO_MAXIMIZE) && Main.pref.getBoolean("gui.maximized", false));
265 final MainFrame mainFrame = new MainFrame(contentPanePrivate, mainPanel, geometry);
266 Main.parent = mainFrame;
267
268 if (args.hasOption(Option.LOAD_PREFERENCES)) {
269 CustomConfigurator.XMLCommandProcessor config = new CustomConfigurator.XMLCommandProcessor(Main.pref);
270 for (String i : args.get(Option.LOAD_PREFERENCES)) {
271 info("Reading preferences from " + i);
272 try (InputStream is = HttpClient.create(new URL(i)).connect().getContent()) {
273 config.openAndReadXML(is);
274 } catch (IOException ex) {
275 throw BugReport.intercept(ex).put("file", i);
276 }
277 }
278 }
279
280 try {
281 CertificateAmendment.addMissingCertificates();
282 } catch (IOException | GeneralSecurityException ex) {
283 Main.warn(ex);
284 Main.warn(getErrorMessage(Utils.getRootCause(ex)));
285 }
286 Authenticator.setDefault(DefaultAuthenticator.getInstance());
287 DefaultProxySelector proxySelector = new DefaultProxySelector(ProxySelector.getDefault());
288 ProxySelector.setDefault(proxySelector);
289 OAuthAccessTokenHolder.getInstance().init(Main.pref, CredentialsManager.getInstance());
290
291 final SplashScreen splash = GuiHelper.runInEDTAndWaitAndReturn(SplashScreen::new);
292 final SplashScreen.SplashProgressMonitor monitor = splash.getProgressMonitor();
293 monitor.beginTask(tr("Initializing"));
294 GuiHelper.runInEDT(() -> splash.setVisible(Main.pref.getBoolean("draw.splashscreen", true)));
295 Main.setInitStatusListener(new InitStatusListener() {
296
297 @Override
298 public Object updateStatus(String event) {
299 monitor.beginTask(event);
300 return event;
301 }
302
303 @Override
304 public void finish(Object status) {
305 if (status instanceof String) {
306 monitor.finishTask((String) status);
307 }
308 }
309 });
310
311 Collection<PluginInformation> pluginsToLoad = null;
312
313 if (!skipLoadingPlugins) {
314 pluginsToLoad = updateAndLoadEarlyPlugins(splash, monitor);
315 }
316
317 monitor.indeterminateSubTask(tr("Setting defaults"));
318 preConstructorInit(args);
319
320 monitor.indeterminateSubTask(tr("Creating main GUI"));
321 final Main main = new MainApplication(mainFrame);
322 main.initialize();
323
324 if (!skipLoadingPlugins) {
325 loadLatePlugins(splash, monitor, pluginsToLoad);
326 }
327
328 // Wait for splash disappearance (fix #9714)
329 GuiHelper.runInEDTAndWait(() -> {
330 splash.setVisible(false);
331 splash.dispose();
332 mainFrame.setVisible(true);
333 });
334
335 Main.MasterWindowListener.setup();
336
337 boolean maximized = Main.pref.getBoolean("gui.maximized", false);
338 if ((!args.hasOption(Option.NO_MAXIMIZE) && maximized) || args.hasOption(Option.MAXIMIZE)) {
339 mainFrame.setMaximized(true);
340 }
341 if (main.menu.fullscreenToggleAction != null) {
342 main.menu.fullscreenToggleAction.initial();
343 }
344
345 SwingUtilities.invokeLater(new GuiFinalizationWorker(args, proxySelector));
346
347 if (Main.isPlatformWindows()) {
348 try {
349 // Check for insecure certificates to remove.
350 // This is Windows-dependant code but it can't go to preStartupHook (need i18n)
351 // neither startupHook (need to be called before remote control)
352 PlatformHookWindows.removeInsecureCertificates();
353 } catch (NoSuchAlgorithmException | CertificateException | KeyStoreException | IOException e) {
354 error(e);
355 }
356 }
357
358 if (RemoteControl.PROP_REMOTECONTROL_ENABLED.get()) {
359 RemoteControl.start();
360 }
361
362 if (MessageNotifier.PROP_NOTIFIER_ENABLED.get()) {
363 MessageNotifier.start();
364 }
365
366 if (Main.pref.getBoolean("debug.edt-checker.enable", Version.getInstance().isLocalBuild())) {
367 // Repaint manager is registered so late for a reason - there is lots of violation during startup process
368 // but they don't seem to break anything and are difficult to fix
369 info("Enabled EDT checker, wrongful access to gui from non EDT thread will be printed to console");
370 RepaintManager.setCurrentManager(new CheckThreadViolationRepaintManager());
371 }
372 }
373
374 static Collection<PluginInformation> updateAndLoadEarlyPlugins(SplashScreen splash, SplashProgressMonitor monitor) {
375 Collection<PluginInformation> pluginsToLoad;
376 pluginsToLoad = PluginHandler.buildListOfPluginsToLoad(splash, monitor.createSubTaskMonitor(1, false));
377 if (!pluginsToLoad.isEmpty() && PluginHandler.checkAndConfirmPluginUpdate(splash)) {
378 monitor.subTask(tr("Updating plugins"));
379 pluginsToLoad = PluginHandler.updatePlugins(splash, null, monitor.createSubTaskMonitor(1, false), false);
380 }
381
382 monitor.indeterminateSubTask(tr("Installing updated plugins"));
383 PluginHandler.installDownloadedPlugins(true);
384
385 monitor.indeterminateSubTask(tr("Loading early plugins"));
386 PluginHandler.loadEarlyPlugins(splash, pluginsToLoad, monitor.createSubTaskMonitor(1, false));
387 return pluginsToLoad;
388 }
389
390 static void loadLatePlugins(SplashScreen splash, SplashProgressMonitor monitor, Collection<PluginInformation> pluginsToLoad) {
391 monitor.indeterminateSubTask(tr("Loading plugins"));
392 PluginHandler.loadLatePlugins(splash, pluginsToLoad, monitor.createSubTaskMonitor(1, false));
393 toolbar.refreshToolbarControl();
394 }
395
396 private static void processOffline(ProgramArguments args) {
397 for (String offlineNames : args.get(Option.OFFLINE)) {
398 for (String s : offlineNames.split(",")) {
399 try {
400 Main.setOffline(OnlineResource.valueOf(s.toUpperCase(Locale.ENGLISH)));
401 } catch (IllegalArgumentException e) {
402 Main.error(e, tr("''{0}'' is not a valid value for argument ''{1}''. Possible values are {2}, possibly delimited by commas.",
403 s.toUpperCase(Locale.ENGLISH), Option.OFFLINE.getName(), Arrays.toString(OnlineResource.values())));
404 System.exit(1);
405 return;
406 }
407 }
408 }
409 Set<OnlineResource> offline = Main.getOfflineResources();
410 if (!offline.isEmpty()) {
411 Main.warn(trn("JOSM is running in offline mode. This resource will not be available: {0}",
412 "JOSM is running in offline mode. These resources will not be available: {0}",
413 offline.size(), offline.size() == 1 ? offline.iterator().next() : Arrays.toString(offline.toArray())));
414 }
415 }
416
417 /**
418 * Check if IPv6 can be safely enabled and do so. Because this cannot be done after network activation,
419 * disabling or enabling IPV6 may only be done with next start.
420 */
421 private static void checkIPv6() {
422 if ("auto".equals(Main.pref.get("prefer.ipv6", "auto"))) {
423 new Thread((Runnable) () -> { /* this may take some time (DNS, Connect) */
424 boolean hasv6 = false;
425 boolean wasv6 = Main.pref.getBoolean("validated.ipv6", false);
426 try {
427 /* Use the check result from last run of the software, as after the test, value
428 changes have no effect anymore */
429 if (wasv6) {
430 Utils.updateSystemProperty("java.net.preferIPv6Addresses", "true");
431 }
432 for (InetAddress a : InetAddress.getAllByName("josm.openstreetmap.de")) {
433 if (a instanceof Inet6Address) {
434 if (a.isReachable(1000)) {
435 /* be sure it REALLY works */
436 Socket s = new Socket();
437 s.connect(new InetSocketAddress(a, 80), 1000);
438 s.close();
439 Utils.updateSystemProperty("java.net.preferIPv6Addresses", "true");
440 if (!wasv6) {
441 Main.info(tr("Detected useable IPv6 network, prefering IPv6 over IPv4 after next restart."));
442 } else {
443 Main.info(tr("Detected useable IPv6 network, prefering IPv6 over IPv4."));
444 }
445 hasv6 = true;
446 }
447 break; /* we're done */
448 }
449 }
450 } catch (IOException | SecurityException e) {
451 if (Main.isDebugEnabled()) {
452 Main.debug("Exception while checking IPv6 connectivity: "+e);
453 }
454 Main.trace(e);
455 }
456 if (wasv6 && !hasv6) {
457 Main.info(tr("Detected no useable IPv6 network, prefering IPv4 over IPv6 after next restart."));
458 Main.pref.put("validated.ipv6", hasv6); // be sure it is stored before the restart!
459 new RestartAction().actionPerformed(null);
460 }
461 Main.pref.put("validated.ipv6", hasv6);
462 }, "IPv6-checker").start();
463 }
464 }
465
466 private static class GuiFinalizationWorker implements Runnable {
467
468 private final ProgramArguments args;
469 private final DefaultProxySelector proxySelector;
470
471 GuiFinalizationWorker(ProgramArguments args, DefaultProxySelector proxySelector) {
472 this.args = args;
473 this.proxySelector = proxySelector;
474 }
475
476 @Override
477 public void run() {
478
479 // Handle proxy/network errors early to inform user he should change settings to be able to use JOSM correctly
480 if (!handleProxyErrors()) {
481 handleNetworkErrors();
482 }
483
484 // Restore autosave layers after crash and start autosave thread
485 handleAutosave();
486
487 // Handle command line instructions
488 postConstructorProcessCmdLine(args);
489
490 // Show download dialog if autostart is enabled
491 DownloadDialog.autostartIfNeeded();
492 }
493
494 private static void handleAutosave() {
495 if (AutosaveTask.PROP_AUTOSAVE_ENABLED.get()) {
496 AutosaveTask autosaveTask = new AutosaveTask();
497 List<File> unsavedLayerFiles = autosaveTask.getUnsavedLayersFiles();
498 if (!unsavedLayerFiles.isEmpty()) {
499 ExtendedDialog dialog = new ExtendedDialog(
500 Main.parent,
501 tr("Unsaved osm data"),
502 new String[] {tr("Restore"), tr("Cancel"), tr("Discard")}
503 );
504 dialog.setContent(
505 trn("JOSM found {0} unsaved osm data layer. ",
506 "JOSM found {0} unsaved osm data layers. ", unsavedLayerFiles.size(), unsavedLayerFiles.size()) +
507 tr("It looks like JOSM crashed last time. Would you like to restore the data?"));
508 dialog.setButtonIcons(new String[] {"ok", "cancel", "dialogs/delete"});
509 int selection = dialog.showDialog().getValue();
510 if (selection == 1) {
511 autosaveTask.recoverUnsavedLayers();
512 } else if (selection == 3) {
513 autosaveTask.discardUnsavedLayers();
514 }
515 }
516 autosaveTask.schedule();
517 }
518 }
519
520 private static boolean handleNetworkOrProxyErrors(boolean hasErrors, String title, String message) {
521 if (hasErrors) {
522 ExtendedDialog ed = new ExtendedDialog(
523 Main.parent, title,
524 new String[]{tr("Change proxy settings"), tr("Cancel")});
525 ed.setButtonIcons(new String[]{"dialogs/settings", "cancel"}).setCancelButton(2);
526 ed.setMinimumSize(new Dimension(460, 260));
527 ed.setIcon(JOptionPane.WARNING_MESSAGE);
528 ed.setContent(message);
529
530 if (ed.showDialog().getValue() == 1) {
531 PreferencesAction.forPreferenceSubTab(null, null, ProxyPreference.class).run();
532 }
533 }
534 return hasErrors;
535 }
536
537 private boolean handleProxyErrors() {
538 return handleNetworkOrProxyErrors(proxySelector.hasErrors(), tr("Proxy errors occurred"),
539 tr("JOSM tried to access the following resources:<br>" +
540 "{0}" +
541 "but <b>failed</b> to do so, because of the following proxy errors:<br>" +
542 "{1}" +
543 "Would you like to change your proxy settings now?",
544 Utils.joinAsHtmlUnorderedList(proxySelector.getErrorResources()),
545 Utils.joinAsHtmlUnorderedList(proxySelector.getErrorMessages())
546 ));
547 }
548
549 private static boolean handleNetworkErrors() {
550 boolean condition = !NETWORK_ERRORS.isEmpty();
551 if (condition) {
552 Set<String> errors = new TreeSet<>();
553 for (Throwable t : NETWORK_ERRORS.values()) {
554 errors.add(t.toString());
555 }
556 return handleNetworkOrProxyErrors(condition, tr("Network errors occurred"),
557 tr("JOSM tried to access the following resources:<br>" +
558 "{0}" +
559 "but <b>failed</b> to do so, because of the following network errors:<br>" +
560 "{1}" +
561 "It may be due to a missing proxy configuration.<br>" +
562 "Would you like to change your proxy settings now?",
563 Utils.joinAsHtmlUnorderedList(NETWORK_ERRORS.keySet()),
564 Utils.joinAsHtmlUnorderedList(errors)
565 ));
566 }
567 return false;
568 }
569 }
570}
Note: See TracBrowser for help on using the repository browser.