I was still having failures after trying to implement a
contextMenu(Refresh) in a SWTBotTreeItem.getTreeItemWithRefresh(String),
when I discovered that all the remaining problems go away if the asyncExec
in SWTBotTreeItem.expand() is changed to syncExec.
In general I think we should go through the code and see if there is any
code after asyncExec executions which are counting on the data set in the
asyncExec. I think that is the case in this expand().
I'm trying to find out why the syncExec did anything to help, and I'm not
able to consistently create any tree expansion lock-up by adding long
delays inside the original asyncExec, so I guess the asyncExec must not
have been the source of the problem.
On 22/8/09 06:02, Jay Norwood wrote:
> I'm trying to find out why the syncExec did anything to help, and I'm
> not able to consistently create any tree expansion lock-up by adding
> long delays inside the original asyncExec, so I guess the asyncExec must
> not have been the source of the problem.
It could sometimes be because the UI is completely overloaded because of
the speed at with SWTBot is working.
We've noticed that putting explicit sync points in some places helps a
lot. Increasing the JVM memory on the launched eclipse to 768MB is also
helpful because it reduces the times when the app freezes to recover
memory. The defaults are just too low.