From c91c59322ff4b3a4944b4762ec18561b27eea510 Mon Sep 17 00:00:00 2001 From: peter Date: Fri, 22 Nov 2013 19:57:54 +0100 Subject: [PATCH] allow only string and int literals to have provided references in java --- .../psi/impl/source/tree/java/PsiLiteralExpressionImpl.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/java/java-psi-impl/src/com/intellij/psi/impl/source/tree/java/PsiLiteralExpressionImpl.java b/java/java-psi-impl/src/com/intellij/psi/impl/source/tree/java/PsiLiteralExpressionImpl.java index d14c08ed1b6d..cf099fb33304 100644 --- a/java/java-psi-impl/src/com/intellij/psi/impl/source/tree/java/PsiLiteralExpressionImpl.java +++ b/java/java-psi-impl/src/com/intellij/psi/impl/source/tree/java/PsiLiteralExpressionImpl.java @@ -382,7 +382,10 @@ public class PsiLiteralExpressionImpl @Override @NotNull public PsiReference[] getReferences() { - if (textMatches(PsiKeyword.NULL)) return PsiReference.EMPTY_ARRAY; + IElementType type = getLiteralElementType(); + if (type != JavaTokenType.STRING_LITERAL && type != JavaTokenType.INTEGER_LITERAL) { + return PsiReference.EMPTY_ARRAY; // there are references in int literals in SQL API parameters + } return PsiReferenceService.getService().getContributedReferences(this); }