|
Re: EMF : get Eclass from ClassifierID [message #641658 is a reply to message #641649] |
Fri, 26 November 2010 14:46 |
Ed Merks Messages: 33216 Registered: July 2009 |
Senior Member |
|
|
Sébastien,
Please use the EMF newsgroup (eclipse.tools.emf) for questions about
EMF. More comments below.
Sébastien Gandon wrote:
> Hello,
>
> I use the ClassifierID to identify some class type that I use in
> server-client application.
It's typically better to use the name, at least for any long term storage...
> I need to recreate the model from the classifier ID that is create
> instances, using my factory but using ClassifierId.
You'll need to know the package/factory as well then.
> Or the creation method all use EClass definition and not Classifier.
Yes, because an EClassifier can be either an EClass (instances of which
are EObjects) or an EDataType (instances of which can be any Java type).
> Is there any Utilities method or genereted method to create an
> Instance from the ClassifierID or to get the EClass instance from the
> classifier.
No, because creating an instance of an EDataType requires some
information from which to create it. E.g., you can't create a Integer
unless you specify the value it should have.
> I have noticied that the Factory implementation already has a switch
> with the ClassifierID but embeded in a Create(EClass) method.
Yes, it only covers the classifiers that represent classes.
Ed Merks
Professional Support: https://www.macromodeling.com/
|
|
|
Powered by
FUDForum. Page generated in 0.03648 seconds