boolean (@NotNull Project project, @NotNull PsiFile file, @NotNull PsiElement startElement, @NotNull PsiElement endElement) { final PsiDirectory myDirectory = (PsiDirectory)startElement; long current = System.currentTimeMillis(); if (ApplicationManager.getApplication().isUnitTestMode() || current - myIsAvailableTimeStamp > REFRESH_INTERVAL) { myIsAvailable &= myDirectory.getVirtualFile().findChild(myNewFileName) == null; myIsAvailableTimeStamp = current; } return myIsAvailable; }