コード例 #1
0
 private void handleRemove() {
   IStructuredSelection ssel = (IStructuredSelection) fImportListViewer.getSelection();
   if (ssel.size() > 0) {
     Table table = fImportListViewer.getTable();
     int index = table.getSelectionIndices()[0];
     doRemove(ssel.toList());
     table.setSelection(index < table.getItemCount() ? index : table.getItemCount() - 1);
     pageChanged(false, true);
   }
 }
コード例 #2
0
 private void handleAdd() {
   IStructuredSelection ssel = (IStructuredSelection) fAvailableListViewer.getSelection();
   if (ssel.size() > 0) {
     Table table = fAvailableListViewer.getTable();
     int index = table.getSelectionIndices()[0];
     doAdd(ssel.toList());
     table.setSelection(index < table.getItemCount() ? index : table.getItemCount() - 1);
     pageChanged(true, false);
   }
 }