summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGuillaume Seguin <ixce@ed3n-m.(none)>2009-10-22 17:13:39 +0200
committerGuillaume Seguin <ixce@ed3n-m.(none)>2009-10-22 17:13:39 +0200
commit3c26efdc44d93924903cab8a190456f034eb2d7a (patch)
tree7886e88f935a3f396103cff06d25a5975557960b
parent7f38e26fef3e7978bea36b7c5c0a23821bfb1105 (diff)
downloadumlpy-3c26efdc44d93924903cab8a190456f034eb2d7a.tar.gz
umlpy-3c26efdc44d93924903cab8a190456f034eb2d7a.tar.bz2
Add --all-properties option
-rw-r--r--grapher.py11
1 files changed, 8 insertions, 3 deletions
diff --git a/grapher.py b/grapher.py
index cb58fd8..833f198 100644
--- a/grapher.py
+++ b/grapher.py
@@ -30,9 +30,12 @@ parser.add_option("-f", "--force", dest = "forces", action = "append",
default = [],
help = "classes matching this regexp will be forced into \
display")
-parser.add_option("--all-methods", dest = "all_methods", action = "store_true",
- default = False,
+parser.add_option("--all-methods", dest = "all_methods",
+ action = "store_true", default = False,
help = "shows all methods")
+parser.add_option("--all-properties", dest = "all_properties",
+ action = "store_true", default = False,
+ help = "shows all properties")
parser.add_option("-o", "--output", dest = "output", action = "store",
default = "uml.png",
help = "output file")
@@ -47,6 +50,7 @@ forces = reduce (lambda x, y: x + y,
map (lambda s: s.split(","), options.forces), [])
prefix = options.prefix
all_methods = options.all_methods
+all_properties = options.all_properties
output = options.output
print "Settings"
@@ -54,6 +58,7 @@ print "--------"
print "Output file :", output
print "Prefix :", prefix
print "Show all methods :", all_methods
+print "Show all properties :", all_properties
print "Excludes :", excludes
print "Includes :", includes
print "Forces :", forces
@@ -225,7 +230,7 @@ for class_name in classes:
if is_excluded (class_name):
continue
for (var_name, type_name) in vars_dict[class_name]:
- if not type_name or is_excluded (type_name):
+ if not all_properties and (not type_name or is_excluded (type_name)):
continue
if class_name not in var_fields_dict:
var_fields_dict[class_name] = []