mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
PY-20003 Fixed: Breadcrumbs for Python files
Introduce PyBreadcrumbsInfoProvider which supports: classes and functions (incl. async) definitions, lambdas, try-except-else-finally, if-elif-else, for-else (incl. async), while-else, with and key-value statements
This commit is contained in:
committed by
Semyon Proshev
parent
f54070028a
commit
cde66f2f64
@@ -0,0 +1,3 @@
|
||||
async def foo():
|
||||
async for i in range(10):
|
||||
print(<caret>i)
|
||||
@@ -0,0 +1,8 @@
|
||||
Crumb:
|
||||
async foo()
|
||||
Tooltip:
|
||||
async foo()
|
||||
Crumb:
|
||||
async for i in …
|
||||
Tooltip:
|
||||
async for i in range(10)
|
||||
@@ -0,0 +1,3 @@
|
||||
async def foo():
|
||||
async with open("file.txt"), open("file2.txt"):
|
||||
print("a<caret>bc")
|
||||
@@ -0,0 +1,3 @@
|
||||
async def foo():
|
||||
async with open("file.txt") as f, open("file2.txt") as f2:
|
||||
print("a<caret>bc")
|
||||
@@ -0,0 +1,8 @@
|
||||
Crumb:
|
||||
async foo()
|
||||
Tooltip:
|
||||
async foo()
|
||||
Crumb:
|
||||
async with open…
|
||||
Tooltip:
|
||||
async with open("file.txt") as f, open("file2.txt") as f2
|
||||
@@ -0,0 +1,8 @@
|
||||
Crumb:
|
||||
async foo()
|
||||
Tooltip:
|
||||
async foo()
|
||||
Crumb:
|
||||
async with open…
|
||||
Tooltip:
|
||||
async with open("file.txt"), open("file2.txt")
|
||||
@@ -0,0 +1,3 @@
|
||||
async def foo():
|
||||
async with open("file.txt"):
|
||||
print("a<caret>bc")
|
||||
@@ -0,0 +1,3 @@
|
||||
async def foo():
|
||||
async with open("file.txt") as f:
|
||||
print("a<caret>bc")
|
||||
@@ -0,0 +1,8 @@
|
||||
Crumb:
|
||||
async foo()
|
||||
Tooltip:
|
||||
async foo()
|
||||
Crumb:
|
||||
async with open…
|
||||
Tooltip:
|
||||
async with open("file.txt") as f
|
||||
@@ -0,0 +1,8 @@
|
||||
Crumb:
|
||||
async foo()
|
||||
Tooltip:
|
||||
async foo()
|
||||
Crumb:
|
||||
async with open…
|
||||
Tooltip:
|
||||
async with open("file.txt")
|
||||
@@ -0,0 +1,2 @@
|
||||
class A:
|
||||
pa<caret>ss
|
||||
@@ -0,0 +1,4 @@
|
||||
Crumb:
|
||||
A
|
||||
Tooltip:
|
||||
A
|
||||
@@ -0,0 +1 @@
|
||||
a = {"abc": "d<caret>ef"}
|
||||
@@ -0,0 +1,4 @@
|
||||
Crumb:
|
||||
"abc"
|
||||
Tooltip:
|
||||
"abc"
|
||||
@@ -0,0 +1,4 @@
|
||||
if True:
|
||||
print "abc"
|
||||
elif False:
|
||||
print "d<caret>ef"
|
||||
@@ -0,0 +1,4 @@
|
||||
Crumb:
|
||||
elif False
|
||||
Tooltip:
|
||||
elif False
|
||||
@@ -0,0 +1,4 @@
|
||||
try:
|
||||
print "abc"
|
||||
except KeyError:
|
||||
print "d<caret>ef"
|
||||
@@ -0,0 +1,4 @@
|
||||
try:
|
||||
print "abc"
|
||||
except:
|
||||
print "d<caret>ef"
|
||||
@@ -0,0 +1,4 @@
|
||||
Crumb:
|
||||
except
|
||||
Tooltip:
|
||||
except
|
||||
@@ -0,0 +1,4 @@
|
||||
try:
|
||||
print "abc"
|
||||
except KeyError as e:
|
||||
print "d<caret>ef"
|
||||
@@ -0,0 +1,4 @@
|
||||
Crumb:
|
||||
except KeyError…
|
||||
Tooltip:
|
||||
except KeyError as e
|
||||
@@ -0,0 +1,4 @@
|
||||
Crumb:
|
||||
except KeyError
|
||||
Tooltip:
|
||||
except KeyError
|
||||
@@ -0,0 +1,4 @@
|
||||
try:
|
||||
print "abc"
|
||||
finally:
|
||||
print "d<caret>ef"
|
||||
@@ -0,0 +1,4 @@
|
||||
Crumb:
|
||||
finally
|
||||
Tooltip:
|
||||
finally
|
||||
@@ -0,0 +1,2 @@
|
||||
for i in range(10):
|
||||
print <caret>i
|
||||
@@ -0,0 +1,4 @@
|
||||
for i in range(10):
|
||||
print i
|
||||
else:
|
||||
print "a<caret>bc"
|
||||
@@ -0,0 +1,4 @@
|
||||
Crumb:
|
||||
else
|
||||
Tooltip:
|
||||
else
|
||||
@@ -0,0 +1,4 @@
|
||||
Crumb:
|
||||
for i in range(…
|
||||
Tooltip:
|
||||
for i in range(10)
|
||||
@@ -0,0 +1,2 @@
|
||||
def foo(self):
|
||||
pa<caret>ss
|
||||
@@ -0,0 +1,4 @@
|
||||
Crumb:
|
||||
foo()
|
||||
Tooltip:
|
||||
foo()
|
||||
@@ -0,0 +1,2 @@
|
||||
if True:
|
||||
print "a<caret>bc"
|
||||
@@ -0,0 +1,4 @@
|
||||
if True:
|
||||
print "abc"
|
||||
else:
|
||||
print "d<caret>ef"
|
||||
@@ -0,0 +1,4 @@
|
||||
Crumb:
|
||||
else
|
||||
Tooltip:
|
||||
else
|
||||
@@ -0,0 +1,4 @@
|
||||
Crumb:
|
||||
if True
|
||||
Tooltip:
|
||||
if True
|
||||
@@ -0,0 +1 @@
|
||||
map(lambda x, y: <caret>x * y, [])
|
||||
@@ -0,0 +1,4 @@
|
||||
Crumb:
|
||||
lambda (x, y)
|
||||
Tooltip:
|
||||
lambda (x, y)
|
||||
@@ -0,0 +1 @@
|
||||
map(lambda a, aa, aaa, aaaa, aaaaa, aaaaaa, aaaaaaa, aaaaaaaa, aaaaaaaaa, aaaaaaaaaa, aaaaaaaaaaa, aaaaaaaaaaaa: <caret>a * a, [])
|
||||
@@ -0,0 +1,4 @@
|
||||
Crumb:
|
||||
lambda (a, aa, …
|
||||
Tooltip:
|
||||
lambda (a, aa, aaa, aaaa, aaaaa, aaaaaa, aaaaaaa, aaaaaaaa, aaaaaaaaa, aaaaaaaaaa, aaaaaaaaaaa,…
|
||||
@@ -0,0 +1,3 @@
|
||||
class A:
|
||||
def foo(self):
|
||||
pa<caret>ss
|
||||
@@ -0,0 +1,8 @@
|
||||
Crumb:
|
||||
A
|
||||
Tooltip:
|
||||
A
|
||||
Crumb:
|
||||
foo()
|
||||
Tooltip:
|
||||
foo()
|
||||
@@ -0,0 +1,2 @@
|
||||
with open("file.txt"), open("file2.txt"):
|
||||
print("a<caret>bc")
|
||||
@@ -0,0 +1,2 @@
|
||||
with open("file.txt") as f, open("file2.txt") as f2:
|
||||
print("a<caret>bc")
|
||||
@@ -0,0 +1,4 @@
|
||||
Crumb:
|
||||
with open("file…
|
||||
Tooltip:
|
||||
with open("file.txt") as f, open("file2.txt") as f2
|
||||
@@ -0,0 +1,4 @@
|
||||
Crumb:
|
||||
with open("file…
|
||||
Tooltip:
|
||||
with open("file.txt"), open("file2.txt")
|
||||
@@ -0,0 +1,4 @@
|
||||
try:
|
||||
print "a<caret>bc"
|
||||
finally:
|
||||
print "def"
|
||||
@@ -0,0 +1,6 @@
|
||||
try:
|
||||
print "abc"
|
||||
except:
|
||||
print "def"
|
||||
else:
|
||||
print "g<caret>hi"
|
||||
@@ -0,0 +1,4 @@
|
||||
Crumb:
|
||||
else
|
||||
Tooltip:
|
||||
else
|
||||
@@ -0,0 +1,4 @@
|
||||
Crumb:
|
||||
try
|
||||
Tooltip:
|
||||
try
|
||||
@@ -0,0 +1,3 @@
|
||||
i = 10
|
||||
while i < 30:
|
||||
print <caret>i
|
||||
@@ -0,0 +1,5 @@
|
||||
i = 10
|
||||
while i < 30:
|
||||
print i
|
||||
else:
|
||||
print "a<caret>bc"
|
||||
@@ -0,0 +1,4 @@
|
||||
Crumb:
|
||||
else
|
||||
Tooltip:
|
||||
else
|
||||
@@ -0,0 +1,4 @@
|
||||
Crumb:
|
||||
while i < 30
|
||||
Tooltip:
|
||||
while i < 30
|
||||
@@ -0,0 +1,2 @@
|
||||
with open("file.txt"):
|
||||
print("a<caret>bc")
|
||||
@@ -0,0 +1,2 @@
|
||||
with open("file.txt") as f:
|
||||
print("a<caret>bc")
|
||||
@@ -0,0 +1,4 @@
|
||||
Crumb:
|
||||
with open("file…
|
||||
Tooltip:
|
||||
with open("file.txt") as f
|
||||
@@ -0,0 +1,4 @@
|
||||
Crumb:
|
||||
with open("file…
|
||||
Tooltip:
|
||||
with open("file.txt")
|
||||
Reference in New Issue
Block a user