This commit is contained in:
Alexey Kudravtsev
2014-08-11 16:09:41 +04:00
parent 6c42dbeef2
commit fd7022c125
7 changed files with 15 additions and 11 deletions
@@ -25,6 +25,7 @@ import com.intellij.psi.tree.IElementType;
import org.jetbrains.annotations.NotNull;
import java.lang.reflect.Field;
import java.util.Locale;
public class PsiKeywordImpl extends LeafPsiElement implements PsiKeyword, PsiJavaToken {
public PsiKeywordImpl(@NotNull IElementType type, CharSequence text) {
@@ -52,7 +53,7 @@ public class PsiKeywordImpl extends LeafPsiElement implements PsiKeyword, PsiJav
static {
for(Field field: PsiKeyword.class.getFields()) {
CharTableImpl.staticIntern(field.getName().toLowerCase());
CharTableImpl.staticIntern(field.getName().toLowerCase(Locale.ENGLISH));
}
}
}
@@ -31,6 +31,8 @@ import org.jetbrains.annotations.NonNls;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import java.util.Locale;
public class PsiLiteralExpressionImpl
extends ExpressionPsiElement
implements PsiLiteralExpression, PsiLanguageInjectionHost, ContributedReferenceHost {
@@ -93,7 +95,7 @@ public class PsiLiteralExpressionImpl
@Override
public Object getValue() {
final IElementType type = getLiteralElementType();
String text = NUMERIC_LITERALS.contains(type) ? getCanonicalText().toLowerCase() : getCanonicalText();
String text = NUMERIC_LITERALS.contains(type) ? getCanonicalText().toLowerCase(Locale.ENGLISH) : getCanonicalText();
final int textLength = text.length();
if (type == JavaTokenType.INTEGER_LITERAL) {
@@ -717,6 +717,7 @@ public abstract class VirtualFile extends UserDataHolderBase implements Modifica
putUserData(BOM_KEY, BOM);
}
@Override
@NonNls
public String toString() {
return "VirtualFile: " + getPresentableUrl();
@@ -1,5 +1,5 @@
/*
* Copyright 2000-2009 JetBrains s.r.o.
* Copyright 2000-2014 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -28,7 +28,7 @@ public interface EditorMarkupModel extends MarkupModel {
void setErrorStripeVisible(boolean val);
void setErrorStripeRenderer(ErrorStripeRenderer renderer);
void setErrorStripeRenderer(@NotNull ErrorStripeRenderer renderer);
ErrorStripeRenderer getErrorStripeRenderer();
void addErrorMarkerListener(@NotNull ErrorStripeListener listener, @NotNull Disposable parent);
@@ -368,7 +368,7 @@ public class EditorMarkupModelImpl extends MarkupModelImpl implements EditorMark
}
@Override
public void setErrorStripeRenderer(ErrorStripeRenderer renderer) {
public void setErrorStripeRenderer(@NotNull ErrorStripeRenderer renderer) {
assertIsDispatchThread();
if (myErrorStripeRenderer instanceof Disposable) {
Disposer.dispose((Disposable)myErrorStripeRenderer);
@@ -1636,7 +1636,7 @@ public class FileEditorManagerImpl extends FileEditorManagerEx implements Projec
*/
private final class MyVirtualFileListener extends VirtualFileAdapter {
@Override
public void beforeFileDeletion(VirtualFileEvent e) {
public void beforeFileDeletion(@NotNull VirtualFileEvent e) {
assertDispatchThread();
boolean moveFocus = moveFocusOnDelete();
@@ -1651,7 +1651,7 @@ public class FileEditorManagerImpl extends FileEditorManagerEx implements Projec
}
@Override
public void propertyChanged(VirtualFilePropertyEvent e) {
public void propertyChanged(@NotNull VirtualFilePropertyEvent e) {
if (VirtualFile.PROP_NAME.equals(e.getPropertyName())) {
assertDispatchThread();
final VirtualFile file = e.getFile();
@@ -1681,7 +1681,7 @@ public class FileEditorManagerImpl extends FileEditorManagerEx implements Projec
}
@Override
public void fileMoved(VirtualFileMoveEvent e) {
public void fileMoved(@NotNull VirtualFileMoveEvent e) {
final VirtualFile file = e.getFile();
final VirtualFile[] openFiles = getOpenFiles();
for (final VirtualFile openFile : openFiles) {
@@ -1,5 +1,5 @@
/*
* Copyright 2000-2013 JetBrains s.r.o.
* Copyright 2000-2014 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -123,7 +123,7 @@ public class StringSearcher {
}
}
int step = 0 <= lastChar && lastChar < 128 ? mySearchTable[lastChar] : 1;
int step = lastChar < 128 ? mySearchTable[lastChar] : 1;
if (step <= 0) {
int index;
@@ -160,7 +160,7 @@ public class StringSearcher {
if (i < 0) return end - start - myPatternLength + 1;
}
int step = 0 <= lastChar && lastChar < 128 ? mySearchTable[lastChar] : 1;
int step = lastChar < 128 ? mySearchTable[lastChar] : 1;
if (step <= 0) {
int index;