From 52c42eb0fd52badb53d9cc3cb274e06040c7b2b3 Mon Sep 17 00:00:00 2001 From: Alexey Gopachenko Date: Mon, 26 Feb 2018 16:39:20 +0100 Subject: [PATCH] WI-40832 java spellchecker should check only declarations and ignore usages --- .../com/intellij/spellchecker/NamedElementTokenizer.java | 8 ++++---- .../testData/inspections/spellchecker/TypoInJava.java | 8 ++++---- .../testData/inspections/spellchecker/VarArg.java | 2 +- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/java/java-impl/src/com/intellij/spellchecker/NamedElementTokenizer.java b/java/java-impl/src/com/intellij/spellchecker/NamedElementTokenizer.java index eb85da653eb7..309a86d4769c 100644 --- a/java/java-impl/src/com/intellij/spellchecker/NamedElementTokenizer.java +++ b/java/java-impl/src/com/intellij/spellchecker/NamedElementTokenizer.java @@ -30,7 +30,7 @@ import org.jetbrains.annotations.NotNull; */ public class NamedElementTokenizer extends Tokenizer { private final Tokenizer myIdentifierTokenizer = new PsiIdentifierTokenizer(); - private final PsiTypeTokenizer myTypeTokenizer = new PsiTypeTokenizer(); + //private final PsiTypeTokenizer myTypeTokenizer = new PsiTypeTokenizer(); @Override public void tokenize(@NotNull T element, TokenConsumer consumer) { @@ -51,9 +51,9 @@ public class NamedElementTokenizer extends Tokenizer< if (type == null || !type.equalsIgnoreCase(identifier)) { myIdentifierTokenizer.tokenize(psiIdentifier, consumer); } - if (psiType != null) { - myTypeTokenizer.tokenize(psiType, consumer); - } + //if (psiType != null) { + // myTypeTokenizer.tokenize(psiType, consumer); + //} } } diff --git a/plugins/java-i18n/testData/inspections/spellchecker/TypoInJava.java b/plugins/java-i18n/testData/inspections/spellchecker/TypoInJava.java index afbbd50ff1df..ba4e3ea8e95d 100644 --- a/plugins/java-i18n/testData/inspections/spellchecker/TypoInJava.java +++ b/plugins/java-i18n/testData/inspections/spellchecker/TypoInJava.java @@ -1,18 +1,18 @@ class GenericTestt { - public void a( GenTestt obj ) { + public void a( GenTestt obj ) { } - public void b( AnotherGenTestt obj ) { + public void b( AnotherGenTestt obj ) { } - public void c( Predicatte obj ) { + public void c( Predicatte obj ) { } - public void d( AnotherPredicatte obj ) { + public void d( AnotherPredicatte obj ) { } diff --git a/plugins/java-i18n/testData/inspections/spellchecker/VarArg.java b/plugins/java-i18n/testData/inspections/spellchecker/VarArg.java index cbee5adaf81e..0d2e48e1b8b9 100644 --- a/plugins/java-i18n/testData/inspections/spellchecker/VarArg.java +++ b/plugins/java-i18n/testData/inspections/spellchecker/VarArg.java @@ -3,7 +3,7 @@ class VarArgTest { public void a(Test first, Test... rest){ } - public void b(Testt first, Testt... rest){ + public void b(Testt first, Testt... rest){ } public class Test {