From f2a3b18b16e110841ddbd76986e378a41c1768fc Mon Sep 17 00:00:00 2001 From: "Maxim.Mossienko" Date: Tue, 16 Jun 2015 18:02:18 +0200 Subject: [PATCH] IDEA-141450 Incorrect typo generated by "attribute's" --- .../spellchecker/inspections/SpellCheckingInspection.java | 6 +++++- .../testData/inspection/commentsWithMistakes/SPITest1.java | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/spellchecker/src/com/intellij/spellchecker/inspections/SpellCheckingInspection.java b/spellchecker/src/com/intellij/spellchecker/inspections/SpellCheckingInspection.java index b9e722331f31..ea8abbfc4a30 100644 --- a/spellchecker/src/com/intellij/spellchecker/inspections/SpellCheckingInspection.java +++ b/spellchecker/src/com/intellij/spellchecker/inspections/SpellCheckingInspection.java @@ -257,7 +257,11 @@ public class SpellCheckingInspection extends LocalInspectionTool { @Override public void consume(TextRange textRange) { - final String word = textRange.substring(myText); + String word = textRange.substring(myText); + int aposIndex = word.indexOf('\''); + if (aposIndex != -1) { + word = word.substring(0, aposIndex); // IdentifierSplitter.WORD leaves ' + } if (myHolder.isOnTheFly() && myAlreadyChecked.contains(word)) { return; } diff --git a/spellchecker/testData/inspection/commentsWithMistakes/SPITest1.java b/spellchecker/testData/inspection/commentsWithMistakes/SPITest1.java index 2b4d1c9cc593..ca6d032428e6 100644 --- a/spellchecker/testData/inspection/commentsWithMistakes/SPITest1.java +++ b/spellchecker/testData/inspection/commentsWithMistakes/SPITest1.java @@ -17,7 +17,7 @@ package testData.inspection.commentsWithMistakes.data.java.src; /* @author shkate@jetbrains.com -
  • some context
  • +
  • some context
  • attribute's */ class SPITest1 { /* boolean is Java keyword