Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 355316 - Cannot resolve ToolItem created from CTabFolder
Summary: Cannot resolve ToolItem created from CTabFolder
Status: NEW
Alias: None
Product: SWTBot
Classification: Technology
Component: SWTBot (show other bugs)
Version: unspecified   Edit
Hardware: All All
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-08-21 10:19 EDT by Dimitar Georgiev CLA
Modified: 2011-08-21 10:19 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.