[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Newsgroup Home]
|
[news.eclipse.tools.emf] Integrate with EMF code generation
|
- From: Martin Taal <mtaal@xxxxxxxxx>
- Date: Wed, 30 Jan 2008 12:45:12 +0100
- Newsgroups: eclipse.tools.emf
- Organization: EclipseCorner
- User-agent: Thunderbird 2.0.0.9 (X11/20071031)
Hi Ed (and others),
I would like users of Teneo to be able to generate jpa annotations in their model code. My thought
is that people install the Teneo plugins and EMF plugins and then with minimal
additions/configurations in their genmodel or project be able to generate jpa annotations in their
emf-generated code (using the standard EMF code generation menu options). Teneo generates the jpa
annotations but now I need to get them into the model code.
For this I can use dynamic templates (and provide these templates in a Teneo plugin), but more
importantly I need to prepare a separate model which is used by the templates, related to this I
have a classloading question.
For example I would like to add the following code to the templates (before the getter in the template):
jpaAnnotator.getAnnotations(EStructuralFeature eFeature)
however for this to work the EMF code generation plugin needs to know which class/instance
jpaAnnotator is (i.e. which plugin provides it and how to create it).
In addition it would be nice if the jpaAnnotator could get hold of the actual location of the ecore
or model files in the workspace so that it can read additional property/xml files. Is this something
which can be retrieved from the genmodel instance?
Are there specific extension points which I can use for this? Or is there a standard approach I can
follow?
I looked through previous posts on this topic but my main remaining question is especially the
classloading issue (how are the teneo plugins 'dynamically' added to the classpath of the emf
plugins) and how to inject an jpaAnnotator instance in the EMF code generation environment.
--
With Regards, Martin Taal
Springsite/Elver.org
Office: Hardwareweg 4, 3821 BV Amersfoort
Postal: Nassaulaan 7, 3941 EC Doorn
The Netherlands
Tel: +31 (0)84 420 2397
Fax: +31 (0)84 225 9307
Mail: mtaal@xxxxxxxxxxxxxx - mtaal@xxxxxxxxx
Web: www.springsite.com - www.elver.org