< prev index next >

src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/util/Utils.java

Print this page

        

*** 85,94 **** --- 85,95 ---- import com.sun.source.util.DocTrees; import com.sun.source.util.TreePath; import com.sun.tools.javac.model.JavacTypes; import jdk.javadoc.internal.doclets.formats.html.SearchIndexItem; import jdk.javadoc.internal.doclets.toolkit.BaseConfiguration; + import jdk.javadoc.internal.doclets.toolkit.BaseOptions; import jdk.javadoc.internal.doclets.toolkit.CommentUtils.DocCommentDuo; import jdk.javadoc.internal.doclets.toolkit.Messages; import jdk.javadoc.internal.doclets.toolkit.Resources; import jdk.javadoc.internal.doclets.toolkit.WorkArounds; import jdk.javadoc.internal.doclets.toolkit.taglets.BaseTaglet;
*** 110,128 **** * This code and its internal interfaces are subject to change or * deletion without notice.</b> */ public class Utils { public final BaseConfiguration configuration; ! public final Messages messages; ! public final Resources resources; public final DocTrees docTrees; public final Elements elementUtils; public final Types typeUtils; ! public final JavaScriptScanner javaScriptScanner; public Utils(BaseConfiguration c) { configuration = c; messages = configuration.getMessages(); resources = configuration.getResources(); elementUtils = c.docEnv.getElementUtils(); typeUtils = c.docEnv.getTypeUtils(); docTrees = c.docEnv.getDocTrees(); --- 111,131 ---- * This code and its internal interfaces are subject to change or * deletion without notice.</b> */ public class Utils { public final BaseConfiguration configuration; ! private final BaseOptions options; ! private final Messages messages; ! private final Resources resources; public final DocTrees docTrees; public final Elements elementUtils; public final Types typeUtils; ! private final JavaScriptScanner javaScriptScanner; public Utils(BaseConfiguration c) { configuration = c; + options = configuration.getOptions(); messages = configuration.getMessages(); resources = configuration.getResources(); elementUtils = c.docEnv.getElementUtils(); typeUtils = c.docEnv.getTypeUtils(); docTrees = c.docEnv.getDocTrees();
*** 388,398 **** public boolean isPublic(Element e) { return e.getModifiers().contains(Modifier.PUBLIC); } public boolean isProperty(String name) { ! return configuration.javafx && name.endsWith("Property"); } public String getPropertyName(String name) { return isProperty(name) ? name.substring(0, name.length() - "Property".length()) --- 391,401 ---- public boolean isPublic(Element e) { return e.getModifiers().contains(Modifier.PUBLIC); } public boolean isProperty(String name) { ! return options.javafx && name.endsWith("Property"); } public String getPropertyName(String name) { return isProperty(name) ? name.substring(0, name.length() - "Property".length())
*** 1385,1396 **** */ public String replaceTabs(String text) { if (!text.contains("\t")) return text; ! final int tabLength = configuration.sourcetab; ! final String whitespace = configuration.tabSpaces; final int textLength = text.length(); StringBuilder result = new StringBuilder(textLength); int pos = 0; int lineLength = 0; for (int i = 0; i < textLength; i++) { --- 1388,1399 ---- */ public String replaceTabs(String text) { if (!text.contains("\t")) return text; ! final int tabLength = options.sourceTabSize; ! final String whitespace = " ".repeat(tabLength); final int textLength = text.length(); StringBuilder result = new StringBuilder(textLength); int pos = 0; int lineLength = 0; for (int i = 0; i < textLength; i++) {
*** 1518,1528 **** public boolean hasHiddenTag(Element e) { // prevent needless tests on elements which are not included if (!isIncluded(e)) { return false; } ! if (configuration.javafx && hasBlockTag(e, DocTree.Kind.UNKNOWN_BLOCK_TAG, "treatAsPrivate")) { return true; } return hasBlockTag(e, DocTree.Kind.HIDDEN); } --- 1521,1531 ---- public boolean hasHiddenTag(Element e) { // prevent needless tests on elements which are not included if (!isIncluded(e)) { return false; } ! if (options.javafx && hasBlockTag(e, DocTree.Kind.UNKNOWN_BLOCK_TAG, "treatAsPrivate")) { return true; } return hasBlockTag(e, DocTree.Kind.HIDDEN); }
*** 1531,1541 **** * Returns true if the method has no comments, or a lone &commat;inheritDoc. * @param m a method * @return true if there are no comments, false otherwise */ public boolean isSimpleOverride(ExecutableElement m) { ! if (!configuration.summarizeOverriddenMethods || !isIncluded(m)) { return false; } if (!getBlockTags(m).isEmpty() || isDeprecated(m)) --- 1534,1544 ---- * Returns true if the method has no comments, or a lone &commat;inheritDoc. * @param m a method * @return true if there are no comments, false otherwise */ public boolean isSimpleOverride(ExecutableElement m) { ! if (!options.summarizeOverriddenMethods || !isIncluded(m)) { return false; } if (!getBlockTags(m).isEmpty() || isDeprecated(m))
< prev index next >