equal
deleted
inserted
replaced
1 /* |
1 /* |
2 * Copyright (c) 2012, 2018, Oracle and/or its affiliates. All rights reserved. |
2 * Copyright (c) 2012, 2019, Oracle and/or its affiliates. All rights reserved. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 * |
4 * |
5 * This code is free software; you can redistribute it and/or modify it |
5 * This code is free software; you can redistribute it and/or modify it |
6 * under the terms of the GNU General Public License version 2 only, as |
6 * under the terms of the GNU General Public License version 2 only, as |
7 * published by the Free Software Foundation. Oracle designates this |
7 * published by the Free Software Foundation. Oracle designates this |
78 public class DocLint implements Plugin { |
78 public class DocLint implements Plugin { |
79 |
79 |
80 public static final String XMSGS_OPTION = "-Xmsgs"; |
80 public static final String XMSGS_OPTION = "-Xmsgs"; |
81 public static final String XMSGS_CUSTOM_PREFIX = "-Xmsgs:"; |
81 public static final String XMSGS_CUSTOM_PREFIX = "-Xmsgs:"; |
82 private static final String STATS = "-stats"; |
82 private static final String STATS = "-stats"; |
83 public static final String XIMPLICIT_HEADERS = "-XimplicitHeaders:"; |
|
84 public static final String XCUSTOM_TAGS_PREFIX = "-XcustomTags:"; |
83 public static final String XCUSTOM_TAGS_PREFIX = "-XcustomTags:"; |
85 public static final String XHTML_VERSION_PREFIX = "-XhtmlVersion:"; |
84 public static final String XHTML_VERSION_PREFIX = "-XhtmlVersion:"; |
86 public static final String XCHECK_PACKAGE = "-XcheckPackage:"; |
85 public static final String XCHECK_PACKAGE = "-XcheckPackage:"; |
87 public static final String SEPARATOR = ","; |
86 public static final String SEPARATOR = ","; |
88 |
87 |
287 for (String arg : args) { |
286 for (String arg : args) { |
288 if (arg.equals(XMSGS_OPTION)) { |
287 if (arg.equals(XMSGS_OPTION)) { |
289 env.messages.setOptions(null); |
288 env.messages.setOptions(null); |
290 } else if (arg.startsWith(XMSGS_CUSTOM_PREFIX)) { |
289 } else if (arg.startsWith(XMSGS_CUSTOM_PREFIX)) { |
291 env.messages.setOptions(arg.substring(arg.indexOf(":") + 1)); |
290 env.messages.setOptions(arg.substring(arg.indexOf(":") + 1)); |
292 } else if (arg.matches(XIMPLICIT_HEADERS + "[1-6]")) { |
|
293 char ch = arg.charAt(arg.length() - 1); |
|
294 env.setImplicitHeaders(Character.digit(ch, 10)); |
|
295 } else if (arg.startsWith(XCUSTOM_TAGS_PREFIX)) { |
291 } else if (arg.startsWith(XCUSTOM_TAGS_PREFIX)) { |
296 env.setCustomTags(arg.substring(arg.indexOf(":") + 1)); |
292 env.setCustomTags(arg.substring(arg.indexOf(":") + 1)); |
297 } else if (arg.startsWith(XHTML_VERSION_PREFIX)) { |
293 } else if (arg.startsWith(XHTML_VERSION_PREFIX)) { |
298 String argsVersion = arg.substring(arg.indexOf(":") + 1); |
294 String argsVersion = arg.substring(arg.indexOf(":") + 1); |
299 HtmlVersion htmlVersion = HtmlVersion.getHtmlVersion(argsVersion); |
295 HtmlVersion htmlVersion = HtmlVersion.getHtmlVersion(argsVersion); |