3

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....

Rüdiger Herrmann
  • 20,512
  • 11
  • 62
  • 79
ProEditor
  • 59
  • 5

1 Answers1

1

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 ); 
} 
Community
  • 1
  • 1
Rüdiger Herrmann
  • 20,512
  • 11
  • 62
  • 79