252 long tm = System.currentTimeMillis(); 253 254 ListBuffer<String> javaNames = new ListBuffer<String>(); 255 256 // Preprocess @file arguments 257 try { 258 argv = CommandLine.parse(argv); 259 } catch (FileNotFoundException e) { 260 messager.error(Messager.NOPOS, "main.cant.read", e.getMessage()); 261 exit(); 262 } catch (IOException e) { 263 e.printStackTrace(System.err); 264 exit(); 265 } 266 267 268 JavaFileManager fileManager = context.get(JavaFileManager.class); 269 setDocletInvoker(docletClass, fileManager, argv); 270 271 compOpts = Options.instance(context); 272 273 // Parse arguments 274 for (int i = 0 ; i < argv.length ; i++) { 275 String arg = argv[i]; 276 277 ToolOption o = ToolOption.get(arg); 278 if (o != null) { 279 // hack: this restriction should be removed 280 if (o == ToolOption.LOCALE && i > 0) 281 usageError("main.locale_first"); 282 283 if (o.hasArg) { 284 oneArg(argv, i++); 285 o.process(this, argv[i]); 286 } else { 287 setOption(arg); 288 o.process(this); 289 } 290 291 } else if (arg.startsWith("-XD")) { | 252 long tm = System.currentTimeMillis(); 253 254 ListBuffer<String> javaNames = new ListBuffer<String>(); 255 256 // Preprocess @file arguments 257 try { 258 argv = CommandLine.parse(argv); 259 } catch (FileNotFoundException e) { 260 messager.error(Messager.NOPOS, "main.cant.read", e.getMessage()); 261 exit(); 262 } catch (IOException e) { 263 e.printStackTrace(System.err); 264 exit(); 265 } 266 267 268 JavaFileManager fileManager = context.get(JavaFileManager.class); 269 setDocletInvoker(docletClass, fileManager, argv); 270 271 compOpts = Options.instance(context); 272 // Make sure no obsolete source/target messages are reported 273 compOpts.put("-Xlint:-options", "-Xlint:-options"); 274 275 // Parse arguments 276 for (int i = 0 ; i < argv.length ; i++) { 277 String arg = argv[i]; 278 279 ToolOption o = ToolOption.get(arg); 280 if (o != null) { 281 // hack: this restriction should be removed 282 if (o == ToolOption.LOCALE && i > 0) 283 usageError("main.locale_first"); 284 285 if (o.hasArg) { 286 oneArg(argv, i++); 287 o.process(this, argv[i]); 288 } else { 289 setOption(arg); 290 o.process(this); 291 } 292 293 } else if (arg.startsWith("-XD")) { |