void (@NotNull DataContext dataContext) { final PsiElement element = CommonDataKeys.PSI_ELEMENT.getData(dataContext); final String fqn; if (element != null) { fqn = CopyReferenceAction.elementToFqn(element); } else { AbstractTestProxy selectedTest = getSelectedTest(); fqn = selectedTest != null ? selectedTest.getLocationUrl() : null; } CopyPasteManager.getInstance().setContents(new StringSelection(fqn)); }