equal
deleted
inserted
replaced
43 import com.sun.javadoc.*; |
43 import com.sun.javadoc.*; |
44 import com.sun.tools.javac.file.JavacFileManager; |
44 import com.sun.tools.javac.file.JavacFileManager; |
45 import com.sun.tools.javac.main.CommandLine; |
45 import com.sun.tools.javac.main.CommandLine; |
46 import com.sun.tools.javac.main.Option; |
46 import com.sun.tools.javac.main.Option; |
47 import com.sun.tools.javac.file.BaseFileManager; |
47 import com.sun.tools.javac.file.BaseFileManager; |
|
48 import com.sun.tools.javac.main.OptionHelper; |
|
49 import com.sun.tools.javac.main.OptionHelper.GrumpyHelper; |
48 import com.sun.tools.javac.platform.PlatformDescription; |
50 import com.sun.tools.javac.platform.PlatformDescription; |
49 import com.sun.tools.javac.platform.PlatformUtils; |
51 import com.sun.tools.javac.platform.PlatformUtils; |
50 import com.sun.tools.javac.util.ClientCodeException; |
52 import com.sun.tools.javac.util.ClientCodeException; |
51 import com.sun.tools.javac.util.Context; |
53 import com.sun.tools.javac.util.Context; |
52 import com.sun.tools.javac.util.List; |
54 import com.sun.tools.javac.util.List; |
171 void usage() { |
173 void usage() { |
172 usage(true); |
174 usage(true); |
173 } |
175 } |
174 |
176 |
175 void usage(boolean exit) { |
177 void usage(boolean exit) { |
176 usage("main.usage", "-help", null, exit); |
178 usage("main.usage", "-help", "main.usage.foot", exit); |
177 } |
179 } |
178 |
180 |
179 @Override |
181 @Override |
180 void Xusage() { |
182 void Xusage() { |
181 Xusage(true); |
183 Xusage(true); |
363 } |
365 } |
364 if (fileManager instanceof BaseFileManager) { |
366 if (fileManager instanceof BaseFileManager) { |
365 ((BaseFileManager) fileManager).handleOptions(fileManagerOpts); |
367 ((BaseFileManager) fileManager).handleOptions(fileManagerOpts); |
366 } |
368 } |
367 |
369 |
368 String platformString = compOpts.get("-release"); |
370 String platformString = compOpts.get("--release"); |
369 |
371 |
370 if (platformString != null) { |
372 if (platformString != null) { |
371 if (compOpts.isSet("-source")) { |
373 if (compOpts.isSet("-source")) { |
372 usageError("main.release.bootclasspath.conflict", "-source"); |
374 usageError("main.release.bootclasspath.conflict", "-source"); |
373 } |
375 } |
374 if (fileManagerOpts.containsKey(Option.BOOTCLASSPATH)) { |
376 if (fileManagerOpts.containsKey(Option.BOOT_CLASS_PATH)) { |
375 usageError("main.release.bootclasspath.conflict", Option.BOOTCLASSPATH.getText()); |
377 usageError("main.release.bootclasspath.conflict", Option.BOOT_CLASS_PATH.getPrimaryName()); |
376 } |
378 } |
377 |
379 |
378 PlatformDescription platformDescription = |
380 PlatformDescription platformDescription = |
379 PlatformUtils.lookupPlatformDescription(platformString); |
381 PlatformUtils.lookupPlatformDescription(platformString); |
380 |
382 |
553 for (List<String> i = arguments; i.nonEmpty(); i=i.tail) { |
555 for (List<String> i = arguments; i.nonEmpty(); i=i.tail) { |
554 args[k++] = i.head; |
556 args[k++] = i.head; |
555 } |
557 } |
556 options.append(args); |
558 options.append(args); |
557 } |
559 } |
|
560 |
|
561 @Override |
|
562 OptionHelper getOptionHelper() { |
|
563 return new GrumpyHelper(null) { |
|
564 @Override |
|
565 public String get(com.sun.tools.javac.main.Option option) { |
|
566 return compOpts.get(option); |
|
567 } |
|
568 |
|
569 @Override |
|
570 public void put(String name, String value) { |
|
571 compOpts.put(name, value); |
|
572 } |
|
573 }; |
|
574 } |
558 } |
575 } |