Author Topic: how to model java statment "package  (Read 386 times)

Josef Stadelmann

  • EA User
  • **
  • Posts: 59
  • Karma: +0/-0
  • as simple as possible, but not too simple
    • View Profile
how to model java statment "package
« on: June 22, 2012, 12:23:28 am »
how can I model the java language statment "package"

I have successfull rount trip engineering with my java project. And so it is getting bigger every day. That is when classes go into a package structure i.e. in java source code the class HellopWorld shall go into a package called "". Hence the class becomes the canonical class name of "" and resides at src/main/ch/axa/

in other wods: When I refactor my code to move src/main/ to src/main/ch/axa/ my IDE (NetBeans) does all the name changes at the java class level and changes package names and creates directories on demand or renaes them. After a sucessfull build by the NetBeans IDE, I would like to synchronize my code base with the model. Hence I would expect to see the changes somewhere in the model. i..e. looking at a class diiagram should somehow indicate in which (package) the class can be found.

my question is: where can I see this in the model.
Which modelling elements (pakage diagrams with import and merge relations) do I miss to establish prior to going for a code refactoring followed by a synchronize code with modell from EA?

OK - the true is that when I modify in my source code the package names and re-import from that source directory the changes become visible. this with the default, the package per namespace toggeled.

BUT - synchronize does not end up in such changes. Is that a bug or a feature. I would think that in case of larger projects, reimporting over and over again after refatoring is teddious. For a smal change such as a move of a class to another package a sync should do it to refelct the change correctly in at lerast in the project browser/window.
« Last Edit: June 22, 2012, 02:32:17 am by stadelma »