AbstractEditPart.refreshChildren refreshes one level only [message #165103] |
Fri, 21 January 2005 15:40  |
Eclipse User |
|
|
|
Originally posted by: kevinlouisnospam.hotmail.com
Hi,
I read the codes of the AbstractEditPart.refreshChildren, it just refreshes
the children of next level only. Should it refresh all grandChildren too?
I expect this function should be called for each editParts down to all
levels (but refreshChildren is protected, may need to call refresh to do
it).
What do you think?
|
|
|
|
Re: AbstractEditPart.refreshChildren refreshes one level only [message #165177 is a reply to message #165144] |
Fri, 21 January 2005 18:58  |
Eclipse User |
|
|
|
Originally posted by: kevinlouisnospam.hotmail.com
Yes, you are right. In the normal case, each level of the editPart should
listen the event from its corresponding model and refresh its own children
only.
Thanks a lot.
"Pratik Shah" <ppshah@us.ibm.com> wrote in message
news:csrv9s$l1g$1@www.eclipse.org...
> No. In most cases, the changes would be localized so that not everything
> would need to be refreshed. The parts that would need to be refreshed
would
> be notified of the property change individually. If you have a case where
a
> change effects all parts and don't want each part to be notified of this
> change, you can write a helper method that refreshes all parts. You can
> look at the PaletteViewer as an example. When the palette's font or
layout
> is changed by the user all the parts would have to be notified. Instead
of
> having each of the edit parts listen for the preference change, only the
> viewer listens for it and refreshes all parts when need be. Look at
> PaletteViewer.PreferenceListener#refreshAllEditParts().
>
> "Kevin" <kevinlouisnospam@hotmail.com> wrote in message
> news:csrpcq$l3v$1@www.eclipse.org...
> > Hi,
> >
> > I read the codes of the AbstractEditPart.refreshChildren, it just
> refreshes
> > the children of next level only. Should it refresh all grandChildren
too?
> > I expect this function should be called for each editParts down to all
> > levels (but refreshChildren is protected, may need to call refresh to do
> > it).
> >
> > What do you think?
> >
> >
>
>
|
|
|
Powered by
FUDForum. Page generated in 0.03708 seconds