@NotNull
  private static Collection<TextMateSnippet> getAvailableSnippets(@NotNull Editor editor) {
    TextMateService service = TextMateService.getInstance();
    if (service != null) {
      SnippetsRegistry snippetsRegistry = service.getSnippetRegistry();
      TextMateScope scope = TextMateEditorUtils.getCurrentScopeSelector(((EditorEx)editor));
      return snippetsRegistry.getAvailableSnippets(scope);
    }
    return Collections.emptyList();
  }
@NotNull
  private static Collection<TextMateSnippet> getAvailableSnippets(@NotNull Editor editor)