Home » Modeling » GMF (Graphical Modeling Framework) » property view show reference
|
Re: property view show reference [message #197193 is a reply to message #197110] |
Wed, 16 July 2008 07:16 |
Eclipse User |
|
|
|
Originally posted by: tobk42.gmx.de
Hello Ye,
you can specify which properties should be shown and which not (and also
whether the visible properties should be editable) in the EMF genmodel
file. Select a property from the tree and change the 'property type' in
the 'edit' category. Here you can also assign categories to the several
properties (just like the 'ecore' and 'edit' categories in this sheet).
Make the changes and regenerate the edit code.
Regards,
Tobias
Ye Liu schrieb:
> Hello,
> I have several questions:
> How to make the property view in the runtime not show the references
> between classes?
> Why some properties are changed as I make connections between
> figures,while those containment property are not changed? For
> instance,two classes A and B, A contains B,A also can be connected to B
> by another class C.when I connect A and B with C,the property view show
> C in the 'incoming ' and 'outgoing' in A and B's property.but B's
> 'container' is A is not shown in the property of B the moment I draw B
> in A?
>
>
> Regards
> Ye Liu
>
|
|
| |
Re: property view show reference [message #197448 is a reply to message #197392] |
Wed, 16 July 2008 12:50 |
Eclipse User |
|
|
|
Originally posted by: tobk42.gmx.de
Hi Ye,
actually, the current value of the reference should already be selected
in that list. Are you sure that the parent ref is the opposite of the
containing ref, so parent is set automatically when node O is inserted
in A? BTW, I would recommend not to set properties to 'editable' that
correspond to diagram elements, as they will most likely not synchronize
with the diagram when you change them.
Regarding your other posting I could also imagine that something is
wrong with your mapping model, especially the definition of the
compartment in A, so that O is not really contained in A, but only drawn
on top of it or something. Could you check your model file (using the
tree editor or as XML) and check whether O really is a child of A?
tobias
Ye Liu schrieb:
> Hello,
> Even if I changed the 'Property type' of this reference from'None' to
> 'Editable'.The outcome is still not as I expected.
> e.g. a class O belong to class A, O has an association to A called
> Parent.(in order to get the Parent name once an instance of O is drawn
> inside an instance of A).Initially, when the 'Property type' of 'Parent'
> is set to 'None' .Nothing was shown whether I draw instance of O inside
> A or not.After I change the 'property type' to 'Editable', there
> 'parent' property of O's instance shows a list of existing instances of
> A in the Canvas.It is expected to show the specific parent automatically
> instead let user to choose one from the list.
>
>
> Thanks a lot!
>
>
> Ye Liu
>
|
|
| |
Re: property view show reference [message #197698 is a reply to message #197542] |
Thu, 17 July 2008 11:31 |
Eclipse User |
|
|
|
Originally posted by: tobk42.gmx.de
Hello Ye,
I think you got something wrong with you gmfgraph model. The compartment
figure ist NOT the figure of the node that is contained in this
compartment, but a container for those nodes.
For instance, in the general case you will have a figure with a label
and a compartment. That would mean you have a figure descriptor with a
child figure, which again has a child label and another child figure (a
rectangle).
- FigureDesc
- ParentFigure // this is the figure that is shown for the parent node
- LabelFigure // this figure is the label of the parent
- CompartmentFigure // this figure (should be a rectangle) is the
one associated with the Compartment
Now, in the mapping model, you define a top level node for the parent,
holding a compartment mapping associated with the compartment from the
gmfgraph model, a feature label mapping and a child reference mapping,
associated with the compartment mapping.
Well, I think this is a bit much to explain here. Have you yet tried the
GMF-Tutorials? I think they explain the issue very well. You find them here:
<http://wiki.eclipse.org/GMF_Documentation> (however, currently there
seem to be some problems with the server)
Tobias
Ye Liu schrieb:
> Hello,Tobias
> First,thank you very much!
> I have tried to define another class K(which is also a child of
> container class A ) as compartment of A, and it succeed now.The 'parent'
> property works well now as well as the collapsible function.
> But I wonder if it is possible to add more figures inside the same
> compartment?and how about include the an instance of the container
> itself? Because when we define Compartment in .gmfgraph,there is only
> one 'Figure Descriptor' can be chosen as property 'Figure'.(The
> container class A have more than one children including itself. )
>
>
> Long for your reply!
>
>
> Ye Liu
>
|
|
| |
Re: property view show reference [message #197720 is a reply to message #197713] |
Thu, 17 July 2008 12:29 |
Eclipse User |
|
|
|
Originally posted by: tobk42.gmx.de
Hello Ye,
I'm glad I could help. Concerning the problem of inserting A in A, you
should have a look at the thread "Indefinite Child Referentiation" right
next to this thread. Basically, you can insert nodes recursively by
setting the "Referenced Child" feature of a Child Reference.
Tobias
Ye Liu schrieb:
> Hello, I checked the tutorials carefully,and now I understand the real
> meaning of compartment and its setting.
> However, I still wonder whether the container class can contain itself
> in the compartment.Or I should define them separately when I define the
> Ecore model.E.g.there is such object A as a container for other
> objects.The top A is the biggest container which there can be only one
> in a program.Now I define only one class A,use an attribute Top to
> distinct Top A and A.If it's better to define a separate class TopA and
> class A,A is contained in TopA? Hopefully I'm understood.
>
>
> Thank you very much!
>
> Ye Liu
>
|
|
| | |
Re: property view show reference [message #197907 is a reply to message #197876] |
Fri, 18 July 2008 11:14 |
Eclipse User |
|
|
|
Originally posted by: tobk42.gmx.de
Ye Liu schrieb:
> Hello Tobias,
> I don't know if I understand correctly,I set the 'Referenced Child' of
> a Child Reference to the container Node mapping.I couldn't tell whether
> it works or not.
Why can't you tell? Can you insert an A in an A (and another A in the A
in the A), or not?
> But I find one thing very strange: the compartment area is just a
> limited rectangle area, it is not as big as the container's figure.So
> one thing funny is if I draw a figure B inside the narrow compartment
> area of A,then B's 'Parent ' property show A's name.if I draw B in the
> lower part of figure of A,then B is not considered as A's child.
> Is there a way to make the compartment area have the same size as the
> figure contains it?
There's definitely a way, but right now I can't tell how, because for me
it always worked by default, and by now I'm using exclusively custom
figures, so I can't just have a look in my gmfgraph. I think, you should
simply insert the label and the compartment figure into the parent
figure, without any layout, points, or stuff.
>
> Thanks a lot!
>
> Ye Liu
>
Tobias
|
|
| |
Goto Forum:
Current Time: Mon Apr 29 15:28:49 GMT 2024
Powered by FUDForum. Page generated in 0.03528 seconds
|