Bug 458975: Fix ContextMenuFinder returns disposed menu items

The method findMenus() should not iterate through the shells of the
display when trying to find menu items. Doing so may dispose the
previous menu and its items at each iteration if the context menu is a
dynamic menu (e.g. MenuManager.setRemoveAllWhenShown(true)).

In the scope of a ContextMenuFinder there is only one menu associated
with the control, it should be queried directly.

Change-Id: Icfc5e05bf083626304e5a77054535352788b7f4b
Signed-off-by: Patrick Tasse <patrick.tasse@gmail.com>
1 file changed
tree: ae488961b080ec99dcfc497b7a96fb26d045fbcc
  1. artwork/
  2. devtools/
  3. examples/
  4. org.eclipse.swt.examples/
  5. org.eclipse.swtbot/
  6. org.eclipse.swtbot.ant.junit/
  7. org.eclipse.swtbot.e4.finder/
  8. org.eclipse.swtbot.eclipse/
  9. org.eclipse.swtbot.eclipse.core/
  10. org.eclipse.swtbot.eclipse.dsl/
  11. org.eclipse.swtbot.eclipse.finder/
  12. org.eclipse.swtbot.eclipse.finder.test/
  13. org.eclipse.swtbot.eclipse.gef/
  14. org.eclipse.swtbot.eclipse.gef.finder/
  15. org.eclipse.swtbot.eclipse.junit.headless/
  16. org.eclipse.swtbot.eclipse.spy/
  17. org.eclipse.swtbot.eclipse.test.junit/
  18. org.eclipse.swtbot.eclipse.test.junit4/
  19. org.eclipse.swtbot.eclipse.ui/
  20. org.eclipse.swtbot.eclipse.ui.test/
  21. org.eclipse.swtbot.forms/
  22. org.eclipse.swtbot.forms.finder/
  23. org.eclipse.swtbot.forms.finder.test/
  24. org.eclipse.swtbot.generator/
  25. org.eclipse.swtbot.generator.feature/
  26. org.eclipse.swtbot.generator.jdt/
  27. org.eclipse.swtbot.generator.jdt.test/
  28. org.eclipse.swtbot.generator.rules.workbench/
  29. org.eclipse.swtbot.generator.test/
  30. org.eclipse.swtbot.generator.ui/
  31. org.eclipse.swtbot.go/
  32. org.eclipse.swtbot.ide/
  33. org.eclipse.swtbot.junit4_x/
  34. org.eclipse.swtbot.nebula.gallery/
  35. org.eclipse.swtbot.nebula.gallery.finder/
  36. org.eclipse.swtbot.nebula.gallery.finder.test/
  37. org.eclipse.swtbot.releng/
  38. org.eclipse.swtbot.swt.demo/
  39. org.eclipse.swtbot.swt.finder/
  40. org.eclipse.swtbot.swt.finder.test/
  41. org.eclipse.swtbot.swt.finder.test.keyboards/
  42. org.eclipse.swtbot.test/
  43. org.eclipse.swtbot.updatesite/
  44. org.eclipse.ui.forms.examples/
  45. .git-svn-authors
  46. .gitignore
  47. .project
  48. CONTRIBUTING.md
  49. pom.xml
  50. README.md
README.md

SWTBot

SWTBot is a Java API that interacts with SWT by using high-level operations. It is generally use to write UI tests efficiently since the grain of the API is the same grain as UI operation. It makes easier to transform a user scenario to an automated tests.

Documentation & links

http://wiki.eclipse.org/SWTBot

Contributing

GitHub tracker and pull requests are currently not supported by the contribution process.

Please read http://wiki.eclipse.org/SWTBot/Contributing to know how to interact well with the community. For further questions about contributing to SWTBot, please send a mail to swtbot-dev@eclipse.org .