[Pydev-code] Problems with syntax colorizing
Brought to you by:
fabioz
From: Don T. <nos...@gm...> - 2006-05-15 20:44:37
|
Fabio: I am having a strange problem with syntax coloring in a Jython file. My Pydev extension under development allows you to rewrap comments in Python/Jython files. It is mostly working except for one strange case: I ask it to wrap the first paragraph in the following docstring: class TextWrapper: """ Object for wrapping/filling text. The public interface consists of the wrap() and fill() methods; the other methods are just there for subclasses to override in order to tweak the default behaviour. If you want to completely replace the main wrapping algorithm, you'll probably have to override _wrap_chunks(). Several instance attributes control various aspects of wrapping: width (default: 70) the maximum width of wrapped lines (unless break_long_words is false) <stuff deleted> Break words longer than 'width'. If false, those words will not be broken, and some lines might be longer than 'width'. """ whitespace_trans = string.maketrans(_whitespace, ' ' * len(_whitespace)) unicode_whitespace_trans = {} uspace = ord(u' ') and the text is wrapped fine except that the code that follows is now colored as if it were a string too. However, if I save the file as it now is and re-open it then it comes back colored the way it should be (and it runs OK). Also, if I hit ctrl-Z after a paragraph wrap then the text is restored to its original state, Eclipse thinks that the file is the same as its original state (no * on the tab) but the code is still colored as if it were part of the docstring. This text is part of a largish (>500 line) file and I have not been able to reproduce this problem in a small file. I have put a copy of the file on: http://pilger.googlepages.com/pydevstuff Don. |