void (@NotNull final PsiElement newElement) { if (!newElement.isValid()) return; SmartPsiElementPointer<PsiElement> pointer = SmartPointerManager.getInstance(newElement.getProject()).createSmartPsiElementPointer(newElement); myRunnables.add(() -> { PsiElement element = pointer.getElement(); if (element == null) { LOG.info("Unable to restore element for: " + newElement.getClass()); return; } for (RefactoringElementListener refactoringElementListener : myListenerList) { try { refactoringElementListener.elementMoved(element); } catch (Throwable e) { LOG.error(e); } } }); }