mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
Merge remote-tracking branch 'origin/master'
This commit is contained in:
@@ -15,4 +15,6 @@ public interface PythonDialectsTokenSetContributor {
|
||||
TokenSet getKeywordTokens();
|
||||
TokenSet getParameterTokens();
|
||||
TokenSet getFunctionDeclarationTokens();
|
||||
TokenSet getUnbalancedBracesRecoveryTokens();
|
||||
TokenSet getReferenceExpressionTokens();
|
||||
}
|
||||
|
||||
@@ -0,0 +1,26 @@
|
||||
package com.jetbrains.python.inspections;
|
||||
|
||||
import com.intellij.openapi.extensions.ExtensionPointName;
|
||||
import com.intellij.psi.PsiElement;
|
||||
import com.jetbrains.python.psi.PyDocStringOwner;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author yole
|
||||
*/
|
||||
public abstract class PyInspectionExtension {
|
||||
public static final ExtensionPointName<PyInspectionExtension> EP_NAME = ExtensionPointName.create("Pythonid.inspectionExtension");
|
||||
|
||||
public boolean ignoreUnused(PsiElement local) {
|
||||
return false;
|
||||
}
|
||||
|
||||
public boolean ignoreMissingDocstring(PyDocStringOwner docStringOwner) {
|
||||
return false;
|
||||
}
|
||||
|
||||
public List<String> getFunctionParametersFromUsage(PsiElement elt) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@@ -5,10 +5,10 @@ import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
/**
|
||||
* PSI element that (re)defnies names in following namespace, e.g. as assignment statement does.
|
||||
* PSI element that (re)defines names in following namespace, e.g. as assignment statement does.
|
||||
*
|
||||
* NOTE: When declaring additional elements as name definers, please also adjust the token set via
|
||||
* {@link PythonDialectsTokenSetContributor#getNameDefinerTokens()}.
|
||||
* {@link com.jetbrains.python.PythonDialectsTokenSetContributor#getNameDefinerTokens()}.
|
||||
*
|
||||
* @author dcheryasov
|
||||
*/
|
||||
|
||||
@@ -9,7 +9,7 @@ import org.jetbrains.annotations.Nullable;
|
||||
/**
|
||||
* @author yole
|
||||
*/
|
||||
public interface PyImportElement extends PyElement, NameDefiner, StubBasedPsiElement<PyImportElementStub> {
|
||||
public interface PyImportElement extends PyElement, PyImportedNameDefiner, StubBasedPsiElement<PyImportElementStub> {
|
||||
@Nullable
|
||||
PyReferenceExpression getImportReferenceExpression();
|
||||
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
package com.jetbrains.python.psi;
|
||||
|
||||
/**
|
||||
* Name definer that defines names imported somehow from other modules.
|
||||
*
|
||||
* @author vlan
|
||||
*/
|
||||
public interface PyImportedNameDefiner extends NameDefiner {
|
||||
}
|
||||
@@ -5,5 +5,5 @@ package com.jetbrains.python.psi;
|
||||
* User: dcheryasov
|
||||
* Date: Jul 28, 2008
|
||||
*/
|
||||
public interface PyStarImportElement extends PyElement, NameDefiner {
|
||||
public interface PyStarImportElement extends PyElement, PyImportedNameDefiner {
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user