langtools/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/Configuration.java
changeset 43261 d377e97291d8
parent 42277 2668b0bc7ad7
child 43872 b5ce3bc28931
equal deleted inserted replaced
43257:df68602dc422 43261:d377e97291d8
   226      * used.Default is don't show version information.
   226      * used.Default is don't show version information.
   227      */
   227      */
   228     public boolean showversion = false;
   228     public boolean showversion = false;
   229 
   229 
   230     /**
   230     /**
       
   231      * Allow JavaScript in doc comments.
       
   232      */
       
   233     private boolean allowScriptInComments = false;
       
   234 
       
   235     /**
   231      * Sourcepath from where to read the source files. Default is classpath.
   236      * Sourcepath from where to read the source files. Default is classpath.
   232      *
   237      *
   233      */
   238      */
   234     public String sourcepath = "";
   239     public String sourcepath = "";
   235 
   240 
   642             },
   647             },
   643             new Hidden(resources, "--dump-on-error") {
   648             new Hidden(resources, "--dump-on-error") {
   644                 @Override
   649                 @Override
   645                 public boolean process(String opt, List<String> args) {
   650                 public boolean process(String opt, List<String> args) {
   646                     dumpOnError = true;
   651                     dumpOnError = true;
       
   652                     return true;
       
   653                 }
       
   654             },
       
   655             new Option(resources, "--allow-script-in-comments") {
       
   656                 @Override
       
   657                 public boolean process(String opt, List<String> args) {
       
   658                     allowScriptInComments = true;
   647                     return true;
   659                     return true;
   648                 }
   660                 }
   649             }
   661             }
   650         };
   662         };
   651         Set<Doclet.Option> set = new TreeSet<>();
   663         Set<Doclet.Option> set = new TreeSet<>();
  1052         private final String parameters;
  1064         private final String parameters;
  1053         private final String description;
  1065         private final String description;
  1054         private final int argCount;
  1066         private final int argCount;
  1055 
  1067 
  1056         protected Option(Resources resources, String name, int argCount) {
  1068         protected Option(Resources resources, String name, int argCount) {
  1057             this(resources, "doclet.usage." + name.toLowerCase().replaceAll("^-*", ""), name, argCount);
  1069             this(resources, "doclet.usage." + name.toLowerCase().replaceAll("^-+", ""), name, argCount);
  1058         }
  1070         }
  1059 
  1071 
  1060         protected Option(Resources resources, String keyBase, String name, int argCount) {
  1072         protected Option(Resources resources, String keyBase, String name, int argCount) {
  1061             this.names = name.trim().split("\\s+");
  1073             this.names = name.trim().split("\\s+");
  1062             String desc = getOptionsMessage(resources, keyBase + ".description");
  1074             String desc = getOptionsMessage(resources, keyBase + ".description");
  1226 
  1238 
  1227                 }.visit(e);
  1239                 }.visit(e);
  1228             }
  1240             }
  1229         }
  1241         }
  1230     }
  1242     }
       
  1243 
       
  1244     /**
       
  1245      * Returns whether or not to allow JavaScript in comments.
       
  1246      * Default is off; can be set true from a command line option.
       
  1247      * @return the allowScriptInComments
       
  1248      */
       
  1249     public boolean isAllowScriptInComments() {
       
  1250         return allowScriptInComments;
       
  1251     }
  1231 }
  1252 }