You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@gump.apache.org by le...@apache.org on 2005/07/05 21:14:08 UTC

svn commit: r209306 - /gump/branches/Gump3/pygump/python/gump/plugins/introspection.py

Author: leosimons
Date: Tue Jul  5 12:14:03 2005
New Revision: 209306

URL: http://svn.apache.org/viewcvs?rev=209306&view=rev
Log:
Some more useful introspection.

 * pygump/python/gump/plugins/introspection.py: also look at properties for Commands.

Modified:
    gump/branches/Gump3/pygump/python/gump/plugins/introspection.py

Modified: gump/branches/Gump3/pygump/python/gump/plugins/introspection.py
URL: http://svn.apache.org/viewcvs/gump/branches/Gump3/pygump/python/gump/plugins/introspection.py?rev=209306&r1=209305&r2=209306&view=diff
==============================================================================
--- gump/branches/Gump3/pygump/python/gump/plugins/introspection.py (original)
+++ gump/branches/Gump3/pygump/python/gump/plugins/introspection.py Tue Jul  5 12:14:03 2005
@@ -56,6 +56,15 @@
         msg += "\n\nAll possible project properties:\n   "
         msg += "\n   ".join(allproperties)
 
+        allproperties = []
+        for v in workspace.projects.values():
+            for c in v.commands:
+                properties = [prop for prop in dir(c) if not prop.startswith("__") and not prop in allproperties]
+                allproperties.extend(properties)
+        allproperties.sort()
+        msg += "\n\nAll possible command properties:\n   "
+        msg += "\n   ".join(allproperties)
+
         msg += "\n\nAll known repositories:\n"
         for k in workspace.repositories.keys():
             msg += "   %s\n" % k
@@ -81,4 +90,14 @@
         #    if callable(att):
         #        continue
         #    self.log.debug("XML-APIS attribute %s has value %s" % (prop, att))
+        
+        #bootstrapant = workspace.projects["bootstrap-ant"]
+        #for c in bootstrapant.commands:
+        #    from gump.model import Script
+        #    if isinstance(c, Script):
+        #        for p in dir(c):
+        #            att = getattr(c, p)
+        #            if callable(att):
+        #                continue
+        #            self.log.debug("BOOTSTRAP-ANT command attribute %s has value %s" % (p, att))