summaryrefslogtreecommitdiffstats
path: root/tools/class2uml.py
diff options
context:
space:
mode:
authorJan Safranek <jsafrane@redhat.com>2013-01-11 14:47:50 +0100
committerJan Safranek <jsafrane@redhat.com>2013-01-11 15:03:01 +0100
commit9791f84ea41b5de5fa7fb651a3d284b6ebe67176 (patch)
tree2f787ddef77d52ebac22046e186b8503ea25b362 /tools/class2uml.py
parentdf6847b72e4ba18d34c9309847f1f8c061102dd0 (diff)
downloadopenlmi-providers-9791f84ea41b5de5fa7fb651a3d284b6ebe67176.tar.gz
openlmi-providers-9791f84ea41b5de5fa7fb651a3d284b6ebe67176.tar.xz
openlmi-providers-9791f84ea41b5de5fa7fb651a3d284b6ebe67176.zip
Check 'Implemeted' qualifier and show all implemented properties/methods as local.
Diffstat (limited to 'tools/class2uml.py')
-rwxr-xr-xtools/class2uml.py12
1 files changed, 7 insertions, 5 deletions
diff --git a/tools/class2uml.py b/tools/class2uml.py
index d46bcc5..99e547e 100755
--- a/tools/class2uml.py
+++ b/tools/class2uml.py
@@ -101,18 +101,20 @@ class UmlExporter(object):
def compare_properties(self, p1, p2):
"""
- Compare two properties. Only Name and Description are checked.
+ Compare two properties if they should printed in Inherited properties.
+ Only Name, Description and Implemented are checked.
+ Returns False, if the property should be printed in Local.
"""
if p1.name != p2.name:
return False
- i1 = p1.qualifiers.get("Implemented", None)
- i2 = p2.qualifiers.get("Implemented", None)
- if i1 and i1.value and not (i2 and i2.value):
- return False
d1 = p1.qualifiers.get("Description", None)
d2 = p2.qualifiers.get("Description", None)
if d1.value != d2.value:
return False
+ i1 = p1.qualifiers.get("Implemented", None)
+ i2 = p2.qualifiers.get("Implemented", None)
+ if i1 and i1.value and not (i2 and i2.value):
+ return False
return True
def print_class(self, c, display_local = True, box_only = False):