List<String> (XmlFile file, String instructionName) { final List<String> definedImports = new ArrayList<>(); final XmlDocument document = file.getDocument(); if (document != null) { final XmlProlog prolog = document.getProlog(); final Collection<XmlProcessingInstruction> instructions = new ArrayList<>(PsiTreeUtil.findChildrenOfType(prolog, XmlProcessingInstruction.class)); for (final XmlProcessingInstruction instruction : instructions) { final String instructionTarget = getInstructionTarget(instructionName, instruction); if (instructionTarget != null) { definedImports.add(instructionTarget); } } } return definedImports; }