Book a Demo

Author Topic: Shared classes between package  (Read 5632 times)

yvon.turcotte

  • EA Novice
  • *
  • Posts: 4
  • Karma: +0/-0
  • I love YaBB 1 Gold!
    • View Profile
Shared classes between package
« on: September 09, 2002, 01:07:00 pm »
Hi,

I can i share a class between two package ? For more info, see the image at this adresse www.geocities.com/yvont/images/untitled.JPG. How can i shared the "TestClass" from the "AG01 - ..." package to the "Architecture Globale" package ?

Thanks for your help !

Bye !

Farfetch

  • EA Novice
  • *
  • Posts: 16
  • Karma: +0/-0
  • You are amazed that we exist, that we burn so bright, and you can only wonder why.
    • View Profile
Re: Shared classes between package
« Reply #1 on: September 10, 2002, 12:33:46 am »
Just a note to anyone who is looking to solve this, there should be no period after the .jpg extension, click on the link and remove the period to view the page.
Farfetch'd is the mightiest of all the Pokemon!!!

P.S. I do have a serious job :)

CJ

  • EA User
  • **
  • Posts: 288
  • Karma: +0/-0
    • View Profile
Re: Shared classes between package
« Reply #2 on: September 10, 2002, 05:20:27 am »
I'm still learning UML, so this is more of a question than an answer...

Isn't the logical view (vue logique) generally a good place to document classes, and the component view (vue des composants) generally a good place to document objects that may or may not be derived from classes from the logical view?

If I've got that right, then why not drop an instance of "TestClass" into "Vue des composants, Architecture Globale"?

Cheers and best regards.

kelly_sumrall

  • EA User
  • **
  • Posts: 73
  • Karma: +0/-0
    • View Profile
Re: Shared classes between package
« Reply #3 on: September 10, 2002, 05:41:46 am »
Yvon,

I'm not sure this is what you are looking for, but here is a response.  You can copy a class from one diagram and past a link onto another diagram.  Now you have one class that displays on two different diagrams (possibly in two different packages).  The copy dosen't appear in the package, just the diagram.

Hope this helps.
Kelly Sumrall

Even though curiosity killed the cat, it still had eight lives left.

Marek Brezina

  • EA User
  • **
  • Posts: 20
  • Karma: +0/-0
    • View Profile
Re: Shared classes between package
« Reply #4 on: September 10, 2002, 05:45:52 am »
I agree with Jason, but if you want to share classes do not instance them.  

1. Turn off auto instance Local options/diagram/behavior
2. Create new diagram in Package Architecture Globale
3. Drag and Drop testclass into the diagram

yvon.turcotte

  • EA Novice
  • *
  • Posts: 4
  • Karma: +0/-0
  • I love YaBB 1 Gold!
    • View Profile
Re: Shared classes between package
« Reply #5 on: September 10, 2002, 10:18:59 am »
Thanks everybody for your help. Now i'm able to share classes between packages.

;)

jaimeglz

  • EA User
  • **
  • Posts: 164
  • Karma: +0/-0
    • View Profile
Re: Shared classes between package
« Reply #6 on: September 10, 2002, 08:07:45 pm »
Hi Ivonne,

Just a small practical recommendation: If the project is not very, very, large, I have found that is is better to keep all classes under a single package (or at least under a single view), so as to avoid having to look for them all over the project tree. It not only helps you avoid redundancy, but also, if you put them in an alphabetical (or some logical) order, the class definition package comes out very neat when you generate your documentation.

If the project is very large, or is part of a large set of projects, I have found that it is better to have a special package for reusable classes. These are the classes that can be either shared among projects (root levels of project trees), or refined over time and exported from one project to another.

Jaime Gonzalez