summaryrefslogtreecommitdiff
path: root/spellchecker/src/com
diff options
context:
space:
mode:
Diffstat (limited to 'spellchecker/src/com')
-rw-r--r--spellchecker/src/com/intellij/spellchecker/FileLoader.java3
-rw-r--r--spellchecker/src/com/intellij/spellchecker/actions/SpellingPopupActionGroup.java4
-rw-r--r--spellchecker/src/com/intellij/spellchecker/compress/CompressedDictionary.java8
-rw-r--r--spellchecker/src/com/intellij/spellchecker/dictionary/AggregatedDictionary.java5
-rw-r--r--spellchecker/src/com/intellij/spellchecker/dictionary/UserDictionary.java3
-rw-r--r--spellchecker/src/com/intellij/spellchecker/jetbrains.dic1
-rw-r--r--spellchecker/src/com/intellij/spellchecker/quickfixes/RenameTo.java8
-rw-r--r--spellchecker/src/com/intellij/spellchecker/state/AggregatedDictionaryState.java4
-rw-r--r--spellchecker/src/com/intellij/spellchecker/state/CachedDictionaryState.java6
-rw-r--r--spellchecker/src/com/intellij/spellchecker/state/DictionaryState.java5
-rw-r--r--spellchecker/src/com/intellij/spellchecker/state/StateLoader.java4
11 files changed, 12 insertions, 39 deletions
diff --git a/spellchecker/src/com/intellij/spellchecker/FileLoader.java b/spellchecker/src/com/intellij/spellchecker/FileLoader.java
index cd57fb467dab..d0c4809df5f0 100644
--- a/spellchecker/src/com/intellij/spellchecker/FileLoader.java
+++ b/spellchecker/src/com/intellij/spellchecker/FileLoader.java
@@ -24,7 +24,6 @@ import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
-
@SuppressWarnings({"IOResourceOpenedButNotSafelyClosed"})
public class FileLoader implements Loader {
@@ -61,6 +60,4 @@ public class FileLoader implements Loader {
}
}
}
-
-
}
diff --git a/spellchecker/src/com/intellij/spellchecker/actions/SpellingPopupActionGroup.java b/spellchecker/src/com/intellij/spellchecker/actions/SpellingPopupActionGroup.java
index a3639c9e2014..b8a45953b303 100644
--- a/spellchecker/src/com/intellij/spellchecker/actions/SpellingPopupActionGroup.java
+++ b/spellchecker/src/com/intellij/spellchecker/actions/SpellingPopupActionGroup.java
@@ -63,7 +63,7 @@ public final class SpellingPopupActionGroup extends ActionGroup {
@NotNull
private static AnAction[] findActions(@NotNull AnActionEvent e) {
- PsiFile psiFile = e.getData(LangDataKeys.PSI_FILE);
+ PsiFile psiFile = e.getData(CommonDataKeys.PSI_FILE);
Project project = e.getData(LangDataKeys.PROJECT);
Editor editor = e.getData(LangDataKeys.EDITOR);
if (psiFile != null && project != null && editor != null) {
@@ -124,7 +124,7 @@ public final class SpellingPopupActionGroup extends ActionGroup {
}
public void actionPerformed(final AnActionEvent e) {
- final PsiFile psiFile = e.getData(LangDataKeys.PSI_FILE);
+ final PsiFile psiFile = e.getData(CommonDataKeys.PSI_FILE);
final Project project = e.getData(LangDataKeys.PROJECT);
final Editor editor = e.getData(LangDataKeys.EDITOR);
if (psiFile != null && project != null && editor != null) {
diff --git a/spellchecker/src/com/intellij/spellchecker/compress/CompressedDictionary.java b/spellchecker/src/com/intellij/spellchecker/compress/CompressedDictionary.java
index 9e7b66dd04cd..dc3a90f70ad0 100644
--- a/spellchecker/src/com/intellij/spellchecker/compress/CompressedDictionary.java
+++ b/spellchecker/src/com/intellij/spellchecker/compress/CompressedDictionary.java
@@ -23,7 +23,6 @@ import com.intellij.util.Consumer;
import gnu.trove.THashSet;
import gnu.trove.TIntObjectHashMap;
import gnu.trove.TIntObjectProcedure;
-import org.jetbrains.annotations.NonNls;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
@@ -164,12 +163,7 @@ public final class CompressedDictionary implements Dictionary {
public String toString() {
- @NonNls StringBuilder sb = new StringBuilder();
- sb.append("CompressedDictionary");
- sb.append("{wordsCount=").append(wordsCount);
- sb.append(", name='").append(name).append('\'');
- sb.append('}');
- return sb.toString();
+ return "CompressedDictionary" + "{wordsCount=" + wordsCount + ", name='" + name + '\'' + '}';
}
@NotNull
diff --git a/spellchecker/src/com/intellij/spellchecker/dictionary/AggregatedDictionary.java b/spellchecker/src/com/intellij/spellchecker/dictionary/AggregatedDictionary.java
index 94f9d2fcc891..b9efdc874337 100644
--- a/spellchecker/src/com/intellij/spellchecker/dictionary/AggregatedDictionary.java
+++ b/spellchecker/src/com/intellij/spellchecker/dictionary/AggregatedDictionary.java
@@ -72,7 +72,6 @@ public class AggregatedDictionary implements EditableDictionary {
getCachedDictionary().removeFromDictionary(word);
}
-
@Override
public void replaceAll(@Nullable Collection<String> words) {
Set<String> oldWords = getProjectDictionary().getWords();
@@ -96,7 +95,6 @@ public class AggregatedDictionary implements EditableDictionary {
cachedDictionary.traverse(consumer);
}
-
@Override
public Set<String> getWords() {
return cachedDictionary.getWords();
@@ -113,7 +111,6 @@ public class AggregatedDictionary implements EditableDictionary {
return getProjectDictionary().getEditableWords();
}
-
@Override
public void addToDictionary(@Nullable Collection<String> words) {
getProjectDictionary().addToDictionary(words);
@@ -127,6 +124,4 @@ public class AggregatedDictionary implements EditableDictionary {
public ProjectDictionary getProjectDictionary() {
return projectDictionary;
}
-
-
}
diff --git a/spellchecker/src/com/intellij/spellchecker/dictionary/UserDictionary.java b/spellchecker/src/com/intellij/spellchecker/dictionary/UserDictionary.java
index 7ee25df992cb..49bc191196a2 100644
--- a/spellchecker/src/com/intellij/spellchecker/dictionary/UserDictionary.java
+++ b/spellchecker/src/com/intellij/spellchecker/dictionary/UserDictionary.java
@@ -53,8 +53,8 @@ public class UserDictionary implements EditableDictionary {
return words.size();
}
+ @NotNull
@Override
- @Nullable
public Set<String> getWords() {
return words;
}
@@ -70,7 +70,6 @@ public class UserDictionary implements EditableDictionary {
words.clear();
}
-
@Override
public void addToDictionary(String word) {
if (word == null) {
diff --git a/spellchecker/src/com/intellij/spellchecker/jetbrains.dic b/spellchecker/src/com/intellij/spellchecker/jetbrains.dic
index 8e65b7fbe3fd..9dc0d72fa5c6 100644
--- a/spellchecker/src/com/intellij/spellchecker/jetbrains.dic
+++ b/spellchecker/src/com/intellij/spellchecker/jetbrains.dic
@@ -439,6 +439,7 @@ stdarg
stdlib
stmt
strictfp
+stringify
stylesheet
stylesheets
sublicense
diff --git a/spellchecker/src/com/intellij/spellchecker/quickfixes/RenameTo.java b/spellchecker/src/com/intellij/spellchecker/quickfixes/RenameTo.java
index 5a97b266ec50..206a5f9510e2 100644
--- a/spellchecker/src/com/intellij/spellchecker/quickfixes/RenameTo.java
+++ b/spellchecker/src/com/intellij/spellchecker/quickfixes/RenameTo.java
@@ -97,13 +97,13 @@ public class RenameTo extends ShowSuggestions implements SpellCheckerQuickFix {
if (editor == null) return;
if (editor instanceof EditorWindow) {
- map.put(PlatformDataKeys.EDITOR.getName(), editor);
- map.put(LangDataKeys.PSI_ELEMENT.getName(), psiElement);
+ map.put(CommonDataKeys.EDITOR.getName(), editor);
+ map.put(CommonDataKeys.PSI_ELEMENT.getName(), psiElement);
} else if (ApplicationManager.getApplication().isUnitTestMode()) { // TextEditorComponent / FiledEditorManagerImpl give away the data in real life
map.put(
- LangDataKeys.PSI_ELEMENT.getName(),
+ CommonDataKeys.PSI_ELEMENT.getName(),
new TextEditorPsiDataProvider().getData(
- LangDataKeys.PSI_ELEMENT.getName(),
+ CommonDataKeys.PSI_ELEMENT.getName(),
editor,
containingFile.getVirtualFile()
)
diff --git a/spellchecker/src/com/intellij/spellchecker/state/AggregatedDictionaryState.java b/spellchecker/src/com/intellij/spellchecker/state/AggregatedDictionaryState.java
index 74b73ad7ce45..318916a8514e 100644
--- a/spellchecker/src/com/intellij/spellchecker/state/AggregatedDictionaryState.java
+++ b/spellchecker/src/com/intellij/spellchecker/state/AggregatedDictionaryState.java
@@ -23,14 +23,12 @@ import com.intellij.spellchecker.dictionary.UserDictionary;
import org.jetbrains.annotations.NotNull;
public class AggregatedDictionaryState {
-
private ProjectDictionaryState projectDictionaryState;
private CachedDictionaryState cachedDictionaryState;
private AggregatedDictionary dictionary;
private String currentUser;
private Project project;
-
public AggregatedDictionaryState() {
}
@@ -56,8 +54,6 @@ public class AggregatedDictionaryState {
return dictionary;
}
-
-
public void loadState() {
assert project != null;
cachedDictionaryState = ServiceManager.getService(CachedDictionaryState.class);
diff --git a/spellchecker/src/com/intellij/spellchecker/state/CachedDictionaryState.java b/spellchecker/src/com/intellij/spellchecker/state/CachedDictionaryState.java
index 5b34b2bd77fc..eb84d239336f 100644
--- a/spellchecker/src/com/intellij/spellchecker/state/CachedDictionaryState.java
+++ b/spellchecker/src/com/intellij/spellchecker/state/CachedDictionaryState.java
@@ -15,14 +15,12 @@
*/
package com.intellij.spellchecker.state;
-import com.intellij.openapi.components.PersistentStateComponent;
-import com.intellij.openapi.components.State;
-import com.intellij.openapi.components.Storage;
-import com.intellij.openapi.components.StoragePathMacros;
+import com.intellij.openapi.components.*;
import com.intellij.spellchecker.dictionary.EditableDictionary;
@State(
name = "CachedDictionaryState",
+ roamingType = RoamingType.DISABLED,
storages = {@Storage(
file = StoragePathMacros.APP_CONFIG + "/cachedDictionary.xml")})
public class CachedDictionaryState extends DictionaryState implements PersistentStateComponent<DictionaryState> {
diff --git a/spellchecker/src/com/intellij/spellchecker/state/DictionaryState.java b/spellchecker/src/com/intellij/spellchecker/state/DictionaryState.java
index d392b69d152d..a3fbfdd8f38e 100644
--- a/spellchecker/src/com/intellij/spellchecker/state/DictionaryState.java
+++ b/spellchecker/src/com/intellij/spellchecker/state/DictionaryState.java
@@ -87,11 +87,8 @@ public class DictionaryState implements PersistentStateComponent<DictionaryState
dictionary.addToDictionary(words);
}
-
@Override
public String toString() {
return "DictionaryState{" + "dictionary=" + dictionary + '}';
}
-
-
-}
+} \ No newline at end of file
diff --git a/spellchecker/src/com/intellij/spellchecker/state/StateLoader.java b/spellchecker/src/com/intellij/spellchecker/state/StateLoader.java
index 7c263ad117aa..fcb7414e2be4 100644
--- a/spellchecker/src/com/intellij/spellchecker/state/StateLoader.java
+++ b/spellchecker/src/com/intellij/spellchecker/state/StateLoader.java
@@ -24,9 +24,7 @@ import org.jetbrains.annotations.NotNull;
import java.util.Set;
-
public class StateLoader implements EditableDictionaryLoader {
-
private final Project project;
private EditableDictionary dictionary;
@@ -34,7 +32,6 @@ public class StateLoader implements EditableDictionaryLoader {
this.project = project;
}
-
public void load(@NotNull Consumer<String> consumer) {
AggregatedDictionaryState state = ServiceManager.getService(project, AggregatedDictionaryState.class);
state.setProject(project);
@@ -49,7 +46,6 @@ public class StateLoader implements EditableDictionaryLoader {
consumer.consume(word);
}
}
-
}
public EditableDictionary getDictionary() {