Home > Preferences

JDT Preference

EclipseUML is tightly integrated in JDT. Therefore, JDT Java code generation options are used directly by two components in EclipseUML:

In this example, f character will prefix any new field name.


Reverse engineering

See the detail example in Getter/Setter method recognition in UML Model Reverse Engineering

Java Code generation

EclipseUML uses this option to generate Java code for attributes. When you create an attribute via diagram, EclipseUML 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.

 

public class Employee
{
    /**
     * @uml property=company associationEnd={multiplicity={(0 1)} ordering=ordered elementType=
     * company.Company}
     */
    private Company fCompany;
 
    /**
     * @uml property=company
     */
    public Company getCompany()
    {
        return fCompany;
    }
 
    /**
     * @uml property=company
     */
    public void setCompany(Company company)
    {
        fCompany = company;
    }
 
    /**
     *
     * @uml property=name
     */
    private String fName;
 
    /**
     *
     * @uml property=name
     */
    public String getName()
    {
         return fName;
    }
 
    /**
     *
     * @uml property=name
     */
    public void setName(String fName)
    {
         this.fName = fName;
    }
}