|Re: SWTBotTreeItem's context menu click gives TimeoutException [message #1471762 is a reply to message #1429440]
||Thu, 13 November 2014 10:06
| Aparna Argade
Registered: October 2010
It seems I found how to make it work!|
Actually the problem was caused due to not finding entry in fActionMap upon FocusLost event, which gets called as a result of SWTBotTreeItem.notifySelect().
If I comment out the line which sends SWT.FocusOut event in SWTBotTreeItem.notifySelect() method, then context menu click happens without any problem. UI also gets updated, as expected.
After commenting out this line, FocusLost routine of VariablesView in eclipse is not called and hence the globalActions (e.g. 'find' action) is not removed. Therefore, fActionMap gets entry for 'find' action in fillContextMenu() method of VariablesView and the further code also executes well.
Is this solution okay? Will it have any side-effects?
Please share your thoughts.
I've one more question--
If I compare implementation of notifySelect() method of SWTBotTableItem and SWTBotTreeItem, I see that-
SWTBotTableItem sends only SWT.Selection and SWTBotTreeItem sends a series of SWT events like MouseEnter, MouseMove, Activate, FocusIn and so on.
Are all these events required?
If I comment-out all events and keep only SWT.Selection in SWTBotTreeItem.notifySelect(), then also context menu click happens okay.
Is SWT.Selection alone not sufficient?
I'm not able to figure out the need for each event here. It would be very helpful if somebody explains it.
Powered by FUDForum
. Page generated in 0.01897 seconds