diff --git a/plugins/textmate/src/org/jetbrains/plugins/textmate/language/syntax/lexer/TextMateLexerDataStorage.java b/plugins/textmate/src/org/jetbrains/plugins/textmate/language/syntax/lexer/TextMateLexerDataStorage.java index f1398111ed62..b8b417ac9a4f 100644 --- a/plugins/textmate/src/org/jetbrains/plugins/textmate/language/syntax/lexer/TextMateLexerDataStorage.java +++ b/plugins/textmate/src/org/jetbrains/plugins/textmate/language/syntax/lexer/TextMateLexerDataStorage.java @@ -10,38 +10,38 @@ import org.jetbrains.annotations.NotNull; import java.util.List; public class TextMateLexerDataStorage extends ShortBasedStorage { - private final TObjectIntHashMap tokenTypesMap; + private final TObjectIntHashMap tokenTypeMap; private final List tokenTypes; public TextMateLexerDataStorage() { this(new TObjectIntHashMap<>(), new SmartList<>()); } - private TextMateLexerDataStorage(@NotNull TObjectIntHashMap tokenTypesMap, + private TextMateLexerDataStorage(@NotNull TObjectIntHashMap tokenTypeMap, @NotNull List tokenTypes) { super(); - this.tokenTypesMap = tokenTypesMap; + this.tokenTypeMap = tokenTypeMap; this.tokenTypes = tokenTypes; } private TextMateLexerDataStorage(@NotNull short[] data, - @NotNull TObjectIntHashMap tokenTypesMap, + @NotNull TObjectIntHashMap tokenTypeMap, @NotNull List tokenTypes) { super(data); - this.tokenTypesMap = tokenTypesMap; + this.tokenTypeMap = tokenTypeMap; this.tokenTypes = tokenTypes; } @Override public int packData(IElementType tokenType, int state, boolean isRestartableState) { if (tokenType instanceof TextMateElementType) { - synchronized (tokenTypesMap) { - if (tokenTypesMap.contains(tokenType)) { - return tokenTypesMap.get((TextMateElementType)tokenType); + synchronized (tokenTypeMap) { + if (tokenTypeMap.contains(tokenType)) { + return tokenTypeMap.get((TextMateElementType)tokenType); } int data = tokenTypes.size() + 1; tokenTypes.add((TextMateElementType)tokenType); - tokenTypesMap.put((TextMateElementType)tokenType, data); + tokenTypeMap.put((TextMateElementType)tokenType, data); return isRestartableState ? data : -data; } } @@ -55,11 +55,11 @@ public class TextMateLexerDataStorage extends ShortBasedStorage { @Override public DataStorage copy() { - return new TextMateLexerDataStorage(myData, tokenTypesMap, tokenTypes); + return new TextMateLexerDataStorage(myData, tokenTypeMap, tokenTypes); } @Override public DataStorage createStorage() { - return new TextMateLexerDataStorage(tokenTypesMap, tokenTypes); + return new TextMateLexerDataStorage(tokenTypeMap, tokenTypes); } }