Created
December 10, 2012 21:45
-
-
Save xcriptus/4253658 to your computer and use it in GitHub Desktop.
StarUML - Model Exploration - OwnedElement & Namespaces
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var staruml = new ActiveXObject("StarUML.StarUMLApplication"); | |
var project = staruml.GetProject(); | |
VisitOwnedElement(project,""); | |
function VisitOwnedElement(owner,indent){ | |
for (var i = 0; i < owner.GetOwnedElementCount(); i++){ | |
var element = owner.GetOwnedElementAt(i); | |
// Process the current element | |
staruml.AddMessageItem(1,indent+element.Name+" : "+element.getClassName(),element) ; | |
// Recursive call if this is a Namespace | |
if (element.IsKindOf("UMLNamespace")) { | |
VisitOwnedElement(element," "+indent); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment