public static List<LookupElement> getLookupItems(XQueryFile file) { List<LookupElement> lookupItems = new ArrayList<LookupElement>(); Map<String, String> functionPrefixToNamespaceMap = file.getFunctionPrefixToNamespaceMap(); Set<String> availableNamespaces = new HashSet<String>(functionPrefixToNamespaceMap.values()); for (String namespace : availableNamespaces) { if (file.isPredeclaredNamespace(namespace)) { lookupItems.addAll( getLookupItemsForNamespace( getFunctionsSignatures(file, namespace), getMatchingPrefixes(namespace, functionPrefixToNamespaceMap))); } } return lookupItems; }