//select first template in list
if (templateFactories.size() > 0) {
listViewer.setChecked(listViewer.getElementAt(0), true);
}
listViewer.addCheckStateListener(new ICheckStateListener() {
public void checkStateChanged( CheckStateChangedEvent event ) {
Object[] allChecked = listViewer.getCheckedElements();
for (int i = 0; i < allChecked.length; i++) {
if (!allChecked[i].equals(event.getElement())) {