SnippetsRegistry (@NotNull String bundleName) { Iterator<TextMateSnippet> snippets = readBundle(bundleName).readSnippets().iterator(); final SnippetsRegistryImpl snippetsRegistry = new SnippetsRegistryImpl(); while (snippets.hasNext()) { snippetsRegistry.register(snippets.next()); } return snippetsRegistry; }