Source:
<code>private void createProjectsList(Composite workArea) { Label title = new Label(workArea, SWT.NONE); title.setText(UIText.WizardProjectsImportPage_ProjectsListTitle); Composite listComposite = new Composite(workArea, SWT.NONE); GridLayout layout = new GridLayout(); layout.numColumns = 2; layout.marginWidth = 0; layout.makeColumnsEqualWidth = false; listComposite.setLayout(layout); listComposite.setLayoutData(new GridData(GridData.GRAB_HORIZONTAL | GridData.GRAB_VERTICAL | GridData.FILL_BOTH)); PatternFilter filter = new PatternFilter() { @Override public boolean isElementVisible(Viewer viewer, Object element) { if (getCheckedProjects().contains(element)) { return true; } return super.isElementVisible(viewer, element); } }; FilteredTree filteredTree = new FilteredTree(listComposite, SWT.CHECK | SWT.BORDER, filter); filteredTree.setInitialText(UIText.WizardProjectsImportPage_filterText); projectsList = filteredTree.getViewer(); GridData listData = new GridData(GridData.GRAB_HORIZONTAL | GridData.GRAB_VERTICAL | GridData.FILL_BOTH); projectsList.getControl().setLayoutData(listData); projectsList.setContentProvider(new ITreeContentProvider() { public Object[] getChildren(Object parentElement) { return null; } public Object[] getElements(Object inputElement) { return getValidProjects(); } public boolean hasChildren(Object element) { return false; } public Object getParent(Object element) { return null; } public void dispose() { } public void inputChanged(Viewer viewer, Object oldInput, Object newInput) { } }); projectsList.getTree().addSelectionListener(new SelectionAdapter() { @Override public void widgetSelected(SelectionEvent e) { <START> setPageComplete(getCheckedProjects().isEmpty()); <END> } }); projectsList.setLabelProvider(new LabelProvider() { public String getText(Object element) { return ((ProjectRecord) element) .getProjectLabel(structureProvider); } }); projectsList.setInput(this); projectsList.setComparator(new ViewerComparator()); createSelectionButtons(listComposite); }</code><technical_language>This setPageComplete(!getCheckedProjects().isEmpty());</technical_language>

Target:
private void createProjectsList(Composite workArea) { Label title = new Label(workArea, SWT.NONE); title.setText(UIText.WizardProjectsImportPage_ProjectsListTitle); Composite listComposite = new Composite(workArea, SWT.NONE); GridLayout layout = new GridLayout(); layout.numColumns = 2; layout.marginWidth = 0; layout.makeColumnsEqualWidth = false; listComposite.setLayout(layout); listComposite.setLayoutData(new GridData(GridData.GRAB_HORIZONTAL | GridData.GRAB_VERTICAL | GridData.FILL_BOTH)); PatternFilter filter = new PatternFilter() { @Override public boolean isElementVisible(Viewer viewer, Object element) { if (getCheckedProjects().contains(element)) { return true; } return super.isElementVisible(viewer, element); } }; FilteredTree filteredTree = new FilteredTree(listComposite, SWT.CHECK | SWT.BORDER, filter); filteredTree.setInitialText(UIText.WizardProjectsImportPage_filterText); projectsList = filteredTree.getViewer(); GridData listData = new GridData(GridData.GRAB_HORIZONTAL | GridData.GRAB_VERTICAL | GridData.FILL_BOTH); projectsList.getControl().setLayoutData(listData); projectsList.setContentProvider(new ITreeContentProvider() { public Object[] getChildren(Object parentElement) { return null; } public Object[] getElements(Object inputElement) { return getValidProjects(); } public boolean hasChildren(Object element) { return false; } public Object getParent(Object element) { return null; } public void dispose() { } public void inputChanged(Viewer viewer, Object oldInput, Object newInput) { } }); projectsList.getTree().addSelectionListener(new SelectionAdapter() { @Override public void widgetSelected(SelectionEvent e) { checkPageComplete(); } }); projectsList.setLabelProvider(new LabelProvider() { public String getText(Object element) { return ((ProjectRecord) element) .getProjectLabel(structureProvider); } }); projectsList.setInput(this); projectsList.setComparator(new ViewerComparator()); createSelectionButtons(listComposite); }