@Override
  public @Nullable RefactoringElementListener getListener(final PsiElement psiElement) {
    if (!(psiElement instanceof PsiClass)) return null;
    final String oldName = ((PsiClass)psiElement).getQualifiedName();
    if (oldName == null) return null;
    final EntryPointsManagerBase entryPointsManager = EntryPointsManagerBase.getInstance(psiElement.getProject());
    return new UndoRefactoringElementAdapter() {
      @Override
      protected void refactored(@NotNull PsiElement element, @Nullable String oldQualifiedName) {
        if (element instanceof PsiClass) {
          final String newQualifiedName = ((PsiClass)element).getQualifiedName();
          if (newQualifiedName != null) {
            final int idx = entryPointsManager.ADDITIONAL_ANNOTATIONS.indexOf(oldQualifiedName != null ? newQualifiedName : oldName);
            if (idx > -1) {
              entryPointsManager.ADDITIONAL_ANNOTATIONS.remove(idx);
              entryPointsManager.ADDITIONAL_ANNOTATIONS.add(idx, oldQualifiedName != null ? oldQualifiedName : newQualifiedName);
            }
          }
        }
      }
    };
  }
@Override
  public @Nullable RefactoringElementListener getListener(final PsiElement psiElement)