Set<String> () { final AntDomElement hostingElement = getHostingAntDomElement(); if (hostingElement == null) { return Collections.emptySet(); } final AntDomTarget contextTarget = hostingElement.getParentOfType(AntDomTarget.class, false); if (contextTarget == null) { return Collections.emptySet(); } final Set<String> existing = new ArrayListSet<>(); final String selfName = contextTarget.getName().getStringValue(); if (selfName != null) { existing.add(selfName); } final String dependsString = contextTarget.getDependsList().getRawText(); if (dependsString != null) { final StringTokenizer tokenizer = new StringTokenizer(dependsString, ",", false); while (tokenizer.hasMoreTokens()) { existing.add(tokenizer.nextToken().trim()); } } return existing; }