Attribute of Date type

Dear All,

I’ve got Person class with 2 attribubes:

  • name : String
  • birthDate : Date

The birthDate attribute specification is as shown in the picture.

The Java code generator produces the following code:

package pl.ustawa;

import java.util.*;

public class Person {

	private String name;
	private java.util.Date birthDate;

	public String getName() {

	public void setName(String value) { = value;

	public java.util.Date getBirthDate() {
		return this.birthDate;

	public void setBirthDate(java.util.Date value) {
		this.birthDate = value;

Unfortunately Eclipse displays an error in the line 03:
The import java.util is never used

Is it possible to set up Java generator in VP:

  • not to generate this import line in the code (line 03)
  • use short type name (just Date) for birthDate attribute (line 08 )

Best regards,



Hello Sergio,

We will generate the import statement for data type if the type are also modeled in the project. For your case you can use the Instant Reverse feature to reverse the java.util.Date form JDK source into model. After that we will able to resolve and generate the proper import statement. You can find out more details about how to use Instant Reverse at

Best regards,
Rain Wong