Reputation: 59
When I use Common Navigator Framework, I can not find how to let it support check boxes just like TreeViewer.
At the beginning, I intend to use Check Tree View, but it can not take full advantage of RCP mechanism, so I decide use Common Navigator Framework....
Upvotes: 3
Views: 130
Reputation: 20985
As Greg commented, this question has been answered on the Eclipse Forum.
In order to create a CommonViewer with check boxes, you need to override
createCommonViewerObject
like this:
protected CommonViewer createCommonViewerObject( Composite parent ) {
int treeStyle = SWT.CHECK | SWT.MULTI | SWT.H_SCROLL | SWT.V_SCROLL;
return new CommonViewer( getViewSite().getId(), parent, treeStyle );
}
Upvotes: 1