Re: [mdr-users] MDR and Eclipse

Mirko Stölzel <[email protected]> Fri, 09 Sep 2005 17:07:46 +0200
Newsgroups gmane.comp.java.netbeans.modules.mdr.user
Message-ID <[email protected]>
Hi,

i solved my problem. it was my mistake! i used the wrong java version 
for my plugin.

mirko

Mirko Stölzel schrieb:

> Hi,
>
> i want to use mdr whithin an eclipse-plugin. after my first
> problems i read the archive of this mailing list and i found
> many helpful tips. so i use the lookup class shown in the thread
> http://mdr.netbeans.org/servlets/ReadMsg?list=users&msgId=938618 
> <http://mdr.netbeans.org/servlets/ReadMsg?list=users&msgId=938618>
> as my lookup class and everything works fine. i can load my uml
> metamodel and i can create my model.
>
> but when i want to create an instance of the class OclLibrary of
> my metamodel i get a problem.
> as you can see in the custom implementation of this class i want
> to execute the method findPackage(pathname) of an existing instance
> named topPackage.
>
> protected OclLibraryImpl(StorableObject storable)
> {        super(storable);
>   ModelHelper mh = ModelHelper.getInstance((Uml15Package) 
> this.refOutermostPackage());
>   Package topPackage= mh.getTopPackage();
>   List pathname = new ArrayList();
>   pathname.add("oclLib");
>   Package oclLibPackage = (Package) topPackage.findPackage(pathname);
> }
>
> after executing the findPackage() method i get the following exception:
>
> org.netbeans.mdr.util.DebugException
>    at 
> org.netbeans.mdr.NBMDRepositoryImpl.getHandler(NBMDRepositoryImpl.java:671) 
>
>    at 
> org.netbeans.mdr.NBMDRepositoryImpl.getHandler(NBMDRepositoryImpl.java:613) 
>
>    at 
> org.netbeans.mdr.handlers.ClassProxyHandler._handleCreate(ClassProxyHandler.java:90) 
>
>    at 
> tudresden.ocl20.jmi.uml15.uml15ocl.types.OclLibraryClass$Impl.createOclLibrary(Unknown 
> Source)
>    at 
> tudresden.ocl20.jmi.uml15.impl.uml15ocl.types.OclLibraryClassImpl.getInstance(OclLibraryClassImpl.java:58) 
>
>    at 
> tudresden.ocl20.jmi.uml15.uml15ocl.types.OclLibraryClass$Impl._invokeOperation(Unknown 
> Source)
>    at 
> org.netbeans.mdr.handlers.FeaturedHandler.refInvokeOperation(FeaturedHandler.java:110) 
>
>        ...
>
>
> i cannot see any problems because i use the same implementation in a
> standalone application and everything works fine.
> i hope someone can help me.
>
> Mirko
>