root/gaphor/tags/gaphor-0.12.3/doc/stereotypes.txt

Revision 463, 2.2 kB (checked in by arjanmol, 4 years ago)

*** empty log message ***

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
Line 
1 Stereotypes
2 -----------
3 Stereotypes is quite another story. In order to create a stereotype
4 one should create a Profile. Within this profile a Diagram can be created.
5 This diagram should accept only items that are useful within a profile:
6 - Classes, which will function as <<metaclass>>.
7 - Stereotype, which wil be the defined <<stereotypes>>.
8 - Extensions, connecting metaclasses and stereotypes.
9
10 and of course the usual: Comment, Association, Generalization and Dependency.
11
12 Thoughts:
13 - Profiles are reusable and its common to share them with different models.
14 - Stereotypes can only be owned by Profiles, not by (normal) Packages.
15 - We have to do a lookup if a MetaClass is actually part of the model.
16 - a stereotype can contain an image, that can be used in stead of its name
17 - Profiles should be saved with the model too. And iit should be possible to
18   "update" a profile within a model.
19
20 Maybe it would be nice to create Stereotypes without creating the diagrams.
21 Via a dialog once can select which class (Operation, Class, etc.) is
22 stereotyped, which extra constraints apply and/or if you inherit from an
23 already existing stereotype. This way it's easy to save your stereotypes
24 apart from the model (and possibly in the model too) so they can be reused
25 in other models.
26
27 I could create a special diagram window too that can be used to create
28 profiles. Profiles should be added to packages within the model.
29
30 This window should contain:
31 1. Name of the stereotype
32 2. Metaclass it applies to (Class, Operation, etc.)
33 3. If it is a subclass of an already existing metaclass
34 4. Constraints
35 5. Description
36 6. The profile it belongs to.
37
38 When a stereotype is used, an instance is created of the Stereotype
39 (meta)class. This is not really possible for our application. Gaphor should
40 figure out another way to do this. Should check XMI and see how they do it
41 (maybe a property is enough).
42
43 It looks like the stereotypes are more a concept than something that is
44 implementable in an application. The point is that the stereotypes you define
45 (instances of Stereotype) should be instantiated in your model when you create
46 a stereotyped class.
47
48 There is BTW no way to connect a stereotype with a class other than an
49 Association.
50
Note: See TracBrowser for help on using the browser.