@Nullable public static String getInspectionIdSuppressedInAnnotationAttribute(PsiElement element) { if (element instanceof PsiLiteralExpression) { final Object value = ((PsiLiteralExpression)element).getValue(); if (value instanceof String) { return (String)value; } } else if (element instanceof PsiReferenceExpression) { final PsiElement psiElement = ((PsiReferenceExpression)element).resolve(); if (psiElement instanceof PsiVariableEx) { final Object val = ((PsiVariableEx)psiElement).computeConstantValue(new THashSet<PsiVariable>()); if (val instanceof String) { return (String)val; } } } return null; }
@Nullable public static String getInspectionIdSuppressedInAnnotationAttribute(PsiElement element) { if (element instanceof PsiLiteralExpression) { final Object value = ((PsiLiteralExpression)element).getValue(); if (value instanceof String) { return (String)value; } } else if (element instanceof PsiReferenceExpression) { final PsiElement psiElement = ((PsiReferenceExpression)element).resolve(); if (psiElement instanceof PsiVariableEx) { final Object val = ((PsiVariableEx)psiElement).computeConstantValue(new HashSet<PsiVariable>()); if (val instanceof String) { return (String)val; } } } return null; }