[Pydev-code] How to know when code-folding is applied the first time an editor is opened?
Brought to you by:
fabioz
From: Andreas P. <an...@fr...> - 2015-04-10 09:44:05
|
Hi, I've tried to add a new option for code-folding that allows PyDev to automatically fold comments when initially opening the editor. We'd like to have that in our IDE for the Python scripts. Unfortunately just passing isCollapsed=true to ProjectAnnotation when a corresponding preference is enabled means that the comments are also collapsed whenever the user saves the file. Thats undesirable and I'm currently wondering what the best way would be to tell the CodeFoldingSetter class wether it should apply the initially-collapsed setting or not when setting up the annotations? I guess one option would be to avoid re-creating the annotations, so that the editor framework would take care of that, but I'm not sure how to go about that either - could I compare the ASTEntry's that the annotations keep? Would they be equal or have some comparable properties between runs? Andreas -- Andreas Pakulat sq...@fr... froglogic GmbH - Automated UI and Web Testing |