class ActiveGrammarSet implements ScopedSetObserver<GrammarDocument> {

    public Collection<GrammarType> getGrammarTypes() {
        final Collection<GrammarType> types =
                new java.util.HashSet<GrammarType>();
        for (GrammarDocument document : grammars) {
            final GrammarType type = document.getMediaType();
            if (type != null) {
                types.add(type);
            }
        }
        return types;
    }

    public  ActiveGrammarSet(final ScopeObserver scopeObserver);

}