// Copyright 2000-2019 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
package com.intellij.model.psi;

import com.intellij.psi.PsiElement;
import org.jetbrains.annotations.NotNull;

import java.util.Collection;

/**
 * Register the implementation of this interface at {@code com.intellij.psi.declarationProvider} extension point
 * to provide symbol declarations by PsiElement.
 *
 * @see PsiSymbolDeclaration
 */
public interface PsiSymbolDeclarationProvider {

  /**
   * @param element PsiElement in the code which might represent some declaration
   */
  @NotNull
  Collection<? extends PsiSymbolDeclaration> getDeclarations(@NotNull PsiElement element, int offsetInElement);
}

@@ -17,10 +17,10 @@
 0-20
-19
+20
  Jet
@@ -553,16 +553,24 @@
 element 
+        
 PsiEleme
@@ -623,16 +623,512 @@
 aration%0A
+   * @param offsetInElement offset relative to the %7B@code element%7D, which should be inside%0A   *                        %7B@linkplain PsiSymbolDeclaration#getDeclarationRange ranges of returned declarations%7D,%0A   *                        or %7B@code -1%7D if all declarations are requested.%0A   *                        The offset serves as a hint to avoid computing declarations, which cannot contain the offset.%0A   *                        The platform filters returned declarations by the offset later%0A
    */%0A  

document `offsetInElement` in `PsiSymbolDeclarationProvider`