Book a Demo

Author Topic: Style/Usage of Root Folders  (Read 2797 times)

John Gentilin

  • EA Novice
  • *
  • Posts: 19
  • Karma: +0/-0
    • View Profile
Style/Usage of Root Folders
« on: October 07, 2015, 09:30:50 am »
So I am new to EA here, evaluating the produce and have an style/usage related question.

In my project, I created several root folders.
The top level root folder is called System which contains folders for System wide elements,  Deployment diagrams, Actors, etc.

The sibling root folders correspond to individual projects that will have separate code bases. i.e.

Service1
Service2
LibA
LibB

Where Service 1&2 are standalone programs and Lib A&B are shared libraries between Service 1&2. Each of the the 4 projects will have their
own code generation cycle, Eclipse project, etc.

Inside LibA I have a folder called "Class Model", then corresponding folders below that for my package hierarchy to my class objects.

In Service1, I reference a class from LibA as a dependent class.

From here I have 2 questions.

1) is this a reasonable use of UML/Class modeling in EA, root folders per code base.

2) When I generate code, since the Class in Service1 is dependent on a class in LibA, it correctly generates an import statement, but it prepends the package name with "Class Model" i.e.
import Class Model.com.foo.bar

How do I suppress the top level package from being included in the file.

Thank You
John Gentilin

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8110
  • Karma: +119/-20
    • View Profile
Re: Style/Usage of Root Folders
« Reply #1 on: October 08, 2015, 08:27:25 am »
Assuming you're using EA's native code generator:

1. Right click on the package and select Code Engineering | Set Namespace Root.
2. All remotely recent versions of EA should automatically treat packages with spaces in the name as a namespace root anyway.