[mdr-users] Clustering extents managed by non-MDR repositories

Pieter Van Gorp <[email protected]> Wed, 15 Feb 2006 17:13:08 +0100
Newsgroups gmane.comp.java.netbeans.modules.mdr.user
Message-ID <[email protected]>
Hi all,
is it possible to cluster extents managed by non-MDR repositories?

More specifically, we're trying to create a cluster of the UML extent
in MagicDraw 10.  If you look at the interfaces of MagicDraw and MDR,
everything seems fine.  However, we've just encountered a class cast
exception on line 752 of NBMDRepositoryImpl, which contains:
Object result =3D
packages.put(((BaseObjectHandler)pkg.refMetaObject())._getDelegate().getMof=
Id(),
pkg);

This raises:
java.lang.ClassCastException: com.io_software.catools.tas.mof.model.Package=
Impl
        at org.netbeans.mdr.NBMDRepositoryImpl.collectPackageInstances(NBMD=
RepositoryImpl.java:752)
        at org.netbeans.mdr.NBMDRepositoryImpl.createExtent(NBMDRepositoryI=
mpl.java:466)
        at org.netbeans.mdr.NBMDRepositoryImpl.createExtent(NBMDRepositoryI=
mpl.java:292)
        at org.segravis.icons.helper.Driver.loadClusteringExtent(Driver.jav=
a:196)

Reading the source, it seems like our MDR/MagicDraw integration will
not work since  the MagicDraw classes do not implement internal MDR
classes like BaseObjectHandler.  Is this a fundamental limitation of
MDR or are we overlooking something?

Note that we've passed MagicDraw's repository as the single element of
the RefPackage array argument to createExtent.  On a type level,
that's OK but it's at the dynamic type cast that things go wrong...

Thanks in advance,
--
Pieter Van Gorp
       Teaching and Research Assistant
       FOrmal Techniques in Software engineering (FOTS)
       University of Antwerp
       Middelheimlaan 1
       2020 Antwerpen - Belgium
       Office: G.304
       Phone: +32 3 265 38 71
       Fax: +32 3 265 37 77
       http://www.fots.ua.ac.be/~pvgorp/research/
       http://motmot.sourceforge.net/

``A man has to live with himself, and he should see to it that he
always has good company [Charles Evans Hughes]''