Re: About EMF tutorial -Philmann Dark [message #1731042] |
Mon, 02 May 2016 09:02  |
Eclipse User |
|
|
|
This one is a little newer
http://eclipsesource.com/blogs/tutorials/emf-tutorial/
You can always substitute your own model for one in a tutorial.
On 02.05.2016 14:36, ima cha wrote:
> Hello all, i was reading the EMF tutorial of Philmann Dark until the
> point "Starting the project" and i was wondering if there is a
> tutorial for the second case where i have a model description
> (diagram) or should i follow as the procedure of this first case?
|
|
|
|
|
Re: About EMF tutorial -Philmann Dark [message #1731145 is a reply to message #1731106] |
Tue, 03 May 2016 03:48   |
Eclipse User |
|
|
|
On 02-May-16 22:19, ima cha wrote:
> Thank you so much. Actually, I'm a beginner in using EMF and i wonder if
> this could help me to know how to use reflective interfaces, i had an
> idea about them and i need to use them in my application where i found
> a piece of code in a book but it isn't mentioned how to recuperate the
> references of package and factory ( first and second line, just comments)
>
> [1] EFactory fact = //obtention de la référence
> [2] EPackage pa = //obtention de la référence
If you know which package/factory it is, you can just use
"Packagename"Factory.eINSTANCE and "Packagename"Package.eINSTANCE. Also,
there is "Packagename"Package.Literals which has constant interface
fields for all the elements in the package.
If you do not know the package, but the package uri namespace
identifier, you can look it up in the package registry:
EPackage.Registry.INSTANCE.getEPackage()/getEFactory()
hth,
FElix
|
|
|
|
Powered by
FUDForum. Page generated in 0.08514 seconds