void (Project project, Editor editor, PsiFile file, Surrounder surrounder, int[] startOffsets, int[] endOffsets, List<? extends SurroundDescriptor> surroundDescriptors) { assert ApplicationManager.getApplication().isUnitTestMode(); for (SurroundDescriptor descriptor : surroundDescriptors) { final PsiElement[] elements = getElementsToSurround(descriptor, file, startOffsets, endOffsets); if (elements.length > 0) { for (Surrounder descriptorSurrounder : descriptor.getSurrounders()) { if (surrounder.getClass().equals(descriptorSurrounder.getClass())) { doSurround(project, editor, surrounder, elements); return; } } } } }