Remove model objects or remove visuals? [message #202051] |
Mon, 07 November 2005 11:58 |
Eclipse User |
|
|
|
Originally posted by: larserka.stud.ntnu.no
My plugin has two models made in EMF, a datamodel and a view model.
There's a 1-to-1 mapping between
my view model and my editparts. My editparts represents a tree with nodes
and links. I need to be able
to "collapse and expand" my tree. If i click on a node I want the child
nodes and child nodes of child nodes and so on to disapear. If i click on
a collapsed node i want the child nodes to show again. How do I do this
the "clean way"?
Should I remove the visuals for the editparts that I dont want to show, or
remove the model object from the view
model?
Lars.
--
Using Opera's revolutionary e-mail client: http://www.opera.com/mail/
|
|
|
|
|
Re: Remove model objects or remove visuals? [message #202244 is a reply to message #202188] |
Mon, 07 November 2005 22:06 |
Eclipse User |
|
|
|
Originally posted by: Lamont_Gilbert.rigidsoftware.com
I like making figures invisible too. I had severe problems for
instance, trying to add a label figure and remove it based on a property
of the model. This was because of my funky layout manager I am guessing.
So I dont relayout them. I add figure, and setVisible depending on what
the model wants.
If its only appearance, I wouldnt remove the models. Tree does not
'remove' its nodes from the model when they are hidden.
CL
Felix L J Mayer wrote:
> My philosophy is to leave the EditParts and Figures in place as long the
> model is there. But sometimes I make Figures invisible depending on flags in
> the model. This means that my LayoutManager needs to check if Figures are
> invisible and behave accordingly.
>
> "Lars Erik" <larserka@stud.ntnu.no> wrote in message
> news:op.szvcv8zxle1400@b222-02.ad.ime.ntnu.no...
>
>>My plugin has two models made in EMF, a datamodel and a view model.
>>There's a 1-to-1 mapping between
>>my view model and my editparts. My editparts represents a tree with nodes
>>and links. I need to be able
>>to "collapse and expand" my tree. If i click on a node I want the child
>>nodes and child nodes of child nodes and so on to disapear. If i click on
>>a collapsed node i want the child nodes to show again. How do I do this
>>the "clean way"?
>>
>>Should I remove the visuals for the editparts that I dont want to show, or
>>remove the model object from the view
>>model?
>>
>>Lars.
>>
>>--
>>Using Opera's revolutionary e-mail client: http://www.opera.com/mail/
>
>
>
|
|
|
Re: Remove model objects or remove visuals? [message #202275 is a reply to message #202051] |
Tue, 08 November 2005 01:39 |
Eclipse User |
|
|
|
Originally posted by: ganshuman.126.com
you can use flag to indicate the showmodel in editpart. all in attachment.
"Lars Erik" <larserka@stud.ntnu.no>
??????:op.szvcv8zxle1400@b222-02.ad.ime.ntnu.no...
>
> My plugin has two models made in EMF, a datamodel and a view model.
> There's a 1-to-1 mapping between
> my view model and my editparts. My editparts represents a tree with nodes
> and links. I need to be able
> to "collapse and expand" my tree. If i click on a node I want the child
> nodes and child nodes of child nodes and so on to disapear. If i click on
> a collapsed node i want the child nodes to show again. How do I do this
> the "clean way"?
>
> Should I remove the visuals for the editparts that I dont want to show, or
> remove the model object from the view
> model?
>
> Lars.
>
> --
> Using Opera's revolutionary e-mail client: http://www.opera.com/mail/
-
Attachment: subject.zip
(Size: 83.05KB, Downloaded 113 times)
|
|
|
Powered by
FUDForum. Page generated in 0.03063 seconds