PreferencesRegistry (@NotNull String bundleName) { Iterator<TextMatePreferences> preferences = TestUtil.readBundle(bundleName).readPreferences().iterator(); assertNotNull(preferences); PreferencesRegistryImpl preferencesRegistry = new PreferencesRegistryImpl(); while (preferences.hasNext()) { TextMatePreferences next = preferences.next(); preferencesRegistry.addPreferences(new Preferences(next.getScopeName(), next.getHighlightingPairs(), next.getSmartTypingPairs(), Collections.emptySet(), null, next.getIndentationRules())); } return preferencesRegistry; }