Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » SWTBot » SWTBotMenu.click(SWTBotMenu.click does not set menu selection)
SWTBotMenu.click [message #811630] Fri, 02 March 2012 16:18
Jens Baumgart is currently offline Jens BaumgartFriend
Messages: 5
Registered: July 2009
Junior Member
In EGit there are handlers consuming the menu selection in their setEnabled method:

Object selection = ctx.getVariable(ISources.ACTIVE_MENU_SELECTION_NAME);

When I click a related context menu in a SWTBot test using SWTBotMenu.click the command execution fails because there is no menu selection.

It works if the handler implementation uses ACTIVE_CURRENT_SELECTION_NAME.

My question is: is this an issue in SWTBotMenu.click or should the handler implementation always use the current selection instead of the current menu selection.

Remark:
In http: //www.eclipse.org/forums/index.php/mv/msg/172398/548581/#msg_548581 there is a statement that seems to favor the usage of the menu selection
Previous Topic:Discouraged access: for the method getDefault()
Next Topic:Accessing the Problems View
Goto Forum:
  


Current Time: Mon Nov 24 23:01:06 GMT 2014

Powered by FUDForum. Page generated in 0.11384 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software