コード例 #1
0
 public void deleteElement(Object obj) {
   if (obj instanceof Scenario) {
     Scenario s = (Scenario) obj;
     s.getParent().remove(s);
   }
   if (obj instanceof Test) {
     Test t = (Test) obj;
     t.getParent().remove(t);
   }
 }
コード例 #2
0
 public void executeTest() {
   Object selected = form.getSelection();
   Test test = selected instanceof Scenario ? ((Scenario) selected).getParent() : (Test) selected;
   if (test == null) {
     form.displayErrorMessage(L.get("ui.error.no_test_selected"));
   } else if (!test.isValid()) {
     form.displayErrorMessage(L.get("ui.error.test_not_valid"));
   } else {
     executor.execute(test);
   }
 }
コード例 #3
0
 public void createAction(Schema action) {
   Object selected = form.getSelection();
   Test test = selected instanceof Scenario ? ((Scenario) selected).getParent() : (Test) selected;
   if (test == null) form.displayErrorMessage(L.get("ui.error.no_test_selected"));
   else form.editElementName(test.add(new Scenario(action)));
 }