mirror of
https://gitflic.ru/project/openide/openide.git
synced 2025-12-15 11:53:49 +07:00
changed the policy of defining long blocks
This commit is contained in:
@@ -155,8 +155,7 @@ public class PythonFoldingBuilder extends CustomFoldingBuilder implements DumbAw
|
||||
}
|
||||
PsiElement element = statementList.getPsi();
|
||||
if (element instanceof PyStatementList) {
|
||||
PyStatementList statements = (PyStatementList)element;
|
||||
return statements.getStatements().length > 1;
|
||||
return StringUtil.countNewLines(element.getText()) > 0;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -28,10 +28,10 @@ while True:<fold text='...'>
|
||||
|
||||
f = open('1.txt')
|
||||
ints = []
|
||||
try:
|
||||
try:<fold text='...'>
|
||||
for line in f:<fold text='...'>
|
||||
ints.append(int(line))
|
||||
ints.append(int(line))</fold>
|
||||
ints.append(int(line))</fold></fold>
|
||||
|
||||
except ValueError:<fold text='...'>
|
||||
print('')
|
||||
|
||||
@@ -16,10 +16,10 @@ class ImportantClass(object):<fold text='...'>
|
||||
|
||||
<fold text='VeryImportant'>#region VeryImportant
|
||||
def importantFunction():<fold text='...'>
|
||||
if (x > 0):
|
||||
if (x > 0):<fold text='...'>
|
||||
<fold text='Body'>#region Body
|
||||
print "abc"
|
||||
#endregion</fold>
|
||||
#endregion</fold></fold>
|
||||
return</fold>
|
||||
pass
|
||||
#endregion</fold>
|
||||
Reference in New Issue
Block a user