eUML2 Modeler is tightly integrated in JDT. Therefore, JDT Java code generation
options are used directly by two components in eUML2 Modeler:
See the detail example in Getter/Setter method recognition in UML Model Reverse Engineering
eUML2 Modeler uses this option to generate Java code for attributes. When you create an attribute via diagram, eUML2 Modeler code generator will concatenate the first prefix/suffix in this option to produce the Java attribute name. Using our previous example, if we add a new attribute String name:
we will get a Java attribute fName instead.
/**
* @uml.dependency supplier="demo.Company"
*/ public class Employee { /**
* @uml.property name="name"
*/
private String fName = ""; /**
* Getter of the property <tt>name</tt>
* @return Returns the fName.
* @uml.property name="name"
*/
public String getName() {
return fName;
} /**
* Setter of the property <tt>name</tt>
* @param name The fName to set.
* @uml.property name="name"
*/
public void setName(String name) {
fName = name;
} /**
* @uml.property name="company"
* @uml.associationEnd inverse="employee:demo.Company"
*/
private Company fCompany; /**
* Getter of the property <tt>company</tt>
* @return Returns the fCompany.
* @uml.property name="company"
*/
public Company getCompany() {
return fCompany;
}
/**
* Setter of the property <tt>company</tt>
* @param company The fCompany to set.
* @uml.property name="company"
*/
public void setCompany(Company company) {
fCompany = company;
} }