Re: [mdr-users] createExtent(String, RefObject, RefPackage[])

Pieter Van Gorp <[email protected]> Mon, 8 Aug 2005 15:13:17 +0200
Newsgroups gmane.comp.java.netbeans.modules.mdr.user
Message-ID <[email protected]>
Hi all,

On 8/5/05, Pieter Van Gorp <[email protected]> wrote:
> > >I passed a one-size array containing a UML extent to it but the
> > >clustered UML extent of my tracing extent (see
> > >http://www.fots.ua.ac.be/motmot/docs/traceability-p3.php) remains
> > >empty.
> > >
> > That's weird - it should work correctly. I.e. if package A clusters
> > package B and you create instance of B, then if you pass this instance B
> > into the createExtent() method to create extend A, the instance of B
> > should be reused.
> Well, this is not the case in my test: a call to
> handleToTraceModel.getUml().getCore().getAttribute().refAllOfClass().size()
> returns 0 while the original UML model contained a lot of attributes.
> My other mail also indicates the UML sub-extent is empty... I'll
> prepare a small test to reproduce this with minimal effort.
The problem can be reproduced by unpacking
http://www.fots.ua.ac.be/~pvgorp/tmp/crossreferences.tar.gz and
calling maven inside the "crossreferences" directory.  As stated, the
following call (from testWriteXMIforUMLmodelClusteredWithinTraceModel)
illustrates that the nested UML extent does not contain the UML model
that was loaded from XMI:
logger.debug("Number of attributes within clustered UML model:
"+handleToTraceModel.getUml().getCore().getAttribute().refAllOfClass().size());

The source of the testcase is located in the tests directory.

Looking forward to learn how to fix this,
thanks in advance,
Pieter.