Package ptolemy.vergil.actor
Class DocBuilder
- java.lang.Object
-
- ptolemy.kernel.util.NamedObj
-
- ptolemy.kernel.util.Attribute
-
- ptolemy.vergil.actor.DocBuilder
-
- All Implemented Interfaces:
java.lang.Cloneable
,Changeable
,Debuggable
,DebugListener
,Derivable
,ModelErrorHandler
,MoMLExportable
,Moveable
,Nameable
public class DocBuilder extends Attribute
Build Documentation for Java and Actors.This class sets the commands that build the Java classes.
- Since:
- Ptolemy II 5.2
- Version:
- $Id$
- Author:
- Christopher Brooks
- Pt.AcceptedRating:
- Yellow (eal)
- Pt.ProposedRating:
- Yellow (eal)
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class ptolemy.kernel.util.NamedObj
NamedObj.ContainedObjectsIterator
-
-
Field Summary
Fields Modifier and Type Field Description Parameter
cleanFirst
If true, then clean before building documentation.-
Fields inherited from class ptolemy.kernel.util.NamedObj
_changeListeners, _changeLock, _changeRequests, _debugging, _debugListeners, _deferChangeRequests, _elementName, _isPersistent, _verbose, _workspace, ATTRIBUTES, CLASSNAME, COMPLETE, CONTENTS, DEEP, FULLNAME, LINKS
-
-
Constructor Summary
Constructors Constructor Description DocBuilder(NamedObj container, java.lang.String name)
Create a new instance of the DocBuilder.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
buildDocs()
Build the Java class and Actor documentation.ExecuteCommands
getExecuteCommands()
Get the command executor, which can be either non-graphical or graphical.void
setConfiguration(Configuration configuration)
Set the configuration.void
setExecuteCommands(ExecuteCommands executeCommands)
Set the command executor, which can be either non-graphical or graphical.-
Methods inherited from class ptolemy.kernel.util.Attribute
_checkContainer, _getContainedObject, _propagateExistence, clone, getContainer, moveDown, moveToFirst, moveToIndex, moveToLast, moveUp, setContainer, setName, updateContent
-
Methods inherited from class ptolemy.kernel.util.NamedObj
_addAttribute, _adjustOverride, _attachText, _cloneFixAttributeFields, _containedDecorators, _copyChangeRequestList, _debug, _debug, _debug, _debug, _debug, _description, _executeChangeRequests, _exportMoMLContents, _getIndentPrefix, _isMoMLSuppressed, _markContentsDerived, _notifyHierarchyListenersAfterChange, _notifyHierarchyListenersBeforeChange, _propagateValue, _removeAttribute, _splitName, _stripNumericSuffix, _validateSettables, addChangeListener, addDebugListener, addHierarchyListener, attributeChanged, attributeDeleted, attributeList, attributeList, attributeTypeChanged, clone, containedObjectsIterator, decorators, deepContains, depthInHierarchy, description, description, event, executeChangeRequests, exportMoML, exportMoML, exportMoML, exportMoML, exportMoML, exportMoMLPlain, getAttribute, getAttribute, getAttributes, getChangeListeners, getClassName, getDecoratorAttribute, getDecoratorAttributes, getDerivedLevel, getDerivedList, getDisplayName, getElementName, getFullName, getModelErrorHandler, getName, getName, getPrototypeList, getSource, handleModelError, isDeferringChangeRequests, isOverridden, isPersistent, lazyContainedObjectsIterator, message, notifyOfNameChange, propagateExistence, propagateValue, propagateValues, removeAttribute, removeChangeListener, removeDebugListener, removeHierarchyListener, requestChange, setClassName, setDeferringChangeRequests, setDerivedLevel, setDisplayName, setModelErrorHandler, setPersistent, setSource, sortContainedObjects, toplevel, toString, uniqueName, validateSettables, workspace
-
-
-
-
Field Detail
-
cleanFirst
public Parameter cleanFirst
If true, then clean before building documentation. The default value is true because if a user is adding an actor, then the codeDoc/tree.html, codeDoc/ptolemy/actor/lib/Ramp.xml, and codeDoc/ptolemy/actor/lib/RampIdx.xml files might already exist. It is safer to force a clean each time because the makefile does not accurately capture the dependencies between .java sources and .html, .xml and Idx.xml files.
-
-
Constructor Detail
-
DocBuilder
public DocBuilder(NamedObj container, java.lang.String name) throws IllegalActionException, NameDuplicationException
Create a new instance of the DocBuilder.- Parameters:
container
- The container.name
- The name of the code generator.- Throws:
IllegalActionException
- If the super class throws the exception or error occurs when setting the file path.NameDuplicationException
- If the super class throws the exception or an error occurs when setting the file path.
-
-
Method Detail
-
buildDocs
public int buildDocs() throws IllegalActionException
Build the Java class and Actor documentation. The default is to run make in$PTII/doc
. However, if the configuration set bysetConfiguration(Configuration)
then the configuration is searched for a _docApplicationSpecializer parameter. If that parameter exists it is assumed to name a class that implements theDocApplicationSpecializer
interface and theDocApplicationSpecializer.buildCommands(ExecuteCommands)
method which returns the commands to invoke.- Returns:
- The return value of the last subprocess that was executed. or -1 if no commands were executed.
- Throws:
IllegalActionException
- If there is a problem building the documentation.
-
getExecuteCommands
public ExecuteCommands getExecuteCommands()
Get the command executor, which can be either non-graphical or graphical. The initial default is non-graphical, which means that stderr and stdout from subcommands is written to the console.- Returns:
- executeCommands The subprocess command executor.
- See Also:
setExecuteCommands(ExecuteCommands)
-
setConfiguration
public void setConfiguration(Configuration configuration)
Set the configuration.- Parameters:
configuration
- The configuration in which we look up the _applicationName and _docApplicationSpecializer parameters.
-
setExecuteCommands
public void setExecuteCommands(ExecuteCommands executeCommands)
Set the command executor, which can be either non-graphical or graphical. The initial default is non-graphical, which means that stderr and stdout from subcommands is written to the console.- Parameters:
executeCommands
- The subprocess command executor.- See Also:
getExecuteCommands()
-
-