AbstractUrl (Object element, final Project project) { if (element instanceof SmartPsiElementPointer) { element = ((SmartPsiElementPointer<?>)element).getElement(); } for (FavoriteNodeProvider nodeProvider : FavoriteNodeProvider.EP_NAME.getExtensions(project)) { String url = nodeProvider.getElementUrl(element); if (url != null) { return new AbstractUrlFavoriteAdapter(url, nodeProvider.getElementModuleName(element), nodeProvider); } } for (AbstractUrl urlProvider : ourAbstractUrlProviders) { AbstractUrl url = urlProvider.createUrlByElement(element); if (url != null) return url; } return null; }