Changeset 6108 in josm
- Timestamp:
- 2013-08-03T02:24:38+02:00 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/MainApplication.java
r6084 r6108 229 229 I18n.init(); 230 230 Main.checkJava6(); 231 Main.pref = new Preferences();232 233 Policy.setPolicy(new Policy() {234 // Permissions for plug-ins loaded when josm is started via webstart235 private PermissionCollection pc;236 237 {238 pc = new Permissions();239 pc.add(new AllPermission());240 }241 242 @Override243 public void refresh() { }244 245 @Override246 public PermissionCollection getPermissions(CodeSource codesource) {247 return pc;248 }249 });250 251 Thread.setDefaultUncaughtExceptionHandler(new BugReportExceptionHandler());252 // http://stuffthathappens.com/blog/2007/10/15/one-more-note-on-uncaught-exception-handlers/253 System.setProperty("sun.awt.exception.handler", BugReportExceptionHandler.class.getName());254 255 // initialize the platform hook, and256 Main.determinePlatformHook();257 // call the really early hook before we do anything else258 Main.platform.preStartupHook();259 231 260 232 // construct argument table … … 265 237 System.exit(1); 266 238 } 239 240 final boolean languageGiven = args.containsKey(Option.LANGUAGE); 241 242 if (languageGiven) { 243 I18n.set(args.get(Option.LANGUAGE).iterator().next()); 244 } 245 246 Main.pref = new Preferences(); 247 248 Policy.setPolicy(new Policy() { 249 // Permissions for plug-ins loaded when josm is started via webstart 250 private PermissionCollection pc; 251 252 { 253 pc = new Permissions(); 254 pc.add(new AllPermission()); 255 } 256 257 @Override 258 public void refresh() { } 259 260 @Override 261 public PermissionCollection getPermissions(CodeSource codesource) { 262 return pc; 263 } 264 }); 265 266 Thread.setDefaultUncaughtExceptionHandler(new BugReportExceptionHandler()); 267 // http://stuffthathappens.com/blog/2007/10/15/one-more-note-on-uncaught-exception-handlers/ 268 System.setProperty("sun.awt.exception.handler", BugReportExceptionHandler.class.getName()); 269 270 // initialize the platform hook, and 271 Main.determinePlatformHook(); 272 // call the really early hook before we do anything else 273 Main.platform.preStartupHook(); 267 274 268 275 Main.commandLineArgs = argArray; 269 276 270 277 if (args.containsKey(Option.VERSION)) { 271 278 System.out.println(Version.getInstance().getAgentString()); 272 279 System.exit(0); 273 } //else { 274 // System.out.println(Version.getInstance().getReleaseAttributes()); 275 //} 280 } 276 281 277 282 Main.pref.init(args.containsKey(Option.RESET_PREFERENCES)); 278 283 279 // Check if passed as parameter 280 if (args.containsKey(Option.LANGUAGE)) { 281 I18n.set(args.get(Option.LANGUAGE).iterator().next()); 282 } else { 284 if (!languageGiven) { 283 285 I18n.set(Main.pref.get("language", null)); 284 286 }
Note:
See TracChangeset
for help on using the changeset viewer.