[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [wtp-dev] Java EE 5 models design overview

Raev, Kaloyan wrote:

[...]

Now, the Java EE 5 models problem can be split in the following tasks: 1. Build an EMF model based on the deployment descriptors' XML Schemas. 2. Parse Java Annotations from the Java files. 3. Index the parsed annotations in a way they can be easily retrieved. 4. Make the EMF model to be influenced by the available annotations. 5. Update Java Annotation with changes on the EMF model.

Task 1. Build an EMF model based on the deployment descriptors'' XML Schemas.
This can be done easily with the available toolset provided by the EMF project. The EMF model is generated by the XML Schemas for the Java EE 5 deployment descriptors. A problem appears if we want to split the generated classes in separate packages for better structure:


_http://www.eclipse.org/newsportal/article.php?id=20770&group=eclipse.tools.emf#20770_ <http://www.eclipse.org/newsportal/article.php?id=20770&group=eclipse.tools.emf#20770>


However, this problem is solvable at least with manual refactoring of the generated classes.


Actually, the current J2EE models rely on hand-coded XML translation between the EMF and DOM model, using the nifty Translator framework. Making that work with an EMF model is done by hand, and not for the faint of heart.
However, it gives rewards with round-trip editing inside SSE and with the possibility of versioning the XML, e.g. for web.xml 2.2, 2.4.


We're using this framework in the Mule IDE - it is very powerful, but has its quirks.

-Jesper