Change in the model would create a different EditPart in the EditPartFactory [message #156095] |
Fri, 29 October 2004 12:38 |
Eclipse User |
|
|
|
Originally posted by: mschuhma.ftisoft.at
Hi All,
I'm currently facing the following problem:
My EditPartFactory decides which EditPart to create based on certain
conditions in the model object.
Now - if I change my model using the properties view it might be necessary
to create a different editpart.
Calling refresh() on the editpart or parent edit-part obviously does not
solve my problem since it always reuses the existing editpart.
Creating a new model object instead of changing the old one introduces even
more problems since the object that was just changed in the properties view
ceases to exist!! (when the framework tries to restore the selection on the
edit part I get a lot of ugly exceptions)
Can anybody please give me some hints of how to solve this?
Thanks a lot,
Martin.
|
|
|
|
Re: Change in the model would create a different EditPart in the EditPartFactory [message #156928 is a reply to message #156467] |
Fri, 05 November 2004 06:04 |
Eclipse User |
|
|
|
Originally posted by: mschuhma.ftisoft.at
Thanks for that!
It worked.
"Pratik Shah" <ppshah@us.ibm.com> wrote in message
news:cm6052$epb$1@eclipse.org...
> Perhaps this might work: the parent editpart could first invoke
> removeChild(childEditPart), before invoking refreshChildren().
>
> "Martin Schuhmayer" <mschuhma@ftisoft.at> wrote in message
> news:cltdkg$bk2$1@eclipse.org...
> > Hi All,
> >
> > I'm currently facing the following problem:
> >
> > My EditPartFactory decides which EditPart to create based on certain
> > conditions in the model object.
> >
> > Now - if I change my model using the properties view it might be
necessary
> > to create a different editpart.
> >
> > Calling refresh() on the editpart or parent edit-part obviously does not
> > solve my problem since it always reuses the existing editpart.
> >
> > Creating a new model object instead of changing the old one introduces
> even
> > more problems since the object that was just changed in the properties
> view
> > ceases to exist!! (when the framework tries to restore the selection on
> the
> > edit part I get a lot of ugly exceptions)
> >
> > Can anybody please give me some hints of how to solve this?
> >
> > Thanks a lot,
> > Martin.
> >
> >
>
>
|
|
|
Powered by
FUDForum. Page generated in 0.02770 seconds