From 37f420c1506207c55639f393bac551ce8aec77c9 Mon Sep 17 00:00:00 2001 From: Dmitry Avdeev Date: Tue, 24 Jan 2012 12:22:20 +0400 Subject: [PATCH] typo --- .../lang/cacheBuilder/DefaultWordsScanner.java | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/platform/lang-api/src/com/intellij/lang/cacheBuilder/DefaultWordsScanner.java b/platform/lang-api/src/com/intellij/lang/cacheBuilder/DefaultWordsScanner.java index 3c87dda6701c..8f777e4864c9 100644 --- a/platform/lang-api/src/com/intellij/lang/cacheBuilder/DefaultWordsScanner.java +++ b/platform/lang-api/src/com/intellij/lang/cacheBuilder/DefaultWordsScanner.java @@ -51,29 +51,29 @@ public class DefaultWordsScanner implements WordsScanner { public void processWords(CharSequence fileText, Processor 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(); }