import static java.util.Collections.emptyList;
/**
- * Allows to provide a language-specific breadcrumbs,
- * i.e. path to the file root from a selected PSI element.
+ * Allows providing language-specific breadcrumbs, i.e. path to the file root from a selected PSI element.
*/
public interface BreadcrumbsProvider {
ExtensionPointName<BreadcrumbsProvider> EP_NAME = ExtensionPointName.create("com.intellij.breadcrumbsInfoProvider");
/**
- * @return an array of languages supported by this provider
+ * @return array of languages supported by this provider
*/
Language[] getLanguages();
/**
* @param element that represents a single crumb
- * @return {@code true} if the specified element is supported by this provider
+ * @return {@code true} if this provider supports the specified element
*/
boolean acceptElement(@NotNull PsiElement element);
/**
+ * Determines the text for a single crumb from the provided element.
+ *
* @param element that represents a single crumb
- * @return a text for the specified element
+ * @return text for the crumb
*/
@NotNull
@NlsSafe String getElementInfo(@NotNull PsiElement element);
/**
* @param element that represents a single crumb
- * @return an icon for the specified element
+ * @return icon for the crumb
*/
@Nullable
default Icon getElementIcon(@NotNull PsiElement element) {
/**
* @param element that represents a single crumb
- * @return a description for the specified element
+ * @return description for the crumb
*/
@Nullable
default @NlsSafe String getElementTooltip(@NotNull PsiElement element) {
/**
* @param element that represents a single crumb
- * @return an element that represents a parent crumb, or {@code null}
+ * @return element that represents a parent crumb, or {@code null}
*/
@Nullable
default PsiElement getParent(@NotNull PsiElement element) {
* Reserved for future releases. Not supported yet.
*
* @param element that represents a single crumb
- * @return a list of elements to navigate
+ * @return list of elements to navigate
*/
@NotNull
default List<PsiElement> getChildren(@NotNull PsiElement element) {
/**
* @param element that represents a single crumb
- * @return a list of actions for context menu
+ * @return list of actions for the context menu
*/
@NotNull
default List<? extends Action> getContextActions(@NotNull PsiElement element) {