ajack 2003/09/12 14:01:31
Modified: python/gump document.py
Log:
Display state w/ dependees/dependencies
Revision Changes Path
1.20 +15 -6 jakarta-gump/python/gump/document.py
Index: document.py
===================================================================
RCS file: /home/cvs/jakarta-gump/python/gump/document.py,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -r1.19 -r1.20
--- document.py 12 Sep 2003 11:50:37 -0000 1.19
+++ document.py 12 Sep 2003 21:01:31 -0000 1.20
@@ -469,7 +469,7 @@
startSectionXDoc(x,"Project Dependencies")
startListXDoc(x)
for depend in projectcontext.depends:
- addXItemXDoc(x,getContextLink(depend))
+
addXItemXDoc(x,getContextLink(depend),getContextStateDescription(depend))
endListXDoc(x)
endSectionXDoc(x)
@@ -477,7 +477,7 @@
startSectionXDoc(x,"Optional Project Dependencies")
startListXDoc(x)
for option in projectcontext.options:
- addXItemXDoc(x,getContextLink(option))
+
addXItemXDoc(x,getContextLink(option),getContextStateDescription(option))
endListXDoc(x)
endSectionXDoc(x)
@@ -485,7 +485,7 @@
startSectionXDoc(x,"Project Dependees")
startListXDoc(x)
for depend in projectcontext.dependees:
- addXItemXDoc(x,getContextLink(depend))
+
addXItemXDoc(x,getContextLink(depend),getContextStateDescription(depend))
endListXDoc(x)
endSectionXDoc(x)
@@ -493,7 +493,7 @@
startSectionXDoc(x,"Optional Project Dependees")
startListXDoc(x)
for option in projectcontext.optionees:
- addXItemXDoc(x,getContextLink(option))
+
addXItemXDoc(x,getContextLink(option),getContextStateDescription(option))
endListXDoc(x)
endSectionXDoc(x)
@@ -902,6 +902,12 @@
def getContextLink(context,depth=1):
return getLink(getContextUrl(context,depth),context.name)
+def getContextStateDescription(context):
+ xdoc=stateName(context.status)
+ if not context.reason==REASON_UNSET: xdoc+='/'+reasonString(context.reason)
+ if context.cause:
+ xdoc+=getContextLink(context.cause)
+
def getWorkspaceRelativeUrl(depth=0):
return getUp(depth)+'index.html'
@@ -1034,8 +1040,11 @@
def addItemXDoc(f,t,i=''):
f.write(' <li><strong>%s</strong>%s</li>\n' % (t,i))
-def addXItemXDoc(f,t):
- f.write(' <li>%s</li>\n' % (t))
+def addXItemXDoc(f,t,i=None):
+ if i:
+ f.write(' <li>%s - <strong>%s</strong></li>\n' % (t, i))
+ else:
+ f.write(' <li>%s</li>\n' % (t))
def addLinkXDoc(f,url,title):
f.write(' <link href=\'%s\'>%s</link>' % (url,title))
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]