@SuppressWarnings("unchecked")
  static <T extends PsiQualifiedExpression> T createQualifiedExpression(@NotNull PsiManager manager,
                                                                        PsiClass qualifierClass,
                                                                        @NotNull String qName) throws IncorrectOperationException {
     PsiElementFactory factory = JavaPsiFacade.getElementFactory(manager.getProject());
     if (qualifierClass != null) {
       T qualifiedThis = (T)factory.createExpressionFromText("q." + qName, qualifierClass);
       qualifiedThis = (T)CodeStyleManager.getInstance(manager.getProject()).reformat(qualifiedThis);
       PsiJavaCodeReferenceElement thisQualifier = qualifiedThis.getQualifier();
       LOG.assertTrue(thisQualifier != null);
       thisQualifier.bindToElement(qualifierClass);
       return qualifiedThis;
     }
     else {
       return (T)factory.createExpressionFromText(qName, null);
     }
   }
@SuppressWarnings("unchecked")
  static <T extends PsiQualifiedExpression> T createQualifiedExpression(@NotNull PsiManager manager,
                                                                        PsiClass qualifierClass,
                                                                        @NotNull String qName)