Skip to main content



      Home
Home » Eclipse Projects » GEF » refresh child
refresh child [message #161325] Mon, 13 December 2004 09:07 Go to next message
Eclipse UserFriend
Originally posted by: paolo.banfi.fastwebnet.it

I've a container classthet represent an uml class
attributes are repreented as a list

I've the problem that when I add an attribute via GEF command the
graphical parts are not refreshed.

how can I solve this problem?

tanks

cK
Re: refresh child [message #161332 is a reply to message #161325] Mon, 13 December 2004 09:17 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: paolo.banfi.fastwebnet.it

Ok
debugging the code i see that the

refreshChildren()

is called but that the interested parts are not correctly refreshed

any idea?

cK



On Mon, 13 Dec 2004 15:07:10 +0100, cerealk
<paolo.banfi@fastwebnet.it> wrote:

>I've a container classthet represent an uml class
>attributes are repreented as a list
>
>I've the problem that when I add an attribute via GEF command the
>graphical parts are not refreshed.
>
>how can I solve this problem?
>
>tanks
>
>cK
Re: refresh child [message #161348 is a reply to message #161332] Mon, 13 December 2004 10:56 Go to previous messageGo to next message
Eclipse UserFriend
Does your getModelChildren() method return an updated list which includes
the newly added attribute?

"cerealk" <paolo.banfi@fastwebnet.it> wrote in message
news:1t8rr0leqpb4f98p710vnn3lo0t7k8urd9@4ax.com...
> Ok
> debugging the code i see that the
>
> refreshChildren()
>
> is called but that the interested parts are not correctly refreshed
>
> any idea?
>
> cK
>
>
>
> On Mon, 13 Dec 2004 15:07:10 +0100, cerealk
> <paolo.banfi@fastwebnet.it> wrote:
>
> >I've a container classthet represent an uml class
> >attributes are repreented as a list
> >
> >I've the problem that when I add an attribute via GEF command the
> >graphical parts are not refreshed.
> >
> >how can I solve this problem?
> >
> >tanks
> >
> >cK
>
Re: refresh child [message #161581 is a reply to message #161348] Wed, 15 December 2004 09:01 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: paolo.banfi.fastwebnet.it

I'll try to explain my problem in a better way

I've a class that represent an UML classifier
it contains UML fields and UML methods in two separated EMF ELists

to display each class, fields and methods in GEF I've created tree
edit part:

ClassifierEditPart
ListEditPart
LabelEditPart

the I use the ListEditPart to represent the fields and the methods of
a class in different "box" of the image

the method ClassifierEditPart.getModelChildren() returns a list
containing two elements: the EList of fields and the EList of methods

the method ListEditPart returns the list of fields/methods

I tried to recreate the same structure thet is found in
org.eclipse.gef.examples.edigram

My ListEditPart is the same as the one found in the example

The problem is that when I add a field or a method (by using the
palette for example) the model is modified but not refreshed.

thanks

cK


On Mon, 13 Dec 2004 10:56:17 -0500, "Pratik Shah" <ppshah@us.ibm.com>
wrote:

>Does your getModelChildren() method return an updated list which includes
>the newly added attribute?
>
>"cerealk" <paolo.banfi@fastwebnet.it> wrote in message
>news:1t8rr0leqpb4f98p710vnn3lo0t7k8urd9@4ax.com...
>> Ok
>> debugging the code i see that the
>>
>> refreshChildren()
>>
>> is called but that the interested parts are not correctly refreshed
>>
>> any idea?
>>
>> cK
>>
>>
>>
>> On Mon, 13 Dec 2004 15:07:10 +0100, cerealk
>> <paolo.banfi@fastwebnet.it> wrote:
>>
>> >I've a container classthet represent an uml class
>> >attributes are repreented as a list
>> >
>> >I've the problem that when I add an attribute via GEF command the
>> >graphical parts are not refreshed.
>> >
>> >how can I solve this problem?
>> >
>> >tanks
>> >
>> >cK
>>
>
Re: refresh child [message #161622 is a reply to message #161581] Wed, 15 December 2004 16:42 Go to previous messageGo to next message
Eclipse UserFriend
Here's probably what's happening. When the attribute is added, the class
edit part is refreshed. But it still returns the same two lists (of
attributes and operations) and hence nothing gets refreshed. What you want
to do is refresh the child edit part (i.e., the ListEditPart). Look at
ClassEditPart#handlePropertyChanged().

"cerealk" <paolo.banfi@fastwebnet.it> wrote in message
news:b8g0s0lo4bcdv8iidcsklklapodhd5d4iq@4ax.com...
> I'll try to explain my problem in a better way
>
> I've a class that represent an UML classifier
> it contains UML fields and UML methods in two separated EMF ELists
>
> to display each class, fields and methods in GEF I've created tree
> edit part:
>
> ClassifierEditPart
> ListEditPart
> LabelEditPart
>
> the I use the ListEditPart to represent the fields and the methods of
> a class in different "box" of the image
>
> the method ClassifierEditPart.getModelChildren() returns a list
> containing two elements: the EList of fields and the EList of methods
>
> the method ListEditPart returns the list of fields/methods
>
> I tried to recreate the same structure thet is found in
> org.eclipse.gef.examples.edigram
>
> My ListEditPart is the same as the one found in the example
>
> The problem is that when I add a field or a method (by using the
> palette for example) the model is modified but not refreshed.
>
> thanks
>
> cK
>
>
> On Mon, 13 Dec 2004 10:56:17 -0500, "Pratik Shah" <ppshah@us.ibm.com>
> wrote:
>
> >Does your getModelChildren() method return an updated list which includes
> >the newly added attribute?
> >
> >"cerealk" <paolo.banfi@fastwebnet.it> wrote in message
> >news:1t8rr0leqpb4f98p710vnn3lo0t7k8urd9@4ax.com...
> >> Ok
> >> debugging the code i see that the
> >>
> >> refreshChildren()
> >>
> >> is called but that the interested parts are not correctly refreshed
> >>
> >> any idea?
> >>
> >> cK
> >>
> >>
> >>
> >> On Mon, 13 Dec 2004 15:07:10 +0100, cerealk
> >> <paolo.banfi@fastwebnet.it> wrote:
> >>
> >> >I've a container classthet represent an uml class
> >> >attributes are repreented as a list
> >> >
> >> >I've the problem that when I add an attribute via GEF command the
> >> >graphical parts are not refreshed.
> >> >
> >> >how can I solve this problem?
> >> >
> >> >tanks
> >> >
> >> >cK
> >>
> >
>
Re: refresh child [message #161793 is a reply to message #161622] Thu, 16 December 2004 13:53 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: paolo.banfi.fastwebnet.it

ok, if I refresh the edit part everything works correctly
But now I'm curious: what is causes of this behavior?
Why in your example the lists returned by getModelChildren() are
different from the lists returned by getChildren().getModel()
(debugging the code of your example i've noticed that this is the
difference)?

Sorry if I'm boring you with my question and thank you for your help

cK

On Wed, 15 Dec 2004 16:42:02 -0500, "Pratik Shah" <ppshah@us.ibm.com>
wrote:

>Here's probably what's happening. When the attribute is added, the class
>edit part is refreshed. But it still returns the same two lists (of
>attributes and operations) and hence nothing gets refreshed. What you want
>to do is refresh the child edit part (i.e., the ListEditPart). Look at
>ClassEditPart#handlePropertyChanged().
>
>"cerealk" <paolo.banfi@fastwebnet.it> wrote in message
>news:b8g0s0lo4bcdv8iidcsklklapodhd5d4iq@4ax.com...
>> I'll try to explain my problem in a better way
>>
>> I've a class that represent an UML classifier
>> it contains UML fields and UML methods in two separated EMF ELists
>>
>> to display each class, fields and methods in GEF I've created tree
>> edit part:
>>
>> ClassifierEditPart
>> ListEditPart
>> LabelEditPart
>>
>> the I use the ListEditPart to represent the fields and the methods of
>> a class in different "box" of the image
>>
>> the method ClassifierEditPart.getModelChildren() returns a list
>> containing two elements: the EList of fields and the EList of methods
>>
>> the method ListEditPart returns the list of fields/methods
>>
>> I tried to recreate the same structure thet is found in
>> org.eclipse.gef.examples.edigram
>>
>> My ListEditPart is the same as the one found in the example
>>
>> The problem is that when I add a field or a method (by using the
>> palette for example) the model is modified but not refreshed.
>>
>> thanks
>>
>> cK
>>
>>
>> On Mon, 13 Dec 2004 10:56:17 -0500, "Pratik Shah" <ppshah@us.ibm.com>
>> wrote:
>>
>> >Does your getModelChildren() method return an updated list which includes
>> >the newly added attribute?
>> >
>> >"cerealk" <paolo.banfi@fastwebnet.it> wrote in message
>> >news:1t8rr0leqpb4f98p710vnn3lo0t7k8urd9@4ax.com...
>> >> Ok
>> >> debugging the code i see that the
>> >>
>> >> refreshChildren()
>> >>
>> >> is called but that the interested parts are not correctly refreshed
>> >>
>> >> any idea?
>> >>
>> >> cK
>> >>
>> >>
>> >>
>> >> On Mon, 13 Dec 2004 15:07:10 +0100, cerealk
>> >> <paolo.banfi@fastwebnet.it> wrote:
>> >>
>> >> >I've a container classthet represent an uml class
>> >> >attributes are repreented as a list
>> >> >
>> >> >I've the problem that when I add an attribute via GEF command the
>> >> >graphical parts are not refreshed.
>> >> >
>> >> >how can I solve this problem?
>> >> >
>> >> >tanks
>> >> >
>> >> >cK
>> >>
>> >
>>
>
Re: refresh child [message #161808 is a reply to message #161793] Thu, 16 December 2004 15:42 Go to previous message
Eclipse UserFriend
In the EDiagram example, the two lists (of attributes and operations) are
the model for the two CompartmentEditParts (equivalent to your
ListEditPart). The point to realize here is that the although the
attribute/operation has changed, the list containing it has not changed. If
you call refreshChildren() on the ClassEditPart, it will check to see if
EditParts exist for all the model children (which are the two lists). Since
they do, it won't make any change. Ideally, you'd want the notification of
the change in attributes/operation to go directly to the ListEditPart.


"cerealk" <paolo.banfi@fastwebnet.it> wrote in message
news:kgl3s0hklap0mbeqt3j3j98u81lgetvrh2@4ax.com...
> ok, if I refresh the edit part everything works correctly
> But now I'm curious: what is causes of this behavior?
> Why in your example the lists returned by getModelChildren() are
> different from the lists returned by getChildren().getModel()
> (debugging the code of your example i've noticed that this is the
> difference)?
>
> Sorry if I'm boring you with my question and thank you for your help
>
> cK
>
> On Wed, 15 Dec 2004 16:42:02 -0500, "Pratik Shah" <ppshah@us.ibm.com>
> wrote:
>
> >Here's probably what's happening. When the attribute is added, the class
> >edit part is refreshed. But it still returns the same two lists (of
> >attributes and operations) and hence nothing gets refreshed. What you
want
> >to do is refresh the child edit part (i.e., the ListEditPart). Look at
> >ClassEditPart#handlePropertyChanged().
> >
> >"cerealk" <paolo.banfi@fastwebnet.it> wrote in message
> >news:b8g0s0lo4bcdv8iidcsklklapodhd5d4iq@4ax.com...
> >> I'll try to explain my problem in a better way
> >>
> >> I've a class that represent an UML classifier
> >> it contains UML fields and UML methods in two separated EMF ELists
> >>
> >> to display each class, fields and methods in GEF I've created tree
> >> edit part:
> >>
> >> ClassifierEditPart
> >> ListEditPart
> >> LabelEditPart
> >>
> >> the I use the ListEditPart to represent the fields and the methods of
> >> a class in different "box" of the image
> >>
> >> the method ClassifierEditPart.getModelChildren() returns a list
> >> containing two elements: the EList of fields and the EList of methods
> >>
> >> the method ListEditPart returns the list of fields/methods
> >>
> >> I tried to recreate the same structure thet is found in
> >> org.eclipse.gef.examples.edigram
> >>
> >> My ListEditPart is the same as the one found in the example
> >>
> >> The problem is that when I add a field or a method (by using the
> >> palette for example) the model is modified but not refreshed.
> >>
> >> thanks
> >>
> >> cK
> >>
> >>
> >> On Mon, 13 Dec 2004 10:56:17 -0500, "Pratik Shah" <ppshah@us.ibm.com>
> >> wrote:
> >>
> >> >Does your getModelChildren() method return an updated list which
includes
> >> >the newly added attribute?
> >> >
> >> >"cerealk" <paolo.banfi@fastwebnet.it> wrote in message
> >> >news:1t8rr0leqpb4f98p710vnn3lo0t7k8urd9@4ax.com...
> >> >> Ok
> >> >> debugging the code i see that the
> >> >>
> >> >> refreshChildren()
> >> >>
> >> >> is called but that the interested parts are not correctly refreshed
> >> >>
> >> >> any idea?
> >> >>
> >> >> cK
> >> >>
> >> >>
> >> >>
> >> >> On Mon, 13 Dec 2004 15:07:10 +0100, cerealk
> >> >> <paolo.banfi@fastwebnet.it> wrote:
> >> >>
> >> >> >I've a container classthet represent an uml class
> >> >> >attributes are repreented as a list
> >> >> >
> >> >> >I've the problem that when I add an attribute via GEF command the
> >> >> >graphical parts are not refreshed.
> >> >> >
> >> >> >how can I solve this problem?
> >> >> >
> >> >> >tanks
> >> >> >
> >> >> >cK
> >> >>
> >> >
> >>
> >
>
Previous Topic:ComboBoxPropertyDescriptor
Next Topic:Palette Question
Goto Forum:
  


Current Time: Fri Jul 18 23:07:18 EDT 2025

Powered by FUDForum. Page generated in 0.09688 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top