This commit is contained in:
Alexey Kudravtsev
2013-04-26 15:07:32 +04:00
parent aa85c4ec5f
commit 4267fafefc
4 changed files with 6 additions and 1 deletions
@@ -23,6 +23,7 @@ import java.util.List;
public interface PyClass extends PsiNameIdentifierOwner, PyStatement, NameDefiner, PyDocStringOwner, StubBasedPsiElement<PyClassStub>,
ScopeOwner, PyDecoratable, PyTypedElement {
ArrayFactory<PyClass> ARRAY_FACTORY = new ArrayFactory<PyClass>() {
@NotNull
@Override
public PyClass[] create(int count) {
return new PyClass[count];
@@ -8,6 +8,7 @@ import com.intellij.util.ArrayFactory;
import com.jetbrains.python.codeInsight.controlflow.ScopeOwner;
import com.jetbrains.python.psi.stubs.PyFunctionStub;
import com.jetbrains.python.psi.types.PyType;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
/**
@@ -22,6 +23,7 @@ extends
PyFunction[] EMPTY_ARRAY = new PyFunction[0];
ArrayFactory<PyFunction> ARRAY_FACTORY = new ArrayFactory<PyFunction>() {
@NotNull
@Override
public PyFunction[] create(int count) {
return new PyFunction[count];
@@ -75,6 +75,7 @@ public class PyFromImportStatementImpl extends PyBaseElementImpl<PyFromImportSta
final PyFromImportStatementStub stub = getStub();
if (stub != null) {
return stub.getChildrenByType(PyElementTypes.IMPORT_ELEMENT, new ArrayFactory<PyImportElement>() {
@NotNull
public PyImportElement[] create(int count) {
return new PyImportElement[count];
}
@@ -182,7 +183,7 @@ public class PyFromImportStatementImpl extends PyBaseElementImpl<PyFromImportSta
ASTNode comma = PyElementGenerator.getInstance(getProject()).createComma();
super.addInternal(comma, comma, prevNode, false);
}
return result;
}
@@ -32,6 +32,7 @@ public class PyImportStatementImpl extends PyBaseElementImpl<PyImportStatementSt
final PyImportStatementStub stub = getStub();
if (stub != null) {
return stub.getChildrenByType(PyElementTypes.IMPORT_ELEMENT, new ArrayFactory<PyImportElement>() {
@NotNull
public PyImportElement[] create(int count) {
return new PyImportElement[count];
}