Collection<String> (PsiDocTag tag, String parameter) { if (tag == null) return Collections.emptyList(); Collection<String> results = new ArrayList<>(); Matcher matcher = Pattern.compile("@testng.test(?:.*)" + parameter + "\\s*=\\s*\"(.*?)\".*").matcher(tag.getText()); if (matcher.matches()) { String[] groups = matcher.group(1).split("[,\\s]"); for (String group : groups) { final String trimmed = group.trim(); if (!trimmed.isEmpty()) { results.add(trimmed); } } } return results; }