Exemplo n.º 1
0
 private void deleteProfile() {
   if (profilesTable.getSelectionCount() != 1) {
     return;
   }
   TableItem item = profilesTable.getSelection()[0];
   TeaVMProfile profile = (TeaVMProfile) item.getData();
   if (!profile.getExternalToolId().isEmpty()) {
     return;
   }
   boolean confirmed =
       MessageDialog.openConfirm(
           getShell(),
           "Deletion confirmation",
           "Are you sure to delete profile " + item.getText(0) + "?");
   if (!confirmed) {
     return;
   }
   settings.deleteProfile((TeaVMProfile) item.getData());
   item.dispose();
 }