src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/TagletWriterImpl.java
changeset 48654 36f58bd6269f
parent 47850 4a28dc8a86c2
child 48759 ffa68af7da87
equal deleted inserted replaced
48653:89111a0e6355 48654:36f58bd6269f
     1 /*
     1 /*
     2  * Copyright (c) 2003, 2017, Oracle and/or its affiliates. All rights reserved.
     2  * Copyright (c) 2003, 2018, 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
   104         if (tagText.charAt(0) == '"' && tagText.charAt(tagText.length() - 1) == '"') {
   104         if (tagText.charAt(0) == '"' && tagText.charAt(tagText.length() - 1) == '"') {
   105             tagText = tagText.substring(1, tagText.length() - 1);
   105             tagText = tagText.substring(1, tagText.length() - 1);
   106         }
   106         }
   107         String desc = ch.getText(itt.getDescription());
   107         String desc = ch.getText(itt.getDescription());
   108 
   108 
   109         String anchorName = configuration.links.getName(tagText);
   109         String anchorName = htmlWriter.links.getName(tagText);
   110         Content result = HtmlTree.A_ID(HtmlStyle.searchTagResult, anchorName, new StringContent(tagText));
   110         Content result = HtmlTree.A_ID(HtmlStyle.searchTagResult, anchorName, new StringContent(tagText));
   111         if (configuration.createindex && !tagText.isEmpty()) {
   111         if (configuration.createindex && !tagText.isEmpty()) {
   112             SearchIndexItem si = new SearchIndexItem();
   112             SearchIndexItem si = new SearchIndexItem();
   113             si.setLabel(tagText);
   113             si.setLabel(tagText);
   114             si.setDescription(desc);
   114             si.setDescription(desc);
   286                     htmlWriter.pathToRoot.resolve(DocPaths.CONSTANT_VALUES);
   286                     htmlWriter.pathToRoot.resolve(DocPaths.CONSTANT_VALUES);
   287             String whichConstant =
   287             String whichConstant =
   288                     ((ClassWriterImpl) htmlWriter).getTypeElement().getQualifiedName() + "." +
   288                     ((ClassWriterImpl) htmlWriter).getTypeElement().getQualifiedName() + "." +
   289                     utils.getSimpleName(holder);
   289                     utils.getSimpleName(holder);
   290             DocLink link = constantsPath.fragment(whichConstant);
   290             DocLink link = constantsPath.fragment(whichConstant);
   291             body.addContent(Links.createLink(link,
   291             body.addContent(htmlWriter.links.createLink(link,
   292                     new StringContent(configuration.getText("doclet.Constants_Summary"))));
   292                     new StringContent(configuration.getText("doclet.Constants_Summary"))));
   293         }
   293         }
   294         if (utils.isClass(holder) && utils.isSerializable((TypeElement)holder)) {
   294         if (utils.isClass(holder) && utils.isSerializable((TypeElement)holder)) {
   295             //Automatically add link to serialized form page for serializable classes.
   295             //Automatically add link to serialized form page for serializable classes.
   296             if (SerializedFormBuilder.serialInclude(utils, holder) &&
   296             if (SerializedFormBuilder.serialInclude(utils, holder) &&
   297                       SerializedFormBuilder.serialInclude(utils, utils.containingPackage(holder))) {
   297                       SerializedFormBuilder.serialInclude(utils, utils.containingPackage(holder))) {
   298                 appendSeparatorIfNotEmpty(body);
   298                 appendSeparatorIfNotEmpty(body);
   299                 DocPath serialPath = htmlWriter.pathToRoot.resolve(DocPaths.SERIALIZED_FORM);
   299                 DocPath serialPath = htmlWriter.pathToRoot.resolve(DocPaths.SERIALIZED_FORM);
   300                 DocLink link = serialPath.fragment(utils.getFullyQualifiedName(holder));
   300                 DocLink link = serialPath.fragment(utils.getFullyQualifiedName(holder));
   301                 body.addContent(Links.createLink(link,
   301                 body.addContent(htmlWriter.links.createLink(link,
   302                         new StringContent(configuration.getText("doclet.Serialized_Form"))));
   302                         new StringContent(configuration.getText("doclet.Serialized_Form"))));
   303             }
   303             }
   304         }
   304         }
   305         if (body.isEmpty())
   305         if (body.isEmpty())
   306             return body;
   306             return body;