langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/Configuration.java
equal
deleted
inserted
replaced
825 //Check the shared properties file. |
825 //Check the shared properties file. |
826 return message.getText(key, a1, a2, a3); |
826 return message.getText(key, a1, a2, a3); |
827 } |
827 } |
828 } |
828 } |
829 |
829 |
830 public abstract Content getContentForResource(); |
830 public abstract Content newContent(); |
831 |
831 |
832 /** |
832 /** |
833 * Get the configuration string as a content. |
833 * Get the configuration string as a content. |
834 * |
834 * |
835 * @param key the key to look for in the configuration file |
835 * @param key the key to look for in the configuration file |
836 * @return a content tree for the text |
836 * @return a content tree for the text |
837 */ |
837 */ |
838 public Content getResource(String key) { |
838 public Content getResource(String key) { |
839 Content c = getContentForResource(); |
839 Content c = newContent(); |
840 c.addContent(getText(key)); |
840 c.addContent(getText(key)); |
841 return c; |
841 return c; |
842 } |
842 } |
843 |
843 |
844 /** |
844 /** |
870 * @param o1 string or content argument added to configuration text |
870 * @param o1 string or content argument added to configuration text |
871 * @param o2 string or content argument added to configuration text |
871 * @param o2 string or content argument added to configuration text |
872 * @return a content tree for the text |
872 * @return a content tree for the text |
873 */ |
873 */ |
874 public Content getResource(String key, Object o0, Object o1, Object o2) { |
874 public Content getResource(String key, Object o0, Object o1, Object o2) { |
875 Content c = getContentForResource(); |
875 Content c = newContent(); |
876 Pattern p = Pattern.compile("\\{([012])\\}"); |
876 Pattern p = Pattern.compile("\\{([012])\\}"); |
877 String text = getText(key); |
877 String text = getText(key); |
878 Matcher m = p.matcher(text); |
878 Matcher m = p.matcher(text); |
879 int start = 0; |
879 int start = 0; |
880 while (m.find(start)) { |
880 while (m.find(start)) { |