I am using VP SDE-EC Standard Edition V5.0. I’d like to generate Java code out of class diagrams that use utility classes like java.util.GregorianCalendar. So the container class contains statements like
private GregorianCalendar _lastEdited;
This code is generated by the Java code generator. What I don’t know is how to make the generator create the corresponding import statement, like in this case
Thanks in advance,
Thanks for your post. We already support generate import fully-qualified statement in Instant Generator for Java in SDE-EC (please refer to the attached image). Could you please tell me which build you are using (can get from About dialog of SDE-EC), and send me a sample project to repeat your problem? Thanks in advance!
I was pretty sure that this is supported, I just didn’t know how to do it. Meanwhile I know that I have to enter the full qualified name of the class in the attribute definition, like in this case ‘java.util.GregorianCalendar’. That is all. I let myself mislead by the fact that in some cases (like for class relationships via lists) VP does generate the necessary import statements automatically (like ‘import java.util.Vector;’).
Thanks for your reply anyway,
and sorry for the silly question.
Thanks for replying. I believe you did not have “java.util.GregorianCalendar” in your class repository so that it does not generate the import statement in code. Please refer to the following flash movie of how to get the Java library class in your class repository and generate the fully-qualified import statement:
Hope this solves your problem.
Yes it does. Thanks a lot.
It’s my pleasure.