typo
authorDmitry Avdeev <Dmitry.Avdeev@jetbrains.com>
Tue, 24 Jan 2012 08:22:20 +0000 (12:22 +0400)
committerDmitry Avdeev <Dmitry.Avdeev@jetbrains.com>
Thu, 26 Jan 2012 13:50:09 +0000 (17:50 +0400)
platform/lang-api/src/com/intellij/lang/cacheBuilder/DefaultWordsScanner.java

index 3c87dda6701c2297533ad74e470ff9e5ba2e7c14..8f777e4864c9d2f648777d0a1e095a9ee6ba0157 100644 (file)
@@ -51,29 +51,29 @@ public class DefaultWordsScanner implements WordsScanner {
 
   public void processWords(CharSequence fileText, Processor<WordOccurrence> processor) {
     myLexer.start(fileText);
-    WordOccurrence occurence = null; // shared occurence
+    WordOccurrence occurrence = null; // shared occurrence
 
     while (myLexer.getTokenType() != null) {
       final IElementType type = myLexer.getTokenType();
       if (myIdentifierTokenSet.contains(type)) {
-        if (occurence == null) {
-          occurence = new WordOccurrence(fileText, myLexer.getTokenStart(), myLexer.getTokenEnd(), WordOccurrence.Kind.CODE);
+        if (occurrence == null) {
+          occurrence = new WordOccurrence(fileText, myLexer.getTokenStart(), myLexer.getTokenEnd(), WordOccurrence.Kind.CODE);
         }
         else {
-          occurence.init(fileText, myLexer.getTokenStart(), myLexer.getTokenEnd(), WordOccurrence.Kind.CODE);
+          occurrence.init(fileText, myLexer.getTokenStart(), myLexer.getTokenEnd(), WordOccurrence.Kind.CODE);
         }
-        if (!processor.process(occurence)) return;
+        if (!processor.process(occurrence)) return;
       }
       else if (myCommentTokenSet.contains(type)) {
-        if (!stripWords(processor, fileText,myLexer.getTokenStart(),myLexer.getTokenEnd(), WordOccurrence.Kind.COMMENTS,occurence, false)) return;
+        if (!stripWords(processor, fileText,myLexer.getTokenStart(),myLexer.getTokenEnd(), WordOccurrence.Kind.COMMENTS,occurrence, false)) return;
       }
       else if (myLiteralTokenSet.contains(type)) {
-        if (!stripWords(processor, fileText, myLexer.getTokenStart(),myLexer.getTokenEnd(),WordOccurrence.Kind.LITERALS,occurence, myMayHaveFileRefsInLiterals)) return;
+        if (!stripWords(processor, fileText, myLexer.getTokenStart(),myLexer.getTokenEnd(),WordOccurrence.Kind.LITERALS,occurrence, myMayHaveFileRefsInLiterals)) return;
       }
       else {
         // process all word-like characters as words
         // Plugin writers may have (Maximka in JavaScript especially) some keyword token types omitted from the identifierTokenSet
-        if (!stripWords(processor, fileText, myLexer.getTokenStart(), myLexer.getTokenEnd(), WordOccurrence.Kind.CODE, occurence, false)) return;
+        if (!stripWords(processor, fileText, myLexer.getTokenStart(), myLexer.getTokenEnd(), WordOccurrence.Kind.CODE, occurrence, false)) return;
       }
       myLexer.advance();
     }