Interface DocApplicationSpecializer


  • public interface DocApplicationSpecializer
    An interface that specializes the documentation system to the application.

    The docClassNameToURL() method used by DocManager and other classes to convert class names to URLs. The buildCommands() method is used by DocBuilder to set up the build environment to build the documentation system if necessary.

    If an application would like more control over how documentation is found and built, then the application can implement this interface and set the _docApplicationSpecializer parameter in the configuration to name the implementation class.

    Since:
    Ptolemy II 5.2
    Version:
    $Id$
    Author:
    Chad Berkley
    Pt.AcceptedRating:
    Red (cxh)
    Pt.ProposedRating:
    Red (cxh)
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      java.util.List buildCommands​(ExecuteCommands executeCommands)
      Set up the commands necessary to build the documentation.
      java.net.URL docClassNameToURL​(java.lang.String remoteDocumentationURLBase, java.lang.String className, boolean lookForPtDoc, boolean lookForJavadoc, boolean lookForSource, boolean lookForActorIndex)
      Given a dot separated class name, return the URL of the documentation.
      void editDocumentation​(java.awt.Frame owner, Attribute attribute, NamedObj target)
      Create a gui to edit the documentation in the attribute.
      java.lang.String getDocumentationAttributeClassName()
      Return the class name of the attribute that this specializer uses to store documentation.
      void handleDocumentationAttributeDoesNotExist​(java.awt.Frame owner, NamedObj target)
      Handle the state where the documentation attribute does not exist and the user tried to edit the docs.
      void handleDocumentationNotFound​(java.lang.String classname, Effigy effigy)
      Handle the state where there is no documentation attribute and the user tried to view the documentation.
    • Method Detail

      • docClassNameToURL

        java.net.URL docClassNameToURL​(java.lang.String remoteDocumentationURLBase,
                                       java.lang.String className,
                                       boolean lookForPtDoc,
                                       boolean lookForJavadoc,
                                       boolean lookForSource,
                                       boolean lookForActorIndex)
        Given a dot separated class name, return the URL of the documentation.
        Parameters:
        remoteDocumentationURLBase - If non-null, the URL of the documentation. Usually, this is set by reading the _remoteDocumentationBase parameter from the configuration in the caller.
        className - The dot separated class name.
        lookForPtDoc - True if we should look for ptdoc .xml files.
        lookForJavadoc - True if we should look for javadoc files.
        lookForSource - True if we should look for source files.
        lookForActorIndex - True if we should look for the actor index.
        Returns:
        The URL of the documentation, if any. If no documentation was found, return null.
      • buildCommands

        java.util.List buildCommands​(ExecuteCommands executeCommands)
        Set up the commands necessary to build the documentation.
        Parameters:
        executeCommands - The command execution environment necessary to build the documentation.
        Returns:
        A List of Strings, where each String represents the a command to be executed.
      • getDocumentationAttributeClassName

        java.lang.String getDocumentationAttributeClassName()
        Return the class name of the attribute that this specializer uses to store documentation.
        Returns:
        the name of the class of the specialized documentation attribute
      • editDocumentation

        void editDocumentation​(java.awt.Frame owner,
                               Attribute attribute,
                               NamedObj target)
        Create a gui to edit the documentation in the attribute.
        Parameters:
        owner - the editors gui parent
        attribute - the documentation attribute to edit
        target - the parent component to the attribute
      • handleDocumentationNotFound

        void handleDocumentationNotFound​(java.lang.String classname,
                                         Effigy effigy)
        Handle the state where there is no documentation attribute and the user tried to view the documentation.
        Parameters:
        classname - the name of the class
        effigy - the effigy of the entity that does not have a doc attribute
      • handleDocumentationAttributeDoesNotExist

        void handleDocumentationAttributeDoesNotExist​(java.awt.Frame owner,
                                                      NamedObj target)
        Handle the state where the documentation attribute does not exist and the user tried to edit the docs.
        Parameters:
        owner - the editors gui parent
        target - the parent component to the attribute