public void up(List<?> checked, CheckboxTreeViewer tree) {
   if (checked.size() > 0) {
     setElements(moveUp(fFields, checked), tree);
     tree.reveal(checked.get(0));
   }
   tree.setSelection(new StructuredSelection(checked));
 }
 public void down(List<?> checked, CheckboxTreeViewer tree) {
   if (checked.size() > 0) {
     setElements(reverse(moveUp(reverse(fFields), checked)), tree);
     tree.reveal(checked.get(checked.size() - 1));
   }
   tree.setSelection(new StructuredSelection(checked));
 }
 protected void newFolderButtonPressed() {
   Object createdFolder = createFolder(fSelectedContainer);
   if (createdFolder != null) {
     CheckboxTreeViewer treeViewer = fViewer;
     treeViewer.refresh(fSelectedContainer);
     treeViewer.reveal(createdFolder);
     treeViewer.setChecked(createdFolder, true);
     treeViewer.setSelection(new StructuredSelection(createdFolder));
     updateOKStatus();
   }
 }