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

changeset 1606
ccbe7ffdd867
parent 1413
bdcef2ef52d2
child 1742
7af0fa419a2b
     1.1 --- a/src/share/classes/com/sun/tools/doclets/internal/toolkit/taglets/TagletManager.java	Fri Feb 22 18:19:51 2013 +0000
     1.2 +++ b/src/share/classes/com/sun/tools/doclets/internal/toolkit/taglets/TagletManager.java	Sun Feb 24 11:36:58 2013 -0800
     1.3 @@ -1,5 +1,5 @@
     1.4  /*
     1.5 - * Copyright (c) 2001, 2012, Oracle and/or its affiliates. All rights reserved.
     1.6 + * Copyright (c) 2001, 2013, Oracle and/or its affiliates. All rights reserved.
     1.7   * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     1.8   *
     1.9   * This code is free software; you can redistribute it and/or modify it
    1.10 @@ -157,6 +157,13 @@
    1.11      private boolean showauthor;
    1.12  
    1.13      /**
    1.14 +     * True if we want to use JavaFX-related tags (@propertyGetter,
    1.15 +     * @propertySetter, @propertyDescription, @defaultValue, @treatAsPrivate,
    1.16 +     * @expert).
    1.17 +     */
    1.18 +    private boolean javafx;
    1.19 +
    1.20 +    /**
    1.21       * Construct a new <code>TagletManager</code>.
    1.22       * @param nosince true if we do not want to use @since tags.
    1.23       * @param showversion true if we want to use @version tags.
    1.24 @@ -164,7 +171,8 @@
    1.25       * @param message the message retriever to print warnings.
    1.26       */
    1.27      public TagletManager(boolean nosince, boolean showversion,
    1.28 -                         boolean showauthor, MessageRetriever message) {
    1.29 +                         boolean showauthor, boolean javafx,
    1.30 +                         MessageRetriever message) {
    1.31          overridenStandardTags = new HashSet<String>();
    1.32          potentiallyConflictingTags = new HashSet<String>();
    1.33          standardTags = new HashSet<String>();
    1.34 @@ -174,6 +182,7 @@
    1.35          this.nosince = nosince;
    1.36          this.showversion = showversion;
    1.37          this.showauthor = showauthor;
    1.38 +        this.javafx = javafx;
    1.39          this.message = message;
    1.40          initStandardTags();
    1.41          initStandardTagsLowercase();
    1.42 @@ -677,6 +686,33 @@
    1.43          standardTags.add("Text");
    1.44          standardTags.add("literal");
    1.45          standardTags.add("code");
    1.46 +
    1.47 +        if (javafx) {
    1.48 +            initJavaFXTags();
    1.49 +        }
    1.50 +    }
    1.51 +
    1.52 +    /**
    1.53 +     * Initialize JavaFX-related tags.
    1.54 +     */
    1.55 +    private void initJavaFXTags() {
    1.56 +        Taglet temp;
    1.57 +        customTags.put((temp = new PropertyGetterTaglet()).getName(), temp);
    1.58 +        customTags.put((temp = new PropertySetterTaglet()).getName(), temp);
    1.59 +        customTags.put((temp = new SimpleTaglet("propertyDescription", message.getText("doclet.PropertyDescription"),
    1.60 +            SimpleTaglet.FIELD + SimpleTaglet.METHOD)).getName(), temp);
    1.61 +        customTags.put((temp = new SimpleTaglet("defaultValue", message.getText("doclet.DefaultValue"),
    1.62 +            SimpleTaglet.FIELD + SimpleTaglet.METHOD)).getName(), temp);
    1.63 +        customTags.put((temp = new SimpleTaglet("treatAsPrivate", null,
    1.64 +                SimpleTaglet.FIELD + SimpleTaglet.METHOD + SimpleTaglet.TYPE)).getName(), temp);
    1.65 +        customTags.put((temp = new LegacyTaglet(new ExpertTaglet())).getName(), temp);
    1.66 +
    1.67 +        standardTags.add("propertyGetter");
    1.68 +        standardTags.add("propertySetter");
    1.69 +        standardTags.add("propertyDescription");
    1.70 +        standardTags.add("defaultValue");
    1.71 +        standardTags.add("treatAsPrivate");
    1.72 +        standardTags.add("expert");
    1.73      }
    1.74  
    1.75      /**

mercurial