mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
Show names in structure view for unresolved base classes (PY-3731)
This commit is contained in:
@@ -175,10 +175,10 @@ public class PyStructureViewElement implements StructureViewTreeElement {
|
||||
else if (myElement instanceof PyClass && myElement.isValid()) {
|
||||
PyClass c = (PyClass) myElement;
|
||||
StringBuilder result = new StringBuilder(notNullize(c.getName(), unnamed));
|
||||
PyClass[] superClasses = c.getSuperClasses();
|
||||
if (superClasses.length > 0) {
|
||||
PyExpression[] superClassExpressions = c.getSuperClassExpressions();
|
||||
if (superClassExpressions.length > 0) {
|
||||
result.append("(");
|
||||
result.append(join(Arrays.asList(c.getSuperClassExpressions()), new Function<PyExpression, String>() {
|
||||
result.append(join(Arrays.asList(superClassExpressions), new Function<PyExpression, String>() {
|
||||
public String fun(PyExpression expr) {
|
||||
String name = expr.getText();
|
||||
return notNullize(name, unnamed);
|
||||
|
||||
@@ -21,3 +21,7 @@ class D2(C):
|
||||
# PY-3714
|
||||
class D3(lib1.C):
|
||||
pass
|
||||
|
||||
# PY-3731
|
||||
class D4(foo.bar.C):
|
||||
pass
|
||||
@@ -23,7 +23,8 @@ public class PyStructureViewTest extends PyLightFixtureTestCase {
|
||||
" C(B1, B2)\n" +
|
||||
" D1(C)\n" +
|
||||
" D2(C)\n" +
|
||||
" D3(lib1.C)\n");
|
||||
" D3(lib1.C)\n" +
|
||||
" D4(foo.bar.C)\n");
|
||||
}
|
||||
|
||||
public void testAttributes() { // PY-3371
|
||||
|
||||
Reference in New Issue
Block a user