|
Revision 603, 462 bytes
(checked in by slmm, 3 years ago)
|
Updated export plugin to handle tagged values. I tested a class and an
attribute tagged with some values against ArchGenXML. I must say I am delighted
to see this work :-) Next stop world domination! ;-)
|
- Property svn:eol-style set to
native
- Property svn:keywords set to
Author Date Id Revision
|
| Line | |
|---|
| 1 |
import time |
|---|
| 2 |
import gaphor |
|---|
| 3 |
from gaphor import UML |
|---|
| 4 |
import kid |
|---|
| 5 |
|
|---|
| 6 |
class KidExport(object): |
|---|
| 7 |
template = "/home/jeroen/OpenSource/gaphor/data/plugins/kidexport/xmi.kid" |
|---|
| 8 |
|
|---|
| 9 |
def export(self, filename): |
|---|
| 10 |
"""Export the loaded Gaphor model with the specific template.""" |
|---|
| 11 |
template = kid.Template(file=self.template) |
|---|
| 12 |
isinstance(template, kid.XMLSerializer) |
|---|
| 13 |
f = open(filename, 'w') |
|---|
| 14 |
f.write(template.serialize()) |
|---|
| 15 |
f.close() |
|---|