Book a Demo

Author Topic: Setting the REAL default appearance  (Read 6023 times)

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 8626
  • Karma: +259/-129
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Setting the REAL default appearance
« on: August 22, 2008, 01:20:54 pm »
There are menu items that purport to allow you to change the default appearance of an item.

Unfortunately, they only allow you to change a very limited subset of the "appearance" of an item.  For example, it does NOT allow you to change the default feature visibility.

However, it turns out that IF you accidentally, or otherwise, alter the very first instance of the items that you created, the NEXT time you drag this item onto a new diagram it will automatically take up THAT updated "appearance".

Now, the concept of a "default appearance" is a marvelous thing indeed!  I'd just like to know how I can force the default appearance to be what I want at any time.

Is there any EAUI that I can use to set the default shapes and feature visibility definitively (and not by accident), what about automation?

TIA,
Paolo

[size=8]Having submitted literally tens of bugs reports and getting almost none fixed, I'm not prepared to submit any more unless there's support from the user base.[/size]
« Last Edit: August 22, 2008, 02:35:21 pm by PaoloFCantoni »
Inconsistently correct systems DON'T EXIST!
... Therefore, aim for consistency; in the expectation of achieving correctness....
-Semantica-
Helsinki Principle Rules!

«Midnight»

  • EA Guru
  • *****
  • Posts: 5651
  • Karma: +0/-0
  • That nice Mister Grey
    • View Profile
Re: Setting the REAL default appearance
« Reply #1 on: August 22, 2008, 08:55:33 pm »
The whole question of appearance - instance, general, whatever - needs a real makeover. Through many versions of EA the earlier dialogs and such have become somewhat tattered. Other options have been pasted into the product and around the original stuff. It is beginning to wear a bit thin.

This is yet another area where some groupthink might produce something that Sparx could move forward on.

I doubt we'd see anything before EA 8. That said, we don't have much lead time if we're to make that release.

There's 0.02CAD in the pot. Anyone want to see that, or even raise?

David
No, you can't have it!

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 8626
  • Karma: +259/-129
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Re: Setting the REAL default appearance
« Reply #2 on: August 22, 2008, 11:16:59 pm »
Hi David,

I agree the wholething needs a makeover, but for the present I'm just trying to figure out how the existing functionality behaves.

I've had a "poke around" in the database and I can't figure out how EA "knows" which diagram holds the "default" shape.  There are a number of "Default Diagram" entries in t_xref, but there's only a handful of them, so they aren't the mechanism.

Does anybody know (and is willing to say) how this "magic" is performed?

TIA,
Paolo

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

«Midnight»

  • EA Guru
  • *****
  • Posts: 5651
  • Karma: +0/-0
  • That nice Mister Grey
    • View Profile
Re: Setting the REAL default appearance
« Reply #3 on: August 22, 2008, 11:39:01 pm »
IIRC the information is stored in one of the PDATA fields (or something). If the info is in the Element definition it is the default for that element. If the information is in the DocumentObject definition it is specific to that instance on that diagram. I don't think there is a diagram-specific definition (i.e. all instances of a classifier on that diagram).

Of course I could be off base on any or all counts.

David
No, you can't have it!

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 8626
  • Karma: +259/-129
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Re: Setting the REAL default appearance
« Reply #4 on: August 27, 2008, 05:44:33 pm »
Quote
IIRC the information is stored in one of the PDATA fields (or something). If the info is in the Element definition it is the default for that element. If the information is in the DocumentObject definition it is specific to that instance on that diagram. I don't think there is a diagram-specific definition (i.e. all instances of a classifier on that diagram).

Of course I could be off base on any or all counts.

David
I've had a look and I can't see where in the t_object it could be held.

My strong suspicion is that it works by "accident" and not by design...  That is, EA picks the first entry in t_diagramobjects as the default picture to use.

If I get some time, I'll try to confirm.

Since, when I find out, I'm going to publish my findings here... It would have saved everyone(1) a LOT of time if the Sparxians had just told us how it works...

Paolo

(1)Everyone:
1) Me; because I'm seriously affected by this indeterminate behaviour.  Enough to need to get to the bottom of it otherwise I'll continue to sink even more time fighting EAUI
2) Everyone else; since they are affected by it more vicariously.
Inconsistently correct systems DON'T EXIST!
... Therefore, aim for consistency; in the expectation of achieving correctness....
-Semantica-
Helsinki Principle Rules!

«Midnight»

  • EA Guru
  • *****
  • Posts: 5651
  • Karma: +0/-0
  • That nice Mister Grey
    • View Profile
Re: Setting the REAL default appearance
« Reply #5 on: August 27, 2008, 10:09:51 pm »
Quote
...
If I get some time, I'll try to confirm.

Since, when I find out, I'm going to publish my findings here... It would have saved everyone(1) [emphasis added]a LOT of time if the Sparxians had just told us how it works...

Paolo

(1)Everyone:
1) Me; because I'm seriously affected by this indeterminate behaviour.  Enough to need to get to the bottom of it otherwise I'll continue to sink even more time fighting EAUI
2) Everyone else; since they are affected by it more vicariously.

You and I et alii have brought this up under separate cover, more than once.

Once upon a time Sparx embarked on a separate SDK documentation set to handle just this kind of thing. Since then the SDK was integrated back into the main documents. Although there was some limited clarification at that time, and incremental improvements since, the fundamental problem persists.

Since the EA schema seems to live on in its current form, we are well past the time when we can accept 'magic' fields and such, assuming it will all become clear later.

So how do we proceed? Are there a few of 'the faithful' who can spare enough time (over a relatively brief period) to slap something together if Sparx can give us some 'raw' information? If so, could we convince Sparx to keep the resulting document current over new builds?

The above might be the only way. I don't like it - on some level I resent the necessity - but I think it might be a worthwhile effort on some level. At the very least the trade-off in time and effort might be positive over a large project or two.

Thoughts? [Preferably something better, or less bitter...]

David
No, you can't have it!

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 8626
  • Karma: +259/-129
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Re: Setting the REAL default appearance
« Reply #6 on: August 27, 2008, 11:51:33 pm »
Hi David,

I agree with your sentiments (above in prior post) and can now confirm the behaviour I suspected.  The "default" diagram for any given item appears to tbe the diagram with the lowest Diagram_ID in t_diagamobjects (for that item's Object_ID).

I'll leave it as an exercise for the reader to construct the appropriate experiment; but when you do it, you should observe the above behaviour.

So while it is determinitistic, it's not very useful...  ::)

I note, in passing, that (inconsistently) there is no concept of a default layout for an edge (line) - that I can find...

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

potterm

  • EA User
  • **
  • Posts: 126
  • Karma: +0/-0
    • View Profile
Re: Setting the REAL default appearance
« Reply #7 on: December 05, 2009, 09:23:59 pm »
Paolo,

Thanks for clearing this up - I've been seeing the same behaviour lately and it's been driving me nuts.  I agree that getting this feature revamped is not going to be quick and easy for Sparx, but a quick fix (which would at least solve the problem for those currently afflicted by this) would be to make the behaviour optional and add a switch into the options dialog.

Presumably the very first time EA places an element of a given type onto a diagram then it will use default appearance attributes.  So why can't we have an option that forces this behaviour in every case?

At work I have a model where the components and actors have all been drawn onto a seq diagram as the first instance of diagram object - so all subseqent cases are elongated.  I guess I could have avoided this (had I known) by using a default model template that contains all element types (at standard size) on dummy diagram, but this shouldn't be necessary in a tool as mature as EA....

regards,
Martin.