String (final PsiElement element, final String name) { if (element instanceof NavigationItem) { final ItemPresentation presentation = ((NavigationItem)element).getPresentation(); if (presentation != null) { return presentation.getLocationString(); } } return null; }