mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
Added class back to the location string of a function (PY-14205)
This commit is contained in:
@@ -270,6 +270,16 @@ public class PyFunctionImpl extends PyBaseElementImpl<PyFunctionStub> implements
|
||||
public String getPresentableText() {
|
||||
return notNullize(getName(), PyNames.UNNAMED_ELEMENT) + getParameterList().getPresentableText(true);
|
||||
}
|
||||
|
||||
@Nullable
|
||||
@Override
|
||||
public String getLocationString() {
|
||||
final PyClass containingClass = getContainingClass();
|
||||
if (containingClass != null) {
|
||||
return "(" + containingClass.getName() + " in " + getPackageForFile(getContainingFile()) + ")";
|
||||
}
|
||||
return super.getLocationString();
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
+3
-3
@@ -1,8 +1,8 @@
|
||||
<node text="A.__init__(self) (hierarchy.call.Static.Constructor.main)" base="true">
|
||||
<node text="A.__init__(self) (A in hierarchy.call.Static.Constructor.main)" base="true">
|
||||
<node text="invoke1(p) (hierarchy.call.Static.Constructor.main)">
|
||||
<node text="A.method1(self) (hierarchy.call.Static.Constructor.main)"/>
|
||||
<node text="A.method1(self) (A in hierarchy.call.Static.Constructor.main)"/>
|
||||
</node>
|
||||
<node text="invoke2(p) (hierarchy.call.Static.Constructor.main)">
|
||||
<node text="A.method2(self) (hierarchy.call.Static.Constructor.main)"/>
|
||||
<node text="A.method2(self) (A in hierarchy.call.Static.Constructor.main)"/>
|
||||
</node>
|
||||
</node>
|
||||
+3
-3
@@ -1,6 +1,6 @@
|
||||
<node text="A.__init__(self) (hierarchy.call.Static.Constructor.main)" base="true">
|
||||
<node text="A.__init__(self) (A in hierarchy.call.Static.Constructor.main)" base="true">
|
||||
<node text="invokeA() (hierarchy.call.Static.Constructor.main)">
|
||||
<node text="C.bar(self) (hierarchy.call.Static.Constructor.main)"/>
|
||||
<node text="C.bar(self) (C in hierarchy.call.Static.Constructor.main)"/>
|
||||
</node>
|
||||
<node text="C.bar(self) (hierarchy.call.Static.Constructor.main)"/>
|
||||
<node text="C.bar(self) (C in hierarchy.call.Static.Constructor.main)"/>
|
||||
</node>
|
||||
+1
-1
@@ -1 +1 @@
|
||||
<node text="A.target_func(self) (hierarchy.call.Static.Inheritance.main)" base="true"/>
|
||||
<node text="A.target_func(self) (A in hierarchy.call.Static.Inheritance.main)" base="true"/>
|
||||
+2
-2
@@ -1,4 +1,4 @@
|
||||
<node text="A.target_func(self) (hierarchy.call.Static.Inheritance.main)" base="true">
|
||||
<node text="C.func(self, a) (hierarchy.call.Static.Inheritance.main)"/>
|
||||
<node text="A.target_func(self) (A in hierarchy.call.Static.Inheritance.main)" base="true">
|
||||
<node text="C.func(self, a) (C in hierarchy.call.Static.Inheritance.main)"/>
|
||||
<node text="foo2(b) (hierarchy.call.Static.Inheritance.main)"/>
|
||||
</node>
|
||||
+2
-2
@@ -1,3 +1,3 @@
|
||||
<node text="B.target_func(self, p) (hierarchy.call.Static.OverriddenMethod.main)" base="true">
|
||||
<node text="A.another_func(self) (hierarchy.call.Static.OverriddenMethod.file_1)"/>
|
||||
<node text="B.target_func(self, p) (B in hierarchy.call.Static.OverriddenMethod.main)" base="true">
|
||||
<node text="A.another_func(self) (A in hierarchy.call.Static.OverriddenMethod.file_1)"/>
|
||||
</node>
|
||||
+3
-3
@@ -1,5 +1,5 @@
|
||||
<node text="B.target_func(self, p) (hierarchy.call.Static.OverriddenMethod.main)" base="true">
|
||||
<node text="C.func1(self, a) (hierarchy.call.Static.OverriddenMethod.main)"/>
|
||||
<node text="B.target_func(self, p) (B in hierarchy.call.Static.OverriddenMethod.main)" base="true">
|
||||
<node text="C.func1(self, a) (C in hierarchy.call.Static.OverriddenMethod.main)"/>
|
||||
<node text="bar1(a) (hierarchy.call.Static.OverriddenMethod.main)"/>
|
||||
<node text="C.func2(self) (hierarchy.call.Static.OverriddenMethod.main)"/>
|
||||
<node text="C.func2(self) (C in hierarchy.call.Static.OverriddenMethod.main)"/>
|
||||
</node>
|
||||
Reference in New Issue
Block a user