Re: [mdr-users] JMI mapping problem on package subtyping
Martin Matula <[email protected]>
| Newsgroups | gmane.comp.java.netbeans.modules.mdr.user |
|---|---|
| Message-ID | <[email protected]> |
That's weird - the elements should be referenced using fully qualified names so no java import should be necessary. This seems like a JMI mapper bug. Could you create a new issue in issuezilla against mdr module and attach your metamodel (or any other simple metamodel that demonstrates the issue)? Thanks in advance, Martin Frédérick Seyler wrote: > Hi, > I'am now trying to use subtyping and import relation between MOF packages > "Origin" package is a subtype of "Interface" and and imports > "Implementation" package I directly added an association between an > objects of Interface and an object of Implementation in Origin package, > in the XMI file. > I wrote a XMI JMI Mapper creating an extent from this this XMI file > and mapping all the MOF packages > in a src directory, but this mapping doesn't generate the "import" > statements in the source java files, and the compilation fails > > Can anybody help me? How could I solve it? > thanks! > > <Model:Package xmi.id = 'a125' name = 'Origin' annotation = '' > isRoot = 'false' > isLeaf = 'false' isAbstract = 'false' visibility = 'public_vis'> > <Model:Namespace.contents> > <Model:Association xmi.id = 'a53' name = 'CompOrigin' > annotation = '' isRoot = 'false' > isLeaf = 'false' isAbstract = 'false' visibility = > 'public_vis' isDerived = 'false'> > <Model:Namespace.contents> > <Model:AssociationEnd xmi.id = 'a54' name = 'compo' > annotation = '' isNavigable = 'true' > aggregation = 'none' isChangeable = 'true'> > <Model:AssociationEnd.multiplicity> > <XMI.field>1</XMI.field> > <XMI.field>1</XMI.field> > <XMI.field>false</XMI.field> > <XMI.field>true</XMI.field> > </Model:AssociationEnd.multiplicity> > <Model:TypedElement.type> > <Model:Class xmi.idref = 'a23'/> > </Model:TypedElement.type> > </Model:AssociationEnd> > <Model:AssociationEnd xmi.id = 'a55' name = 'origin' > annotation = '' isNavigable = 'true' > aggregation = 'none' isChangeable = 'true'> > <Model:AssociationEnd.multiplicity> > <XMI.field>1</XMI.field> > <XMI.field>1</XMI.field> > <XMI.field>false</XMI.field> > <XMI.field>true</XMI.field> > </Model:AssociationEnd.multiplicity> > <Model:TypedElement.type> > <Model:Class xmi.idref = 'a56'/> > </Model:TypedElement.type> > </Model:AssociationEnd> > </Model:Namespace.contents> > </Model:Association> > <Model:Import xmi.id = 'a126' annotation = '' visibility = > 'public_vis' > isClustered = 'true'> > <Model:Import.importedNamespace> > <Model:Package xmi.idref = 'a119'/> > </Model:Import.importedNamespace> > </Model:Import> > </Model:Namespace.contents> > <Model:GeneralizableElement.supertypes> > <Model:Package xmi.idref = 'a82'/> > </Model:GeneralizableElement.supertypes> > </Model:Package> > .... > > >