private void setupDictionary() {
File wordList = new File(Global.getFileManager().getSpellDirPath()+Locale.getDefault()+".dic");
try {
dictionary = new SpellDictionaryHashMap(wordList);
spellChecker = new SpellChecker(dictionary);
File userWordList;
userWordList = new File(Global.getFileManager().getSpellDirPathUser()+"user.dic");
// Get the local user spell dictionary
try {
userDictionary = new SpellDictionaryHashMap(userWordList);
} catch (FileNotFoundException e) {
userWordList.createNewFile();
userDictionary = new SpellDictionaryHashMap(userWordList);
} catch (IOException e) {
userWordList.createNewFile();
userDictionary = new SpellDictionaryHashMap(userWordList);
}
spellListener = new SuggestionListener(this, spellChecker);
// Add the user dictionary