EA class diagram and code synchronization

Source: Internet
Author: User

Drawing a picture for a while, it becomes increasingly felt that the EA is a powerful software, not just a drawing tool so simple.

With the extension of learning time, now the code is not as arbitrary as before, think of what to knock on what, but to first draw (that is, the process of demand and thinking), but for now we, there will always be considered not comprehensive place, then hit the code when there are a lot of changes, and will be more and more, And the project acceptance of the code and drawings are to be accepted, so the code in the changes when the diagram should be improved accordingly, then with the EA drawing and code synchronization will save a lot of things.

First, draw the class diagram.

1. Create a new class, fill in the class name, remark and language.

2. Edit variables and properties

The attributes are basically not changed.

Then select the class diagram and right-click to view the source code preview:

4. Generate Code

5. Add to Program

So if the diagram and code are synchronized, by the class diagram to generate code, when we modify the code in VS, as long as the EA to select the class diagram, right-click Select Code synchronization, you can synchronize the code changes to the class diagram, corresponding to modify the class diagram, generate code again, you can update the code in VS.

For example, in VS, add a Vipcash attribute to basicdataentity, and then the code synchronizes with the results such as:

The strength of the EA is gradually emerging, good use of the material also, some good tools will greatly improve our efficiency, but this also should be based on enough knowledge and use, if put before, I do not bother to bird it ...

EA class diagram and code synchronization

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.