pass foothold to PyCanonicalPathProvider; javadoc

This commit is contained in:
Dmitry Jemerov
2012-08-15 13:03:28 +02:00
parent 116a4e2ff5
commit 79a71c19f5
3 changed files with 14 additions and 3 deletions
@@ -1,15 +1,25 @@
package com.jetbrains.python.psi.resolve;
import com.intellij.openapi.extensions.ExtensionPointName;
import com.intellij.psi.PsiElement;
import com.jetbrains.python.psi.impl.PyQualifiedName;
import org.jetbrains.annotations.Nullable;
/**
* Allows to provide a custom qualified name when a specific symbol is going to be imported into a specific file.
*
* @author yole
*/
public interface PyCanonicalPathProvider {
ExtensionPointName<PyCanonicalPathProvider> EP_NAME = ExtensionPointName.create("Pythonid.canonicalPathProvider");
/**
* Allows to provide a custom qualified name when a specific symbol is going to be imported into a specific file.
*
* @param qName the real qualified name of the symbol being imported.
* @param foothold the location where the symbol is being imported.
* @return the qualified name to use in the import statement, or null if no replacement is necessary.
*/
@Nullable
PyQualifiedName getCanonicalPath(PyQualifiedName qName);
PyQualifiedName getCanonicalPath(PyQualifiedName qName, PsiElement foothold);
}