A forward project (in Java, for example)
1 Setting the default language to Java
Tools, Options->notation->dafault: Choosing Java
2 Set the directory location where the forward engineering generated Java files are saved (typically specified as the SRC directory of the project)
ClassPath, Project specification, Tools, JAVA/J2EE, click New to select the path: Figure
3 Open a well-designed class diagram, select the class of Java files you want to generate, and you can choose multiple options (hold down the CTRL key or the Mouse wide box)
4 Generating Java files
General Code, Tools-JAVA/J2EE
5 complete
Precautions:
1 Avoid the generated Java classes that contain rose other information:
Project specification, Tools-JAVA/J2EE, go to Generate Rose Id, Generate Default Return line off selected state
2 adding the Gettter (), setter () method of each attribute to a class
Select the class of Java files you want to generate-right-click, select Open Stantard Specification-----Operations----Select the first line (that is, to set the ID property) Double-click
---> select java---> Propertytpe, drop-down select simple, complete the settings for the id attribute gettter (), Setter () method, as shown in figure
Again, in turn, set other properties name, Addre_mail
Note: Personal recommendations do not use this feature, you can complete the gettter (), Setter () method, and the constructor of related parameters for each property through the Eclipse tool
3 Inter-class call relationship design
General Class A calls Class B, which can be achieved by assigning a value to Role A in association spencification. As shown in figure:
Attached: useful small function settings
Format---Layout Diagram, you can neatly lay out all the classes
2: Reverse generation of UML design classes
Click tools-> java/j2ee-> Reverse Engineer to bring up the Java Reverse Engineer dialog box. As shown in figure:
Add the Java file you want to reverse engineer on this page and select it, then click the Reverse button to