|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.argouml.uml.DocumentationManager
This class handles the Documentation of ModelElements. Documentation is represented internally by the tagged value "documentation", but it has its own tab-panel to ease user handling.
| Field Summary | |
private static String |
LINE_SEPARATOR
The system's native line-ends, for when things are written to file. |
| Constructor Summary | |
DocumentationManager()
|
|
| Method Summary | |
private static int |
appendComment(StringBuffer sb,
String prefix,
String comment,
int nlprefix)
Append a string to sb which is chopped into lines and each line prefixed with prefix. |
static String |
defaultFor(Object o,
String indent)
Generate default documentation. |
static String |
getComments(Object o)
Get the comments (the notes in a diagram) for a modelelement. |
static String |
getComments(Object o,
String header,
String prefix,
String footer)
Get the comments (the notes in a diagram) for a modelelement. |
static String |
getDocs(Object o,
String indent)
This function returns the documentation in C-style comment format. |
static String |
getDocs(Object o,
String indent,
String header,
String prefix,
String footer)
|
static boolean |
hasDocs(Object o)
Determine whether documentation is associated with the given element or not. |
static void |
setDocs(Object o,
String s)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
private static final String LINE_SEPARATOR
| Constructor Detail |
public DocumentationManager()
| Method Detail |
public static String getDocs(Object o,
String indent)
o - the ModelElementindent - the current indentation for new lines
public static String getDocs(Object o,
String indent,
String header,
String prefix,
String footer)
o - the ModelElementindent - the current indentation for new linesheader - is the first lineprefix - is inserted at every line before the docfooter - is the closing line
public static void setDocs(Object o,
String s)
o - the ModelElement. If it is not a ModelElement,
then you'll get a IllegalArgumentExceptions - the string representing the documentationpublic static boolean hasDocs(Object o)
o - The given element.
public static String defaultFor(Object o,
String indent)
o - the ModelElementindent - the current indentation string for new lines
public static String getComments(Object o)
This returns a c-style comments.
o - The modelelement.
public static String getComments(Object o,
String header,
String prefix,
String footer)
o - The given modelelement.header - is the comment header.prefix - is the comment prefix (on every line).footer - is the comment footer.
private static int appendComment(StringBuffer sb,
String prefix,
String comment,
int nlprefix)
sb - the StringBuffer to append to.prefix - the prefix to each line.comment - the text to reformat.nlprefix - the number of empty lines to prefix the comment with.
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
| ArgoUML © 1996-2004 (20050222) | ArgoUML Homepage | ArgoUML Developers' page | ArgoUML Cookbook |