|
Re: Creating an Instance on ModelPackage; Extension Point [message #431667 is a reply to message #431660] |
Tue, 21 July 2009 12:00 |
|
RCH schrieb:
> Hi,
>
> I defined an Extension Point which I would like to use for EPackage
> (attribute "class").
Why don't you use the global EPackage.Registry.INSTANCE? Generated
packages are automatically contributed to this registry in a lazy manner.
Cheers
/Eike
----
http://thegordian.blogspot.com
http://twitter.com/eikestepper
> I think the EP is ok. But if I want to create an instance of an
> EPackage, in this case ModelPackage, using this statement
>
> Object o = e.createExecutableExtension("class");
>
> the following Exception appears
>
> org.eclipse.core.runtime.CoreException: Plug-in "org.xxx.yyy.model"
> was unable to instantiate class
> "org.xxx.yyy.model.impl.ModelPackageImpl".
>
> The class ModelPackageImpl is a EPackageIml and is generated by EMF.
>
> I used this EP for other classes, for example EFactory, and it works.
> But I can not instanciate EPackage.
>
> Can somebody please tell me what is the problem? Or am I doing
> something wrong?
>
> Thank you very much,
>
> RCH
>
Cheers
/Eike
----
http://www.esc-net.de
http://thegordian.blogspot.com
http://twitter.com/eikestepper
|
|
|
|
Powered by
FUDForum. Page generated in 0.02006 seconds