TreeViewer refresh [message #12476] |
Mon, 26 March 2007 11:10  |
Eclipse User |
|
|
|
Hi,
I experience a problem with refreshing a tree viewer.
Scenario:
- There is a model behind the treeviewer with for example 5 elements.
- A context menu is available an the treeviewer with a refresh action that
just executes treeviewer.refresh(true)
- If the viewer is shown in a view and you click the refresh action of the
context menu everything works fine (I can see 5 elements)
The problem:
As soon as the model changes in the background and You right click on an
element that does not exist in the model anymore and now choose the refresh
action
the UI gets loocked and I can not work in the workbench properly anymore.
This behavior does not happen, if I right click on an element that is still
in the model.
I think this has to do something with the current selection of a treeviewer.
I also tried to setSelection(null), but this doesn't even remove the
selection. Maybe it would
work if there is no current selection on the viewer.
Best regards,
Markus
|
|
|
|
Re: TreeViewer refresh [message #12813 is a reply to message #12642] |
Wed, 28 March 2007 06:14   |
Eclipse User |
|
|
|
Originally posted by: rsternberg.innoopract.com
Hi Markus,
sorry for the delay.
Yes, there are some open issues on the Tree widget. I adapted the
workbench demo to test your setup, and I get a JavaScipt error, too. I
will look after it as soon as possible. However, I'm not sure if this is
exactly the same error that breaks your application.
It would help if you could provide a code snippet to reproduce the
error. If you like, you can also file a bug in the Eclipse bugzilla.
>> the UI gets loocked and I can not work in the workbench properly anymore.
>> This behavior does not happen, if I right click on an element that is
>> still in the model.
If the UI gets locked, this means that either a JavaScript error has
occured or an Exception was thrown on the server side. JavaScript errors
are reported by most web browsers. A copy of this error message would be
very helpful.
Regards,
Ralf
|
|
|
Re: TreeViewer refresh [message #14548 is a reply to message #12813] |
Thu, 29 March 2007 08:18   |
Eclipse User |
|
|
|
Hi,
here is the example. It is based on You DemoTreeViewPart. So just replace
the code with mine to test it.
Now, the error/lock occurs if you do the following steps:
- Replace the code of DemoTreeViewPart with the one I included.
- Start the demo with your included launchconfiguration (use the cvs state
of the plugins)
- Navigate to the demo in IE or Firefox so that you see the demo workbench
- Now right click for example on "tree object 5" in view "View I" and choose
"update model"
- Now right cliick again and choose "refresh"
The result should be an empty tree and a locked UI.
Good luck ;-)
Makrus
"Ralf Sternberg" <rsternberg@innoopract.com> schrieb im Newsbeitrag
news:eudf6b$d8j$1@utils.eclipse.org...
> Hi Markus,
>
> sorry for the delay.
>
> Yes, there are some open issues on the Tree widget. I adapted the
> workbench demo to test your setup, and I get a JavaScipt error, too. I
> will look after it as soon as possible. However, I'm not sure if this is
> exactly the same error that breaks your application.
>
> It would help if you could provide a code snippet to reproduce the
> error. If you like, you can also file a bug in the Eclipse bugzilla.
>
>>> the UI gets loocked and I can not work in the workbench properly
>>> anymore.
>>> This behavior does not happen, if I right click on an element that is
>>> still in the model.
>
> If the UI gets locked, this means that either a JavaScript error has
> occured or an Exception was thrown on the server side. JavaScript errors
> are reported by most web browsers. A copy of this error message would be
> very helpful.
>
> Regards,
> Ralf
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.10764 seconds