Book a Demo

Author Topic: Default Diagram  (Read 10254 times)

Englisito

  • EA Novice
  • *
  • Posts: 5
  • Karma: +0/-0
  • Wibble, Wibble, Fish
    • View Profile
Default Diagram
« on: January 18, 2004, 06:32:26 pm »
I've been trying to find a secure way to define the default diagram that gets opened in packages or composite elements, with little success.

I've worked out that the diagram is chosen alphabeticaly (not by the sort order), from all diagrams in a package/element (including diagrams hidden within sub elements).

So, if I name diagrams correctly I can control which is the default diagram, but this is a messy solution and gets even worse when the stereotypes get involved with a diagrams name.

Has anyone descovered a GOOD way to assign default diagrams!

Sean Kearon

  • EA User
  • **
  • Posts: 126
  • Karma: +0/-0
    • View Profile
Re: Default Diagram
« Reply #1 on: January 19, 2004, 12:54:27 am »
Hi

I don't think that you can set a default diagram for each package, you can only set one for the model (via Diagram | Set as Model Default).  

Cheers

Sean

thomaskilian

  • Guest
Re: Default Diagram
« Reply #2 on: January 20, 2004, 09:32:07 am »
I think that the top most diagram is the default. This works for my release (the latest).

BR

Thomas

Bruno.Cossi

  • EA User
  • **
  • Posts: 803
  • Karma: +0/-0
    • View Profile
Re: Default Diagram
« Reply #3 on: January 21, 2004, 04:42:36 am »
Hi,

The first diagram in the package is the default one. If you want to change which diagram is default, just re-sort them using "Move up" and "Move down"

Bruno

Englisito

  • EA Novice
  • *
  • Posts: 5
  • Karma: +0/-0
  • Wibble, Wibble, Fish
    • View Profile
Re: Default Diagram
« Reply #4 on: February 08, 2004, 06:28:20 pm »
It doesn't seem to work like that, not for me anyhow (build 658).

As I said, it seems to ignore the ordering of the diagrams, and even selects diagrams hidden within elements (if they are alphabetically first).

wyc

  • EA Novice
  • *
  • Posts: 6
  • Karma: +0/-0
  • I love YaBB 1G - SP1!
    • View Profile
Re: Default Diagram
« Reply #5 on: October 10, 2006, 11:33:33 pm »
Sorry to bring up an old question, it might have already been solved even, but I seem to be having a problem where even reordering the diagrams in the element tree doesn't work.  

Can anyone please point out the correct way to change the default diagram for an element?  

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 8626
  • Karma: +259/-129
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Re: Default Diagram
« Reply #6 on: October 10, 2006, 11:41:25 pm »
Quote
Sorry to bring up an old question, it might have already been solved even, but I seem to be having a problem where even reordering the diagrams in the element tree doesn't work.  

Can anyone please point out the correct way to change the default diagram for an element?  
Do you mean the default diagram that is opened when you click on a (misnamed) composite element?

If so, then you need to make the new one the top most, then make the element no longer composite and then make it composite again.  That should do it...

Welcome to EA's UI (Unique Interface)

HTH
Paolo
Inconsistently correct systems DON'T EXIST!
... Therefore, aim for consistency; in the expectation of achieving correctness....
-Semantica-
Helsinki Principle Rules!

wyc

  • EA Novice
  • *
  • Posts: 6
  • Karma: +0/-0
  • I love YaBB 1G - SP1!
    • View Profile
Re: Default Diagram
« Reply #7 on: October 10, 2006, 11:50:37 pm »
Thanks for the quick reply.

I've tried that out and it didn't do any good.  It's still going to the original activity diagram.  

I also tried to uncomposite element, save it, close it, reopen, composite and still the link is maintained with the old diagram.   ???

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 8626
  • Karma: +259/-129
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Re: Default Diagram
« Reply #8 on: October 11, 2006, 12:12:29 am »
Quote
Thanks for the quick reply.

I've tried that out and it didn't do any good.  It's still going to the original activity diagram.  

I also tried to uncomposite element, save it, close it, reopen, composite and still the link is maintained with the old diagram.   ???
Sorry...

I thought it used to do it that way... However, the problem is that unsetting the composite element doesn't clear the link...  That's a bug.  The least it should do is to ask you if it should clear the link.

Report it...

Paolo
Inconsistently correct systems DON'T EXIST!
... Therefore, aim for consistency; in the expectation of achieving correctness....
-Semantica-
Helsinki Principle Rules!

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 8626
  • Karma: +259/-129
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Re: Default Diagram
« Reply #9 on: October 11, 2006, 12:30:10 am »
If you don't want to retain the existing linked diagram, you can delete it and that will destroy the link (it's now coming back to me...)

If you do want to retain the diagram information, you can often select all and paste into an interim diagram and then delete the original.

Otherwise, you're out of luck.

By the way, if there is more than one diagram under the Classifier, it should probably ask you which one to link to...  (since it doesn't automatically relink to the top one...

Paolo
« Last Edit: October 11, 2006, 12:32:35 am by PaoloFCantoni »
Inconsistently correct systems DON'T EXIST!
... Therefore, aim for consistency; in the expectation of achieving correctness....
-Semantica-
Helsinki Principle Rules!

thomaskilian

  • Guest
Re: Default Diagram
« Reply #10 on: October 17, 2006, 03:39:30 pm »
Instead, pointing onto a dummy diagram and deleting the latter will save you from copy/paste. Haven't tried this but seems to be logical.

Jan ´Bary´ Glas

  • EA User
  • **
  • Posts: 408
  • Karma: +0/-0
  • Bary
    • View Profile
Re: Default Diagram
« Reply #11 on: October 18, 2006, 01:15:28 am »
And my answer:
1. Move all diagrams out of the composite element,
2. Make it non-composite,
3. Move back the target diagram,
4. Make the element composite,
5. Move back rest of diagrams.

I use it for composite use case elements and changes from opening an activity diagram to opening a sequence diagram.
Jan 'Bary' Glas

sargasso

  • EA Practitioner
  • ***
  • Posts: 1406
  • Karma: +1/-2
  • 10 COMFROM 30; 20 HALT; 30 ONSUB(50,90,10)
    • View Profile
Re: Default Diagram
« Reply #12 on: October 18, 2006, 05:36:54 am »
Guys,

I reckon the problem is simple.

The diagram that is displays is the first one that is returned from an SQL select on the object.  You can jiggle them up an d down in the project browser until Mary's name is John but it wont affect the first row that is returned by EA internal code.

The problem is simple.  

We need a way to select the default diagram on a so-called composite element......  and a way to .......continually ..... maintain that selection.

See you in the "Suggestions & Threats" page shortly.

lak
bruce
"It is not so expressed, but what of that?
'Twere good you do so much for charity."

Oh I forgot, we aren't doing him are we.

Tonu

  • EA User
  • **
  • Posts: 30
  • Karma: +0/-0
    • View Profile
Re: Default Diagram
« Reply #13 on: October 19, 2006, 02:27:18 am »
Quote
Sorry...

I thought it used to do it that way... However, the problem is that unsetting the composite element doesn't clear the link...  That's a bug.  The least it should do is to ask you if it should clear the link.

Report it...

Paolo


Whether not clearing the link it is a bug or not depends on the viewpoint ;-)
I have found several useful application for that:
 - cross referencing between different packages -- for instance I have domain model in the use case-view. For clarity of documentation I prefer to gather significant behaviour of domain objects in sub packages of dynamic view rather than having them scattered below different classes. I was quite pleased to find, that when I move the elements and the diagram to different folder the link remains (or copy a diagram created elsewhere under a class and after making the class composite, put the diagram back to its original location)
  - this may sound like a misuse, but couple of times I have found logical and most expressive way to navigate from several UML element (class or process) to the same sub- diagram. This can be easily done when copying the diagram under the first element, making this composite and then doing the same trick with the next element. Both links are preserver :-)

Of course, I would prefer to control cross-references explicitly, rather that copying diagrams around and guessing what points where.

Tonu

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 8626
  • Karma: +259/-129
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Re: Default Diagram
« Reply #14 on: October 19, 2006, 03:45:51 am »
Quote

Whether not clearing the link it is a bug or not depends on the viewpoint ;-)
I have found several useful application for that:
  - cross referencing between different packages -- for instance I have domain model in the use case-view. For clarity of documentation I prefer to gather significant behaviour of domain objects in sub packages of dynamic view rather than having them scattered below different classes. I was quite pleased to find, that when I move the elements and the diagram to different folder the link remains (or copy a diagram created elsewhere under a class and after making the class composite, put the diagram back to its original location)
   - this may sound like a misuse, but couple of times I have found logical and most expressive way to navigate from several UML element (class or process) to the same sub- diagram. This can be easily done when copying the diagram under the first element, making this composite and then doing the same trick with the next element. Both links are preserver :-)

Of course, I would prefer to control cross-references explicitly, rather that copying diagrams around and guessing what points where.

Tonu
Hi Tonu,

I don't think we're arguing at cross-purposes...  I'm not suggesting that when you move the diagram the link is broken.  Just when you formally mark the Element as non-composite, the link is broken.

As I point out in [size=13]Composite Element?[/size] from well over a year ago, Composite Element is a bad name.

(See also... [size=13]Double-Clicking for navigation [/size])

Unsetting Composite Element should really mean Unlink diagram...

I too like to move diagrams around and appreciate the fact that the link is maintained.  But if I say it's no longer Composite; I mean it... Break the link!

Paolo
Inconsistently correct systems DON'T EXIST!
... Therefore, aim for consistency; in the expectation of achieving correctness....
-Semantica-
Helsinki Principle Rules!