Book a Demo

Author Topic: Java package structure for forward-engineering  (Read 3454 times)

Miguel Juteau

  • EA Novice
  • *
  • Posts: 2
  • Karma: +0/-0
    • View Profile
Java package structure for forward-engineering
« on: March 05, 2013, 06:35:48 am »
I have created a java object model in EA with package names such as 'com.foo.bar' - literally one package in EA representing a logical directory hierarchy: com/foo/bar. With this approach, qualified class names show up correctly in class diagrams: com.foo.bar.MyClass.
However, upon applying forward engineering with EA, I get one directory per logical package name: 'com.foo.bar/', instead of the desired 'com/foo/bar/'.
If I model EA packages like directories (com/foo/bar nested structure), forward-engineering generates the expected directory structure. Unfortunately, qualified names in diagrams are reduced to the immediate parent package, e.g. bar.MyClass.
And I did set the namespace root correctly. Is there a way to obtain both correct forward-engineering AND correct qualified names in diagrams?

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8110
  • Karma: +119/-20
    • View Profile
Re: Java package structure for forward-engineering
« Reply #1 on: March 05, 2013, 08:30:22 am »
There's an option on diagrams for showing fully qualified names.

Miguel Juteau

  • EA Novice
  • *
  • Posts: 2
  • Karma: +0/-0
    • View Profile
Re: Java package structure for forward-engineering
« Reply #2 on: March 05, 2013, 08:41:15 am »
Thank you Simon for your prompt reply. True, the fully qualified name option does the trick for diagrams, but it shows the fully qualified name under the class box, in parenthesis, which prints on top of other diagram elements (connectors, cardinality, role names, etc) in the same spots. And it's not selectionable / movable. Can it go inside of the class box instead?

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8110
  • Karma: +119/-20
    • View Profile
Re: Java package structure for forward-engineering
« Reply #3 on: March 06, 2013, 08:37:54 am »
No, it can't go inside.

When we added the option for fully qualified namespaces on diagrams it was our opinion that it worked better if they were always in the '(from Package)' form below the element.