Buggy code:
public class ActivityEnabler { private ListViewer activitiesViewer ; private IWorkbenchActivitySupport activitySupport ; private CheckboxTableViewer categoryViewer ; private Set checkedInSession = new HashSet ( 7 ) ; private Set uncheckedInSession = new HashSet ( 7 ) ; private String lastCategory = null ; public ActivityEnabler ( IWorkbenchActivitySupport activityManager ) { } private boolean categoryEnabled ( String categoryId ) { } public Control createControl ( Composite parent ) { Composite mainComposite = new Composite ( parent , SWT . NONE ) ; mainComposite . setLayout ( new GridLayout ( 2 , true ) ) ; Label label = new Label ( mainComposite , SWT . NONE ) ; label . setText ( ActivityMessages . getString ( "ActivityEnabler.categories" ) ) ; label . setLayoutData ( new GridData ( GridData . FILL_HORIZONTAL ) ) ; label = new Label ( mainComposite , SWT . NONE ) ; label . setText ( ActivityMessages . getString ( "ActivityEnabler.activities" ) ) ; label . setLayoutData ( new GridData ( GridData . FILL_HORIZONTAL ) ) ; { categoryViewer = CheckboxTableViewer . newCheckList ( mainComposite , BORDER ) ; categoryViewer . getControl ( ) . setLayoutData ( new GridData ( GridData . FILL_BOTH ) ) ; categoryViewer . setContentProvider ( new CategoryContentProvider ( ) ) ; categoryViewer . setLabelProvider ( new CategoryLabelProvider ( activitySupport . getActivityManager ( ) ) ) ; categoryViewer . setSorter ( new ViewerSorter ( ) ) ; <START_BUG> categoryViewer . setInput ( activitySupport ) ; <END_BUG> categoryViewer . setSelection ( new StructuredSelection ( ) ) ; setCategoryStates ( ) ; } { activitiesViewer = new ListViewer ( mainComposite ) ; activitiesViewer . getControl ( ) . setLayoutData ( new GridData ( GridData . FILL_BOTH ) ) ; activitiesViewer . setContentProvider ( new ActivityContentProvider ( ) ) ; activitiesViewer . setLabelProvider ( new ActivityLabelProvider ( activitySupport . getActivityManager ( ) ) ) ; activitiesViewer . setSorter ( new ViewerSorter ( ) ) ; activitiesViewer . setInput ( Collections . EMPTY_SET ) ; activitiesViewer . getControl ( ) . setEnabled ( false ) ; } categoryViewer . addSelectionChangedListener ( new ISelectionChangedListener ( ) { public void selectionChanged ( SelectionChangedEvent event ) { IStructuredSelection selection = ( ( IStructuredSelection ) ( event . getSelection ( ) ) ) ; if ( ! ( selection . isEmpty ( ) ) ) { String categoryId = ( ( String ) ( selection . getFirstElement ( ) ) ) ; if ( ! ( categoryId . equals ( lastCategory ) ) ) { lastCategory = categoryId ; activitiesViewer . setInput ( getCategoryActivities ( categoryId ) ) ; } } } } ) ; categoryViewer . addCheckStateListener ( new ICheckStateListener ( ) { public void checkStateChanged ( CheckStateChangedEvent event ) { Object element = event . getElement ( ) ; if ( event . getChecked ( ) ) { if ( ! ( uncheckedInSession . remove ( element ) ) ) { checkedInSession . add ( element ) ; } } else { if ( ! ( checkedInSession . remove ( element ) ) ) { uncheckedInSession . add ( element ) ; } } } } ) ; Object firstElement = categoryViewer . getElementAt ( 0 ) ; if ( firstElement != null ) { categoryViewer . setSelection ( new StructuredSelection ( firstElement ) , true ) ; } return mainComposite ; } private Collection getCategoryActivities ( String categoryId ) { } private void setCategoryStates ( ) { } public void updateActivityStates ( ) { } }

Fix:
categoryViewer . setInput ( activitySupport . getActivityManager ( ) ) ;