No sorting called on TableViewer.update() [message #265546] |
Thu, 05 August 2004 17:46 ![Go to next message Go to next message](theme/Solstice/images/down.png) |
Eclipse User![Friend of Eclipse Friend](/donate/web-api/friends_decorator.php?email=) |
|
|
|
Originally posted by: smallpocks.yahoo.com
Hello,
I have a problem with my TableViewer. I have given it a sorter that sorts by
the String name of my objects. It works fine when the plugin is first
started up. It sorts everything. However, when the model changes, I call
TableViewer.update(model_object,null) and the table does not get sorted. I
am sure that update is getting called. If I replace update with refresh then
everything works just fine. It's just that I'd rather be able to call update
for efficiency reasons. I am running Eclipse Release 3.0.
Thanks for any help.
Nels
|
|
|
|
Re: No sorting called on TableViewer.update() [message #265573 is a reply to message #265563] |
Thu, 05 August 2004 20:41 ![Go to previous message Go to previous message](theme/Solstice/images/up.png) ![Go to next message Go to next message](theme/Solstice/images/down.png) |
Eclipse User![Friend of Eclipse Friend](/donate/web-api/friends_decorator.php?email=) |
|
|
|
Originally posted by: smallpocks.yahoo.com
Thanks for responding. Although you may be correct, and I am perfectly fine
with calling refresh, I was only doing what I had seen in the Eclipse
JavaDoc.
From org.eclipse.jface.viewers.StructuredViewer:
update
public void update(Object[] elements,
String[] properties)
"...
If the viewer has a sorter which is affected by a change to one of the
properties, the elements' positions are updated to maintain the sort order.
...."
If this is not correct, maybe the JavaDoc should be updated.
Nels
"Paul Keyser" <rolarenfan@earthlink.net> wrote in message
news:ceu0ls$qvj$3@eclipse.org...
> I'm pretty sure that update() is not supposed to call the sorter; in
> fact, the update() suite of methods exists precisely to just update one
> or a few items. In your case, you'd want to use refresh(), I think.
>
> HTH,
> Paul
>
> Nels Beckman wrote:
>
> > Hello,
> > I have a problem with my TableViewer. I have given it a sorter that
sorts by
> > the String name of my objects. It works fine when the plugin is first
> > started up. It sorts everything. However, when the model changes, I call
> > TableViewer.update(model_object,null) and the table does not get sorted.
I
> > am sure that update is getting called. If I replace update with refresh
then
> > everything works just fine. It's just that I'd rather be able to call
update
> > for efficiency reasons. I am running Eclipse Release 3.0.
> > Thanks for any help.
> > Nels
> >
> >
|
|
|
Re: No sorting called on TableViewer.update() [message #266025 is a reply to message #265573] |
Mon, 09 August 2004 08:16 ![Go to previous message Go to previous message](theme/Solstice/images/up.png) |
Markus Keller![Friend of Eclipse Friend](/donate/web-api/friends_decorator.php?email=markus.kell.r%40gmail.com) Messages: 294 Registered: July 2009 |
Senior Member |
|
|
See https://bugs.eclipse.org/bugs/show_bug.cgi?id=50956
and if possible, attach steps to reproduce the problem.
Markus
Nels Beckman wrote:
> Thanks for responding. Although you may be correct, and I am perfectly fine
> with calling refresh, I was only doing what I had seen in the Eclipse
> JavaDoc.
>
> From org.eclipse.jface.viewers.StructuredViewer:
> update
> public void update(Object[] elements,
> String[] properties)
> "...
> If the viewer has a sorter which is affected by a change to one of the
> properties, the elements' positions are updated to maintain the sort order.
> ..."
>
> If this is not correct, maybe the JavaDoc should be updated.
> Nels
[..]
|
|
|
Powered by
FUDForum. Page generated in 0.05154 seconds