Book a Demo

Author Topic: define "import package"  for java class  (Read 2711 times)

Piotr Rezmer

  • EA Novice
  • *
  • Posts: 11
  • Karma: +0/-0
    • View Profile
define "import package"  for java class
« on: November 13, 2012, 03:34:35 am »
Hello,

Is there any way to store packages required by java class, so that it would generate corresponding "import java.something" entries in generated source code? I have some classes equipped with methods using arguments like java.util.Date.

kind regards
Piotr Rezmer
best regards
Piotr Rezmer

Piotr Rezmer

  • EA Novice
  • *
  • Posts: 11
  • Karma: +0/-0
    • View Profile
Re: define "import package"  for java class
« Reply #1 on: November 13, 2012, 06:02:34 am »
I think I found it.

When I right click on Class in Project Browser, then select Generate Code, it opens a dialog with memobox named "Import(s)/Header(s)".
Here I can specify:

import java.util.Date;

EA generates this import in the source code but it requires to change to "replace (overwrite) mode" instead of "synchronize with existing file".

I think that this field imports/headers should be located in Class properties.
best regards
Piotr Rezmer