EmEditor (text editor) Forum Index
   Questions and Answers about Plug-ins
     Folding w/ Outline + Python
Register To Post

Threaded | Newest First Previous Topic | Next Topic | Bottom
Poster Thread
MattG
Posted on: 6/8/2010 3:22 am
Just popping in
Joined: 5/11/2010
From: Mainz / Germany
Posts: 12
Folding w/ Outline + Python
Hi!

Well I use 10 RC13 at the moment, and couldnt check if it is a V10-Bug.

Following Problem.

Code Folding with Python, with following example

def HelloWorld():
print "Hello World"

In this case I can fold "correctly" the whole function at
"def HelloWorld():"

But if I the allowed """ comment after the def

def HelloWorld():
""" Just a test """
print "hello World"

the def isnt foldable anymore only all statements on its own, so it is not possible to fold the whole function anymore.

cheers
Matthias
Yutaka
Posted on: 6/8/2010 10:07 am
Webmaster
Joined: 9/28/2006
From: Redmond
Posts: 2399
Re: Folding w/ Outline + Python
Hello Matthias,

Thank you for using EmEditor Professional!

How do you specify Outline settings for Python? Please check the Properties of Outline plug-in.


----------------
Yutaka Emura
Developer of EmEditor
http://www.emeditor.com/

MattG
Posted on: 6/8/2010 9:25 pm
Just popping in
Joined: 5/11/2010
From: Mainz / Germany
Posts: 12
Re: Folding w/ Outline + Python
Hi!

Used your delivered default, sure "colapse comments" is on.
If it is turned off, what is not an option for me,
The handling is correct

Simply try it by yourself :)

As an example:
- - - - - -

def HelloWorld():
	print "Hello World!"

def dummy2():
	print "fubar1"
	if foo == oof:
		""" That some Test 
		"""
		print "fubar2"
		print "fold1"
		# Just another comment
		# and another
		
if __name__=="__main__":
    HelloWorld()

- - - - - - -

If you turn "Make comments collapsible" off
you can fold the indented stuff correctly
- - - - - -

[+] def HelloWorld():[...]

[-] def dummy2():
 |	print "fubar1"
[+]	if foo == oof:[...]
		
[+] if __name__=="__main__":[...]

- - - - - - --
If you turn "Make comments collapsible" on you get the following

[+] def HelloWorld():[...]

[-] def dummy2():
 |	print "fubar1"
 |	if foo == oof:
[-]		""" That some Test 
 |		"""
 |		print "fubar2"
 |		print "fold1"
[-]		# Just another comment
 |		# and another
		
[+] if __name__=="__main__":[...]

- - - - - -
Worse!

By the way it doesnt matter if you use the allowed """-Comment or # after the if, to be correct after the first indentation.

In case you have a long procedure with comments you cant fold in an intelligent way anymore

Well... in the meantime till there is an solution I'll have to use my Eclipse.

cheers
Matthias
Yutaka
Posted on: 6/9/2010 6:50 pm
Webmaster
Joined: 9/28/2006
From: Redmond
Posts: 2399
Re: Folding w/ Outline + Python
Hello Matthias,

I reproduced your issue, and I will try to fix this issue.
Thanks!


----------------
Yutaka Emura
Developer of EmEditor
http://www.emeditor.com/

Threaded | Newest First Previous Topic | Next Topic | Top


Register To Post
 
English čeština Deutsch español français italiano 日本語 한국어 Русский 简体中文 繁體中文