@Override public synchronized final ISpellChecker getSpellChecker() throws IllegalStateException { if (fGlobalDictionaries == null) throw new IllegalStateException("spell checker has been shut down"); //$NON-NLS-1$ IPreferenceStore store= JavaPlugin.getDefault().getPreferenceStore(); Locale locale= getCurrentLocale(store); if (fUserDictionary == null && "".equals(locale.toString())) //$NON-NLS-1$ return null; if (fChecker != null && fChecker.getLocale().equals(locale)) return fChecker; resetSpellChecker(); fChecker= new DefaultSpellChecker(store, locale); resetUserDictionary(); for (Iterator<ISpellDictionary> iterator= fGlobalDictionaries.iterator(); iterator.hasNext();) { ISpellDictionary dictionary= iterator.next(); fChecker.addDictionary(dictionary); } ISpellDictionary dictionary= findDictionary(fChecker.getLocale()); if (dictionary != null) fChecker.addDictionary(dictionary); return fChecker; }
@Override public synchronized final ISpellChecker getSpellChecker() throws IllegalStateException { if (fGlobalDictionaries == null) throw new IllegalStateException("spell checker has been shut down"); //$NON-NLS-1$ IPreferenceStore store= JavaPlugin.getDefault().getPreferenceStore(); Locale locale= getCurrentLocale(store); if (fUserDictionary == null && "".equals(locale.toString())) //$NON-NLS-1$ return null; if (fChecker != null && fChecker.getLocale().equals(locale)) return fChecker; resetSpellChecker(); fChecker= new DefaultSpellChecker(store, locale); resetUserDictionary(); for (Iterator<ISpellDictionary> iterator= fGlobalDictionaries.iterator(); iterator.hasNext();) { ISpellDictionary dictionary= iterator.next(); fChecker.addDictionary(dictionary); } ISpellDictionary dictionary= findDictionary(fChecker.getLocale()); if (dictionary != null) fChecker.addDictionary(dictionary); return fChecker; }
public final synchronized ISpellChecker getSpellChecker() throws IllegalStateException { if (fGlobalDictionaries == null) throw new IllegalStateException("spell checker has been shut down"); //$NON-NLS-1$ IPreferenceStore store= JavaPlugin.getDefault().getPreferenceStore(); Locale locale= getCurrentLocale(store); if (fUserDictionary == null && "".equals(locale.toString())) //$NON-NLS-1$ return null; if (fChecker != null && fChecker.getLocale().equals(locale)) return fChecker; resetSpellChecker(); fChecker= new DefaultSpellChecker(store, locale); resetUserDictionary(); for (Iterator iterator= fGlobalDictionaries.iterator(); iterator.hasNext();) { ISpellDictionary dictionary= (ISpellDictionary)iterator.next(); fChecker.addDictionary(dictionary); } ISpellDictionary dictionary= findDictionary(fChecker.getLocale()); if (dictionary != null) fChecker.addDictionary(dictionary); return fChecker; }
try { fUserDictionary= new PersistentSpellDictionary(url); fChecker.addDictionary(fUserDictionary); } finally { stream.close();
try { fUserDictionary= new PersistentSpellDictionary(url); fChecker.addDictionary(fUserDictionary); } finally { stream.close();
try { fUserDictionary= new PersistentSpellDictionary(url); fChecker.addDictionary(fUserDictionary); } finally { stream.close();