src/share/classes/com/sun/tools/doclets/internal/toolkit/taglets/TagletManager.java

changeset 1606
ccbe7ffdd867
parent 1413
bdcef2ef52d2
child 1742
7af0fa419a2b
equal deleted inserted replaced
1605:94e67bed460d 1606:ccbe7ffdd867
1 /* 1 /*
2 * Copyright (c) 2001, 2012, Oracle and/or its affiliates. All rights reserved. 2 * Copyright (c) 2001, 2013, 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
155 * True if we want to use @author tags. 155 * True if we want to use @author tags.
156 */ 156 */
157 private boolean showauthor; 157 private boolean showauthor;
158 158
159 /** 159 /**
160 * True if we want to use JavaFX-related tags (@propertyGetter,
161 * @propertySetter, @propertyDescription, @defaultValue, @treatAsPrivate,
162 * @expert).
163 */
164 private boolean javafx;
165
166 /**
160 * Construct a new <code>TagletManager</code>. 167 * Construct a new <code>TagletManager</code>.
161 * @param nosince true if we do not want to use @since tags. 168 * @param nosince true if we do not want to use @since tags.
162 * @param showversion true if we want to use @version tags. 169 * @param showversion true if we want to use @version tags.
163 * @param showauthor true if we want to use @author tags. 170 * @param showauthor true if we want to use @author tags.
164 * @param message the message retriever to print warnings. 171 * @param message the message retriever to print warnings.
165 */ 172 */
166 public TagletManager(boolean nosince, boolean showversion, 173 public TagletManager(boolean nosince, boolean showversion,
167 boolean showauthor, MessageRetriever message) { 174 boolean showauthor, boolean javafx,
175 MessageRetriever message) {
168 overridenStandardTags = new HashSet<String>(); 176 overridenStandardTags = new HashSet<String>();
169 potentiallyConflictingTags = new HashSet<String>(); 177 potentiallyConflictingTags = new HashSet<String>();
170 standardTags = new HashSet<String>(); 178 standardTags = new HashSet<String>();
171 standardTagsLowercase = new HashSet<String>(); 179 standardTagsLowercase = new HashSet<String>();
172 unseenCustomTags = new HashSet<String>(); 180 unseenCustomTags = new HashSet<String>();
173 customTags = new LinkedHashMap<String,Taglet>(); 181 customTags = new LinkedHashMap<String,Taglet>();
174 this.nosince = nosince; 182 this.nosince = nosince;
175 this.showversion = showversion; 183 this.showversion = showversion;
176 this.showauthor = showauthor; 184 this.showauthor = showauthor;
185 this.javafx = javafx;
177 this.message = message; 186 this.message = message;
178 initStandardTags(); 187 initStandardTags();
179 initStandardTagsLowercase(); 188 initStandardTagsLowercase();
180 } 189 }
181 190
675 standardTags.add("serialData"); 684 standardTags.add("serialData");
676 standardTags.add("serialField"); 685 standardTags.add("serialField");
677 standardTags.add("Text"); 686 standardTags.add("Text");
678 standardTags.add("literal"); 687 standardTags.add("literal");
679 standardTags.add("code"); 688 standardTags.add("code");
689
690 if (javafx) {
691 initJavaFXTags();
692 }
693 }
694
695 /**
696 * Initialize JavaFX-related tags.
697 */
698 private void initJavaFXTags() {
699 Taglet temp;
700 customTags.put((temp = new PropertyGetterTaglet()).getName(), temp);
701 customTags.put((temp = new PropertySetterTaglet()).getName(), temp);
702 customTags.put((temp = new SimpleTaglet("propertyDescription", message.getText("doclet.PropertyDescription"),
703 SimpleTaglet.FIELD + SimpleTaglet.METHOD)).getName(), temp);
704 customTags.put((temp = new SimpleTaglet("defaultValue", message.getText("doclet.DefaultValue"),
705 SimpleTaglet.FIELD + SimpleTaglet.METHOD)).getName(), temp);
706 customTags.put((temp = new SimpleTaglet("treatAsPrivate", null,
707 SimpleTaglet.FIELD + SimpleTaglet.METHOD + SimpleTaglet.TYPE)).getName(), temp);
708 customTags.put((temp = new LegacyTaglet(new ExpertTaglet())).getName(), temp);
709
710 standardTags.add("propertyGetter");
711 standardTags.add("propertySetter");
712 standardTags.add("propertyDescription");
713 standardTags.add("defaultValue");
714 standardTags.add("treatAsPrivate");
715 standardTags.add("expert");
680 } 716 }
681 717
682 /** 718 /**
683 * Initialize lowercase version of standard Javadoc tags. 719 * Initialize lowercase version of standard Javadoc tags.
684 */ 720 */

mercurial