RerunSafeDelete(Project project, PsiElement[] elements, UsageView usageView) { myProject = project; myUsageView = usageView; myPointers = new SmartPsiElementPointer[elements.length]; for (int i = 0; i < elements.length; i++) { PsiElement element = elements[i]; myPointers[i] = SmartPointerManager.getInstance(myProject).createSmartPsiElementPointer(element); } }
private SearchData createSearchData( @NotNull List<? extends PsiElement> psiElements, final FindUsagesOptions findUsagesOptions) { SearchData data = new SearchData(); data.myElements = new SmartPsiElementPointer[psiElements.size()]; int idx = 0; for (PsiElement psiElement : psiElements) { data.myElements[idx++] = SmartPointerManager.getInstance(myProject).createSmartPsiElementPointer(psiElement); } data.myOptions = findUsagesOptions; return data; }