Own type library [message #420608] |
Thu, 03 July 2008 16:33 |
Timothy Marc Messages: 547 Registered: July 2009 |
Senior Member |
|
|
Hi all,
we have a metamodel, for which we want to provide some predefines datatypes
(we have modeled an own type system, which is close to the UML or Ecore type
model, but not equivalent) in an external library. I've read about how to
define such a library, but didn't find the article yet.
IMHO, such a type library is a common instance of our metamodel, in which we
define some datatypes and than loading this ressource by using "Load
Ressource" functionality whenever we want to use it. But it should be better
to include it into our metamodel plugin, so that it will be present, if the
whole metamodel is present. Is that correct or are there some other, mean
trapps in the topic?
Dam, i really lost the link about the library stuff...
Thanks
-- Timothy
|
|
|
Re: Own type library [message #420609 is a reply to message #420608] |
Thu, 03 July 2008 17:11 |
Ed Merks Messages: 33137 Registered: July 2009 |
Senior Member |
|
|
Timothy,
Comments below.
Timothy Marc wrote:
> Hi all,
>
> we have a metamodel, for which we want to provide some predefines datatypes
> (we have modeled an own type system, which is close to the UML or Ecore type
> model, but not equivalent) in an external library. I've read about how to
> define such a library, but didn't find the article yet.
>
It's as simple as defining an EDataType and them implementing the
createAbcFromString/convertAbcToString methods in the generated
XyzFactoryImpl. EcoreFactoryImpl and XMLTypeFactoryImpl are good
examples with lots of data types defined.
> IMHO, such a type library is a common instance of our metamodel, in which we
> define some datatypes and than loading this ressource by using "Load
> Ressource" functionality whenever we want to use it. But it should be better
> to include it into our metamodel plugin, so that it will be present, if the
> whole metamodel is present. Is that correct or are there some other, mean
> trapps in the topic?
>
It's totally up to you if you want to put your data types in a separate
package from the rest of your model or in the same package. Whatever is
simplest or most convenient is probably best...
> Dam, i really lost the link about the library stuff...
>
> Thanks
> -- Timothy
>
>
>
Ed Merks
Professional Support: https://www.macromodeling.com/
|
|
|
Powered by
FUDForum. Page generated in 0.01244 seconds