allow only string and int literals to have provided references in java

This commit is contained in:
peter
2013-11-22 19:57:54 +01:00
parent 85af401462
commit c91c59322f
@@ -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);
}