Home » Modeling » GMF (Graphical Modeling Framework) » property view show reference
property view show reference [message #197110] |
Tue, 15 July 2008 10:01  |
Eclipse User |
|
|
|
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 08: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 07: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 #197907 is a reply to message #197876] |
Fri, 18 July 2008 07: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
|
|
|
Re: property view show reference [message #197915 is a reply to message #197907] |
Fri, 18 July 2008 08:07  |
Eclipse User |
|
|
|
Hello,
Thanks a lot!Now every figure can be correctly added in the compartment
of container.Even though the compartment area is not eaqual to the area of
the container figure,I find ways to place the desired figure inside the
compartment.
Ye Liu
|
|
|
Goto Forum:
Current Time: Tue Jul 01 13:25:30 EDT 2025
Powered by FUDForum. Page generated in 0.05826 seconds
|