Book a Demo

Author Topic: Creating a package  (Read 4941 times)

Gitosh

  • EA Novice
  • *
  • Posts: 5
  • Karma: +0/-0
  • I love YaBB 1G - SP1!
    • View Profile
Creating a package
« on: May 15, 2006, 02:47:25 am »
Hi guys, I'm quiet new in EA and designing in general, so you'll excuse me if I ask stupid questions.
My problem is I have several tables which I want to group into different packages. How do I go about it?

«Midnight»

  • EA Guru
  • *****
  • Posts: 5651
  • Karma: +0/-0
  • That nice Mister Grey
    • View Profile
Re: Creating a package
« Reply #1 on: May 15, 2006, 03:49:58 am »
It is always a pain to get the first few things done with a new tool, isn't it...

An easy way is to create some packages in the Project View tree. Try selecting the View or package you want to be the parent of these packages (the ones that will hold your tables). Simply click to select the parent package or view first, to do this.

You should see the package icon on the tool bar become enabled when you do this. You can either click this icon, right-click and select Add / New Package from the context menu, or use the Ctrl-W hot key to add a new package. Give the new package an appropriate name and you are done. Repeat this for each of your new 'container' packages. [Of course, if you want these to have different parents, select different parent views or packages as required.]

You can follow a similar procedure to add elements to each package, but it gets old fast. To make things easier try this. Select one or your new packages - you may have to open the tree to see them; it does not always open up when you perform the above procedure to create the new packages. Click the New Diagram tool button above the project tree - it is just right of the new package button, hold your mouse over the buttons to see which is which. The default diagram type is Class, which is what you want. The default name is the same as the package name, change it if required and accept the dialog.

Now, here is a possible extra step. Open your toolbox if necessary - try the View menu. If you see a Class toolbar you should select it. If not, change the dropdown setting above the toolbox to "All," which should reveal this toolbar. [This setting is often set to "Project Manager" if you used the wizard to create your EA project, and seems to reset itself - I'll be submitting a bug report on this soon.]

On the Class toolbar you should see a Table icon (just a bit below the class icon, usually the fifth icon from the top. Use this one to create your table on the diagram. Each time you do, the table is added to the package that is the parent of thei diagram.

This should get you in business, as well as giving you some of the basic 'motor skills' of EA. Once you get the rythm I'm sure you can get up to speed.

Let us know if you hit a snag, and we'll get you going.

David
No, you can't have it!

Gitosh

  • EA Novice
  • *
  • Posts: 5
  • Karma: +0/-0
  • I love YaBB 1G - SP1!
    • View Profile
Re: Creating a package
« Reply #2 on: May 15, 2006, 04:42:45 am »
I mean I need to create a diagram similar to the one provided on this page http://sparxsystems.com.au/resources/uml2_tutorial/uml2_packagediagram.html

«Midnight»

  • EA Guru
  • *****
  • Posts: 5651
  • Karma: +0/-0
  • That nice Mister Grey
    • View Profile
Re: Creating a package
« Reply #3 on: May 15, 2006, 04:54:16 am »
Create a Class diagram - in the package that is the parent of the packages on the diagram (or wherever you want if this is not applicable).

From the Project View, drag and drop the packages you want on the diagram.

If one of the packages you drop contains another, you should see the containment connector (the one with the circled cross). Otherwise you will see either: a connector if you have established a connection between the packages by some means, or no connector otherwise.

If you need to add a connector, just do this from the toolbox as you would for classes.

David
« Last Edit: May 15, 2006, 04:54:40 am by Midnight »
No, you can't have it!

Gitosh

  • EA Novice
  • *
  • Posts: 5
  • Karma: +0/-0
  • I love YaBB 1G - SP1!
    • View Profile
Re: Creating a package
« Reply #4 on: May 15, 2006, 05:22:02 am »
Thanks, I did that and dragged several packages onto the same diagram but only one package was visible, thinking that I had done it wrongly, I deleted that package and tried to repeat the process, and to my horror no package is appearing. What could be the problem?

«Midnight»

  • EA Guru
  • *****
  • Posts: 5651
  • Karma: +0/-0
  • That nice Mister Grey
    • View Profile
Re: Creating a package
« Reply #5 on: May 15, 2006, 05:34:57 am »
How did you delete the package? If you just pressed the delete key that should have removed the image of the package from that diagram (only), but left the package in your model. If you delted the package with ctrl-D then you may have deleted the package from your model. The latter cannot be undone, it is like ctrl-delete with an element.

I've just tried all of this, and it is working as (I) expected. I can show multiple packages on a diagram.

A long shot: check the diagram properties (F5) and look at Visible Class Members. I don't think unchecking Package here would affect things, but you never know...
No, you can't have it!

Gitosh

  • EA Novice
  • *
  • Posts: 5
  • Karma: +0/-0
  • I love YaBB 1G - SP1!
    • View Profile
Re: Creating a package
« Reply #6 on: May 15, 2006, 06:20:00 am »
I deleted by pressing the delete button. I've done what you've told me and even deleted the diagram and created a new one, but it can even receive a single package. I'm so frustrated. do you have any other suggestions?

«Midnight»

  • EA Guru
  • *****
  • Posts: 5651
  • Karma: +0/-0
  • That nice Mister Grey
    • View Profile
Re: Creating a package
« Reply #7 on: May 15, 2006, 06:36:53 am »
It has to be something really simple and obvious that neither of us are seeing.

Try laying out the diagram. You may find the toolbar button that looks like an element tree, or you can do this from the diagram properties dialog.

Which version and build of EA are you using? You can find this out from the Help / About dialog.
No, you can't have it!

Gitosh

  • EA Novice
  • *
  • Posts: 5
  • Karma: +0/-0
  • I love YaBB 1G - SP1!
    • View Profile
Re: Creating a package
« Reply #8 on: May 15, 2006, 07:11:11 am »
I see Database version 4.01
Program Version 6.0.780
Let me continue trying and I'll update you on my progress. but incase you discover something new please let me know

«Midnight»

  • EA Guru
  • *****
  • Posts: 5651
  • Karma: +0/-0
  • That nice Mister Grey
    • View Profile
Re: Creating a package
« Reply #9 on: May 15, 2006, 08:10:35 am »
The current build is version 6.1, build 790. You should think about updating unless there is a compelling reason otherwise. The database format is the same.

Still, I think this is unlikely to be the problem. I've been able to create multiple packages in a diagram forever (or as long as I've used EA).

Try updating and let me know.

Regardless of whether you update, please try creating a new model and diagram, then adding some packages to the diagram. Go back to basics for this. Try dragging one package from the Class toolbar (not the Project View) to create a new package. Then do another. Let me know what, if anything, happens.
No, you can't have it!