void () { Content selectedContent = UsageViewContentManager.getInstance(myProject).getSelectedContent(true); JComponent component = selectedContent == null ? null : selectedContent.getComponent(); FindInProjectManager findInProjectManager = FindInProjectManager.getInstance(myProject); findInProjectManager.findInProject(DataManager.getInstance().getDataContext(component), myFindModel); }