Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 355316

Summary: Cannot resolve ToolItem created from CTabFolder
Product: [Technology] SWTBot Reporter: Dimitar Georgiev <dimitar.georgiev>
Component: SWTBotAssignee: Project Inbox <swtbot-inbox>
Status: NEW --- QA Contact:
Severity: enhancement    
Priority: P3    
Version: unspecified   
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard:

Description Dimitar Georgiev CLA 2011-08-21 10:19:42 EDT
Hi,

One will not be able to resolve a child in a hierarchy if the corresponding child is created with a CTabFolder as its parent.

One example usecase would be a CTabFolder with a toolbar, the toolbar created with the folder as its parent.

This is correct to do I guess, because the CTabFolder is a valid Composite subclass to use, and so it can be used as a ToolBar's parent.

The CTabFolder resolver provided in org.eclipse.swtbot only resolves the CTabItem's as its children:

public List getChildren(Widget w) {
return hasChildren(w) ?
Arrays.asList(((CTabFolder) w).getItems()) : new ArrayList();
}

Can you please comment whether the CTabFolderResolver behaviour is incorrect in your opinion? If you agree so, I would like to provide a patch for this.