コード例 #1
0
  @Inject
  @Optional
  private void whenCaseIsAdded(@UIEventTopic(RobotModelEvents.ROBOT_CASE_ADDED) final Event event) {
    final RobotCasesSection section = Events.get(event, IEventBroker.DATA, RobotCasesSection.class);

    if (section != null && section.getSuiteFile() == fileModel) {
      sortModel.clear();

      RobotCase testCase = Events.get(event, RobotModelEvents.ADDITIONAL_DATA, RobotCase.class);
      if (testCase == null) {
        final List<?> keywords = Events.get(event, RobotModelEvents.ADDITIONAL_DATA, List.class);
        testCase = (RobotCase) keywords.get(keywords.size() - 1);
      }

      selectionLayerAccessor.selectElementInFirstCellAfterOperation(
          testCase, tableInputIsReplaced());
    }
  }
コード例 #2
0
ファイル: TestCaseTableValidator.java プロジェクト: nokia/RED
  @Override
  public void validate(final IProgressMonitor monitor) throws CoreException {
    if (!testCaseSection.isPresent()) {
      return;
    }
    final RobotCasesSection robotCasesSection = testCaseSection.get();
    final TestCaseTable casesTable = robotCasesSection.getLinkedElement();
    final List<TestCase> cases = casesTable.getTestCases();

    validateByExternal(robotCasesSection, monitor);

    reportEmptyNamesOfCases(cases);
    reportEmptyCases(cases);
    reportDuplicatedCases(cases);
    reportSettingsProblems(cases);
    reportKeywordUsageProblems(robotCasesSection.getChildren());
    reportUnknownVariables(cases);
  }