changeset 2914:4fcf722b8114 jdk9-b65

Merge
author lana
date Thu, 14 May 2015 20:17:02 -0700
parents bead4712db93 6eeeed95be5b
children 82d0e10df078 74c005554da4
files
diffstat 4 files changed, 38 insertions(+), 23 deletions(-) [+]
line wrap: on
line diff
--- a/src/jdk.javadoc/share/classes/com/sun/tools/doclets/formats/html/SubWriterHolderWriter.java	Thu May 14 12:38:14 2015 -0700
+++ b/src/jdk.javadoc/share/classes/com/sun/tools/doclets/formats/html/SubWriterHolderWriter.java	Thu May 14 20:17:02 2015 -0700
@@ -119,7 +119,7 @@
             Content captionSpan;
             Content span;
             if (type.isDefaultTab()) {
-                captionSpan = HtmlTree.SPAN(new StringContent(type.text()));
+                captionSpan = HtmlTree.SPAN(configuration.getResource(type.resourceKey()));
                 span = HtmlTree.SPAN(type.tabId(),
                         HtmlStyle.activeTableTab, captionSpan);
             } else {
@@ -142,7 +142,7 @@
      */
     public Content getMethodTypeLinks(MethodTypes methodType) {
         String jsShow = "javascript:show(" + methodType.value() +");";
-        HtmlTree link = HtmlTree.A(jsShow, new StringContent(methodType.text()));
+        HtmlTree link = HtmlTree.A(jsShow, configuration.getResource(methodType.resourceKey()));
         return link;
     }
 
--- a/src/jdk.javadoc/share/classes/com/sun/tools/doclets/formats/html/markup/HtmlWriter.java	Thu May 14 12:38:14 2015 -0700
+++ b/src/jdk.javadoc/share/classes/com/sun/tools/doclets/formats/html/markup/HtmlWriter.java	Thu May 14 20:17:02 2015 -0700
@@ -465,10 +465,10 @@
         for (Map.Entry<String,Integer> entry : typeMap.entrySet()) {
             vars.append(sep);
             sep = ",";
-            vars.append("\"");
-            vars.append(entry.getKey());
-            vars.append("\":");
-            vars.append(entry.getValue());
+            vars.append("\"")
+                    .append(entry.getKey())
+                    .append("\":")
+                    .append(entry.getValue());
         }
         vars.append("};").append(DocletConstants.NL);
         sep = "";
@@ -476,11 +476,19 @@
         for (MethodTypes entry : methodTypes) {
             vars.append(sep);
             sep = ",";
-            vars.append(entry.value()).append(":");
-            vars.append("[").append("\"").append(entry.tabId());
-            vars.append("\"").append(sep).append("\"").append(entry.text()).append("\"]");
+            vars.append(entry.value())
+                    .append(":")
+                    .append("[")
+                    .append("\"")
+                    .append(entry.tabId())
+                    .append("\"")
+                    .append(sep)
+                    .append("\"")
+                    .append(configuration.getText(entry.resourceKey()))
+                    .append("\"]");
         }
-        vars.append("};").append(DocletConstants.NL);
+        vars.append("};")
+                .append(DocletConstants.NL);
         addStyles(HtmlStyle.altColor, vars);
         addStyles(HtmlStyle.rowColor, vars);
         addStyles(HtmlStyle.tableTab, vars);
--- a/src/jdk.javadoc/share/classes/com/sun/tools/doclets/internal/toolkit/resources/doclets.properties	Thu May 14 12:38:14 2015 -0700
+++ b/src/jdk.javadoc/share/classes/com/sun/tools/doclets/internal/toolkit/resources/doclets.properties	Thu May 14 20:17:02 2015 -0700
@@ -150,6 +150,13 @@
 doclet.Constructors=Constructors
 doclet.methods=methods
 doclet.Methods=Methods
+doclet.All_Methods=All Methods
+doclet.Static_Methods=Static Methods
+doclet.Instance_Methods=Instance Methods
+doclet.Abstract_Methods=Abstract Methods
+doclet.Concrete_Methods=Concrete Methods
+doclet.Default_Methods=Default Methods
+doclet.Deprecated_Methods=Deprecated Methods
 doclet.annotation_type_optional_members=optional elements
 doclet.Annotation_Type_Optional_Members=Optional Elements
 doclet.annotation_type_required_members=required elements
--- a/src/jdk.javadoc/share/classes/com/sun/tools/doclets/internal/toolkit/util/MethodTypes.java	Thu May 14 12:38:14 2015 -0700
+++ b/src/jdk.javadoc/share/classes/com/sun/tools/doclets/internal/toolkit/util/MethodTypes.java	Thu May 14 20:17:02 2015 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2015, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -31,22 +31,22 @@
  * @author Bhavesh Patel
  */
 public enum MethodTypes {
-    ALL(0xffff, "All Methods", "t0", true),
-    STATIC(0x1, "Static Methods", "t1", false),
-    INSTANCE(0x2, "Instance Methods", "t2", false),
-    ABSTRACT(0x4, "Abstract Methods", "t3", false),
-    CONCRETE(0x8, "Concrete Methods", "t4", false),
-    DEFAULT(0x10, "Default Methods", "t5", false),
-    DEPRECATED(0x20, "Deprecated Methods", "t6", false);
+    ALL(0xffff, "doclet.All_Methods", "t0", true),
+    STATIC(0x1, "doclet.Static_Methods", "t1", false),
+    INSTANCE(0x2, "doclet.Instance_Methods", "t2", false),
+    ABSTRACT(0x4, "doclet.Abstract_Methods", "t3", false),
+    CONCRETE(0x8, "doclet.Concrete_Methods", "t4", false),
+    DEFAULT(0x10, "doclet.Default_Methods", "t5", false),
+    DEPRECATED(0x20, "doclet.Deprecated_Methods", "t6", false);
 
     private final int value;
-    private final String text;
+    private final String resourceKey;
     private final String tabId;
     private final boolean isDefaultTab;
 
-    MethodTypes(int v, String t, String id, boolean dt) {
+    MethodTypes(int v, String k, String id, boolean dt) {
         this.value = v;
-        this.text = t;
+        this.resourceKey = k;
         this.tabId = id;
         this.isDefaultTab = dt;
     }
@@ -55,8 +55,8 @@
         return value;
     }
 
-    public String text() {
-        return text;
+    public String resourceKey() {
+        return resourceKey;
     }
 
     public String tabId() {