summaryrefslogtreecommitdiffstats
path: root/scripts/xmi2qt.pl
diff options
context:
space:
mode:
authorSandro S. Andrade <sandroandrade@kde.org>2013-11-01 18:29:35 -0300
committerSandro S. Andrade <sandroandrade@kde.org>2013-11-01 22:35:03 +0100
commit4819f16c142e39061dafb8ebf14ca180037e2d77 (patch)
treea7aa954e7b5a666a003448fef5ae5ad569131f77 /scripts/xmi2qt.pl
parent768419e7f612f76eec0e7c75ff240f13e7d76edc (diff)
Add initial steps for UML Profiles code generation
Change-Id: I9673531b25ef305a972383f5abc24d1a2e0a9779 Reviewed-by: Sandro S. Andrade <sandroandrade@kde.org>
Diffstat (limited to 'scripts/xmi2qt.pl')
-rwxr-xr-xscripts/xmi2qt.pl7
1 files changed, 7 insertions, 0 deletions
diff --git a/scripts/xmi2qt.pl b/scripts/xmi2qt.pl
index 3be79c35..64e827c5 100755
--- a/scripts/xmi2qt.pl
+++ b/scripts/xmi2qt.pl
@@ -56,6 +56,10 @@ my $tt = Template->new(INTERPOLATE => 1, INCLUDE_PATH => 'templates/');
my $xmi = XML::XPath->new(filename => $options{i});
my $namespace = $xmi->findvalue('//uml:Package/@name');
+if ($namespace eq "") {
+ $namespace = $xmi->findvalue('//uml:Profile/@name');
+}
+
make_path($options{o}."/".$namespace."/"."qobjects");
{
@@ -98,6 +102,9 @@ close STDOUT;
}
my $classset = $xmi->find('//packagedElement[@xmi:type=\'uml:Class\']');
+if ($classset->size() == 0) {
+ $classset = $xmi->find('//packagedElement[@xmi:type=\'uml:Stereotype\']');
+}
foreach my $class ($classset->get_nodelist) {
my $className = $class->findvalue('@name');
die "could not fork" unless defined(my $pid = fork);