Why the label provider isn't triggered as soon as the refresh method is called? [message #642415] |
Wed, 01 December 2010 09:14 |
Li Junhong Messages: 1012 Registered: July 2009 |
Senior Member |
|
|
Hi All,
I have a treeviewer representing my domain models.
After I add a new element to the parent, the parent label should be refreshed based on our logic. So I call viewer.refresh() at the end of my adding element action. What is strange is that the content provider is called immediately, but the label provider isn't triggered after 20-30 seconds later, then the parent's label is refreshed. This strange thing will happen only once. After that, the parent label will be refreshed as soon as I create any new sub element.
My question is that why the label provider isn't triggered like the content provider? Does any body meet such situation before?
Any suggestions are all welcome.
----------------
Li
[Updated on: Wed, 01 December 2010 09:17] Report message to a moderator
|
|
|
|
Re: Why the label provider isn't triggered as soon as the refresh method is called? [message #642418 is a reply to message #642415] |
Wed, 01 December 2010 09:25 |
Daniel Krügler Messages: 853 Registered: July 2009 |
Senior Member |
|
|
On 12/1/2010 10:14, Li Junhong wrote:
> Hi All,
>
> I have a treeviewer representing my domain models.
>
> After I add a new element to the parent, the parent label should be
> refreshed based on our logic. So I call viewer.refresh() at the end of
> my adding element action. What strange is that the content provider is
> called immediately, but the label provider isn't triggered after 20-30
> seconds later,
I hope this is a typo. You don't meant *seconds*, but milli seconds,
don't you?
> then the parent's label is refreshed. This strange thing
> will happen once. After that, the parent label will be refreshed as soon
> as I create any new sub element.
>
> My question is that why the label provider isn't triggered like the
> content provider? Does any body meet such situation before?
>
> Any suggestions are all welcome.
Not such extreme delays. The delay of the label provider is expected,
though: The viewer has to ensure that further class invariants are hold,
e.g. the previous selection is attempted to be restored.
HTH & Greetings from Bremen,
Daniel Krügler
|
|
|
Powered by
FUDForum. Page generated in 0.02910 seconds