WI-53664 Simplify spellchecker settings: use global for words saving by default for projects with empty project dict

GitOrigin-RevId: ad01ecb4fcf10efe720efedf20a64f15bbf89798
This commit is contained in:
Olga Strizhenko
2020-06-10 20:31:06 +03:00
committed by intellij-monorepo-bot
parent 96f25f6a4b
commit d4d4e7cd40
@@ -15,11 +15,13 @@ public class SettingsTransferActivity implements StartupActivity {
@Override
public void runActivity(@NotNull Project project) {
final SpellCheckerSettings settings = SpellCheckerSettings.getInstance(project);
if (!settings.isSettingsTransferred() && settings.isUseSingleDictionaryToSave() && PROJECT.getName().equals(settings.getDictionaryToSave())) {
if (ServiceManager.getService(project, ProjectDictionaryState.class).getProjectDictionary().getWords().isEmpty()) {
if (!settings.isSettingsTransferred()) {
if (settings.isUseSingleDictionaryToSave() &&
PROJECT.getName().equals(settings.getDictionaryToSave()) &&
ServiceManager.getService(project, ProjectDictionaryState.class).getProjectDictionary().getWords().isEmpty()) {
settings.setDictionaryToSave(APP.getName());
settings.setSettingsTransferred(true);
}
settings.setSettingsTransferred(true);
}
}
}