Search in sources :

Example 1 with EditableDictionary

use of com.intellij.spellchecker.dictionary.EditableDictionary in project intellij-community by JetBrains.

the class ProjectDictionaryState method retrieveProjectDictionaries.

private void retrieveProjectDictionaries() {
    Set<EditableDictionary> dictionaries = new THashSet<>();
    if (dictionaryStates != null) {
        for (DictionaryState dictionaryState : dictionaryStates) {
            dictionaryState.loadState(dictionaryState);
            dictionaries.add(dictionaryState.getDictionary());
        }
    }
    projectDictionary = new ProjectDictionary(dictionaries);
}
Also used : ProjectDictionary(com.intellij.spellchecker.dictionary.ProjectDictionary) EditableDictionary(com.intellij.spellchecker.dictionary.EditableDictionary) THashSet(gnu.trove.THashSet)

Example 2 with EditableDictionary

use of com.intellij.spellchecker.dictionary.EditableDictionary in project intellij-community by JetBrains.

the class ProjectDictionaryState method setProjectDictionary.

@Transient
public void setProjectDictionary(ProjectDictionary projectDictionary) {
    dictionaryStates.clear();
    Set<EditableDictionary> projectDictionaries = projectDictionary.getDictionaries();
    if (projectDictionaries != null) {
        for (EditableDictionary dic : projectDictionary.getDictionaries()) {
            dictionaryStates.add(new DictionaryState(dic));
        }
    }
}
Also used : EditableDictionary(com.intellij.spellchecker.dictionary.EditableDictionary) Transient(com.intellij.util.xmlb.annotations.Transient)

Aggregations

EditableDictionary (com.intellij.spellchecker.dictionary.EditableDictionary)2 ProjectDictionary (com.intellij.spellchecker.dictionary.ProjectDictionary)1 Transient (com.intellij.util.xmlb.annotations.Transient)1 THashSet (gnu.trove.THashSet)1