boolean (@NotNull PsiElement element) { if (!(element instanceof GrLiteral expression)) { return false; } final PsiType type = expression.getType(); if (type == null) { return false; } if (!PsiTypes.intType().equals(type) && !PsiTypes.longType().equals(type) && !type.equalsToText("java.lang.Integer") && !type.equalsToText("java.lang.Long")) { return false; } @NonNls final String text = expression.getText().replaceAll("_", ""); if (text.length() < 2 || "0L".equals(text) || "0l".equals(text)) { return false; } return text.charAt(0) == '0'; }