Steps and configurations of using EMF to generate Java code

Source: Internet
Author: User

Step 1: Import EMF plug-ins to the relevant directories (plugins, features)

Step 2: Create an EMF project. <! -- More -->

 

Step 3: enter the name of the generated project

 

Step 4: Import XSD and modify the corresponding name:

 

 

 

 

Step 5: Click Finish to configure ecore-related attributes and click Save.

 

 

Step 6: Configure genmodel attributes
Select its root directory:

 

 

We need to configure the following attributes:
ALL:
Compiance level (compilation level): 1.5
Copyright text
Model class defaults:
Public constuctors: Public (recommended), which is protected by default.

Select its second-level directory

Configure the following attributes:
ALL:
Base package: your own default start package name (for example, org. Eclipse)
Prefix: Model

Step 7: generate a model

 

Note: This article is just a reference demonstration based on our project. It is not suitable for all situations. You can modify the attributes as needed!

 

This article is original at eclipselight.org.Article, Reprinted, please indicate the source.
Fixed Link: http://www.eclipselight.org/java/235/

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.