ProEditor
ProEditor

Reputation: 59

How to use the Common Navigator Framework with checkboxes

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

Answers (1)

Rüdiger Herrmann
Rüdiger Herrmann

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

Related Questions