void reportKeywordUsageProblems(final List<RobotCase> cases) { for (final RobotCase testCase : cases) { reportKeywordUsageProblemsInTestCaseSettings(testCase); reportKeywordUsageProblems( validationContext, reporter, testCase.getLinkedElement().getTestExecutionRows(), testCase.getTemplateInUse()); } }
private void reportKeywordUsageProblemsInTestCaseSettings(final RobotCase testCase) { final RobotToken templateKeywordToken = testCase.getLinkedElement().getTemplateKeywordLocation(); if (templateKeywordToken != null && !templateKeywordToken.getFilePosition().isNotSet() && isTemplateFromTestCasesTable(testCase) && !templateKeywordToken.getText().toLowerCase().equals("none")) { validateExistingKeywordCall( validationContext, reporter, templateKeywordToken, Optional.<List<RobotToken>>absent()); } }
private boolean isTemplateFromTestCasesTable(final RobotCase testCase) { return testCase.getLinkedElement().getRobotViewAboutTestTemplate() != null; }