Thread: [Pydev-code] Code Folding
Brought to you by:
fabioz
From: Fabio Z. <fa...@es...> - 2004-07-19 18:06:04
|
Hi All, I'm adding some code-folding capabilities to our plugin... It's still not complete... but it should be until tomorrow... (I've already commited most of it, so, it's already usable) There's only one bug I think I'll be unable to correct... If some class / method ends with a comment, I'm unable to get the correct code folding for it (since our model doesn't get comments parsed) I've added 'pass' and Str Tokens to our model, so that I could make it work correctly with them... If someone has some problem in code-folding or some idea on how to implement it to work correctly with comments... I'm accepting suggestions... []s Fabio |
From: Aleks T. <a...@to...> - 2004-07-19 19:14:24
|
Neat. I've just checked it out, it works well. I've thought of adding code folding to 3.0 port. I have one small request: can you add a preference for enabling/disabling code folding to pydev editor. Java editor has one, and it is nice to have for consistency. What's the test case that fails for comments folding? I've tried folding a method whose last line was a comment, and it worked. A question about pass & Str tokens: How did you determine their end location: setEnd(new Location(astNode.beginLine-1, astNode.beginColumn + 22)); That 22 number must have some meaning? Aleks Fabio Zadrozny wrote: > Hi All, I'm adding some code-folding capabilities to our plugin... > > It's still not complete... but it should be until tomorrow... (I've already > commited most of it, so, it's already usable) > > There's only one bug I think I'll be unable to correct... > > If some class / method ends with a comment, I'm unable to get the correct > code folding for it (since our model doesn't get comments parsed) > > I've added 'pass' and Str > Tokens to our model, so that I could make it work correctly with them... > > If someone has some problem in code-folding or some idea on how to implement > it to work correctly with comments... I'm accepting suggestions... > > []s |
From: Fabio Z. <fa...@in...> - 2004-07-19 19:24:00
|
Humm... that's a good observation... I've just Ctrl+c / Ctrl+v code from somewhere else ... (NameEqualsMainNode) probably because of that the commenting works in some cases and in others not... I'm going to check and correct it... I've also added keybindings for it (Ctrl+- and Ctrl+=)... just commited. Fabio -----Original Message----- From: pyd...@li... [mailto:pyd...@li...] On Behalf Of Aleks Totic Sent: segunda-feira, 19 de julho de 2004 15:56 To: pyd...@li... Subject: Re: [Pydev-code] Code Folding Neat. I've just checked it out, it works well. I've thought of adding code folding to 3.0 port. I have one small request: can you add a preference for enabling/disabling code folding to pydev editor. Java editor has one, and it is nice to have for consistency. What's the test case that fails for comments folding? I've tried folding a method whose last line was a comment, and it worked. A question about pass & Str tokens: How did you determine their end location: setEnd(new Location(astNode.beginLine-1, astNode.beginColumn + 22)); That 22 number must have some meaning? Aleks Fabio Zadrozny wrote: > Hi All, I'm adding some code-folding capabilities to our plugin... > > It's still not complete... but it should be until tomorrow... (I've already > commited most of it, so, it's already usable) > > There's only one bug I think I'll be unable to correct... > > If some class / method ends with a comment, I'm unable to get the correct > code folding for it (since our model doesn't get comments parsed) > > I've added 'pass' and Str > Tokens to our model, so that I could make it work correctly with them... > > If someone has some problem in code-folding or some idea on how to implement > it to work correctly with comments... I'm accepting suggestions... > > []s ------------------------------------------------------- This SF.Net email is sponsored by BEA Weblogic Workshop FREE Java Enterprise J2EE developer tools! Get your free copy of BEA WebLogic Workshop 8.1 today. http://ads.osdn.com/?ad_id=4721&alloc_id=10040&op=click _______________________________________________ Pydev-code mailing list Pyd...@li... https://lists.sourceforge.net/lists/listinfo/pydev-code |
From: Fabio Z. <fa...@in...> - 2004-07-19 19:29:19
|
Ok, just corrected it... give it a check to see if you agre... The last thing to do is the preferences (I'm only finishing that tomorrow). The code that doesn't work is: class C: pass #not gotten If you collapse class C, the #not gotten token should still appear... Fabio -----Original Message----- From: pyd...@li... [mailto:pyd...@li...] On Behalf Of Fabio Zadrozny Sent: segunda-feira, 19 de julho de 2004 16:27 To: pyd...@li... Subject: RE: [Pydev-code] Code Folding Humm... that's a good observation... I've just Ctrl+c / Ctrl+v code from somewhere else ... (NameEqualsMainNode) probably because of that the commenting works in some cases and in others not... I'm going to check and correct it... I've also added keybindings for it (Ctrl+- and Ctrl+=)... just commited. Fabio -----Original Message----- From: pyd...@li... [mailto:pyd...@li...] On Behalf Of Aleks Totic Sent: segunda-feira, 19 de julho de 2004 15:56 To: pyd...@li... Subject: Re: [Pydev-code] Code Folding Neat. I've just checked it out, it works well. I've thought of adding code folding to 3.0 port. I have one small request: can you add a preference for enabling/disabling code folding to pydev editor. Java editor has one, and it is nice to have for consistency. What's the test case that fails for comments folding? I've tried folding a method whose last line was a comment, and it worked. A question about pass & Str tokens: How did you determine their end location: setEnd(new Location(astNode.beginLine-1, astNode.beginColumn + 22)); That 22 number must have some meaning? Aleks Fabio Zadrozny wrote: > Hi All, I'm adding some code-folding capabilities to our plugin... > > It's still not complete... but it should be until tomorrow... (I've already > commited most of it, so, it's already usable) > > There's only one bug I think I'll be unable to correct... > > If some class / method ends with a comment, I'm unable to get the correct > code folding for it (since our model doesn't get comments parsed) > > I've added 'pass' and Str > Tokens to our model, so that I could make it work correctly with them... > > If someone has some problem in code-folding or some idea on how to implement > it to work correctly with comments... I'm accepting suggestions... > > []s ------------------------------------------------------- This SF.Net email is sponsored by BEA Weblogic Workshop FREE Java Enterprise J2EE developer tools! Get your free copy of BEA WebLogic Workshop 8.1 today. http://ads.osdn.com/?ad_id=4721&alloc_id=10040&op=click _______________________________________________ Pydev-code mailing list Pyd...@li... https://lists.sourceforge.net/lists/listinfo/pydev-code ------------------------------------------------------- This SF.Net email is sponsored by BEA Weblogic Workshop FREE Java Enterprise J2EE developer tools! Get your free copy of BEA WebLogic Workshop 8.1 today. http://ads.osdn.com/?ad_id=4721&alloc_id=10040&op=click _______________________________________________ Pydev-code mailing list Pyd...@li... https://lists.sourceforge.net/lists/listinfo/pydev-code |
From: Fabio Z. <fa...@in...> - 2004-07-19 19:53:10
|
Well, it took less time than I thought... Just checked in the preferences stuff... I think the feature can be considered finished (I'm not considering the bug that happens when the comment is the last thing in the method). []s Fabio -----Original Message----- From: pyd...@li... [mailto:pyd...@li...] On Behalf Of Fabio Zadrozny Sent: segunda-feira, 19 de julho de 2004 16:33 To: pyd...@li... Subject: RE: [Pydev-code] Code Folding Ok, just corrected it... give it a check to see if you agre... The last thing to do is the preferences (I'm only finishing that tomorrow). The code that doesn't work is: class C: pass #not gotten If you collapse class C, the #not gotten token should still appear... Fabio -----Original Message----- From: pyd...@li... [mailto:pyd...@li...] On Behalf Of Fabio Zadrozny Sent: segunda-feira, 19 de julho de 2004 16:27 To: pyd...@li... Subject: RE: [Pydev-code] Code Folding Humm... that's a good observation... I've just Ctrl+c / Ctrl+v code from somewhere else ... (NameEqualsMainNode) probably because of that the commenting works in some cases and in others not... I'm going to check and correct it... I've also added keybindings for it (Ctrl+- and Ctrl+=)... just commited. Fabio -----Original Message----- From: pyd...@li... [mailto:pyd...@li...] On Behalf Of Aleks Totic Sent: segunda-feira, 19 de julho de 2004 15:56 To: pyd...@li... Subject: Re: [Pydev-code] Code Folding Neat. I've just checked it out, it works well. I've thought of adding code folding to 3.0 port. I have one small request: can you add a preference for enabling/disabling code folding to pydev editor. Java editor has one, and it is nice to have for consistency. What's the test case that fails for comments folding? I've tried folding a method whose last line was a comment, and it worked. A question about pass & Str tokens: How did you determine their end location: setEnd(new Location(astNode.beginLine-1, astNode.beginColumn + 22)); That 22 number must have some meaning? Aleks Fabio Zadrozny wrote: > Hi All, I'm adding some code-folding capabilities to our plugin... > > It's still not complete... but it should be until tomorrow... (I've already > commited most of it, so, it's already usable) > > There's only one bug I think I'll be unable to correct... > > If some class / method ends with a comment, I'm unable to get the correct > code folding for it (since our model doesn't get comments parsed) > > I've added 'pass' and Str > Tokens to our model, so that I could make it work correctly with them... > > If someone has some problem in code-folding or some idea on how to implement > it to work correctly with comments... I'm accepting suggestions... > > []s ------------------------------------------------------- This SF.Net email is sponsored by BEA Weblogic Workshop FREE Java Enterprise J2EE developer tools! Get your free copy of BEA WebLogic Workshop 8.1 today. http://ads.osdn.com/?ad_id=4721&alloc_id=10040&op=click _______________________________________________ Pydev-code mailing list Pyd...@li... https://lists.sourceforge.net/lists/listinfo/pydev-code ------------------------------------------------------- This SF.Net email is sponsored by BEA Weblogic Workshop FREE Java Enterprise J2EE developer tools! Get your free copy of BEA WebLogic Workshop 8.1 today. http://ads.osdn.com/?ad_id=4721&alloc_id=10040&op=click _______________________________________________ Pydev-code mailing list Pyd...@li... https://lists.sourceforge.net/lists/listinfo/pydev-code ------------------------------------------------------- This SF.Net email is sponsored by BEA Weblogic Workshop FREE Java Enterprise J2EE developer tools! Get your free copy of BEA WebLogic Workshop 8.1 today. http://ads.osdn.com/?ad_id=4721&alloc_id=10040&op=click _______________________________________________ Pydev-code mailing list Pyd...@li... https://lists.sourceforge.net/lists/listinfo/pydev-code |
From: Fabio Z. <fa...@in...> - 2004-07-22 13:35:24
|
Hi All... I've just made some changes in code folding so that the marks were set after setting the editor. It wasn't working because sometimes the ProjectionAnnotationModel was not ready when the file was parsed... so, basically I put a Thread to get it later... I've also changed the package structure... Well that's it... Fabio Zadrozny ------------------------------------------------------ Software Developer ESSS - Engineering Simulation and Scientific Software www.esss.com.br |
From: Fabio Z. <fa...@in...> - 2004-07-22 14:13:09
|
Hi, Added collapse/uncollapse all functions (Ctrl+9 and Ctrl+0)... Fabio Zadrozny ------------------------------------------------------ Software Developer ESSS - Engineering Simulation and Scientific Software www.esss.com.br -----Original Message----- From: pyd...@li... [mailto:pyd...@li...] On Behalf Of Fabio Zadrozny Sent: quinta-feira, 22 de julho de 2004 10:39 To: pyd...@li... Subject: [Pydev-code] Code Folding Hi All... I've just made some changes in code folding so that the marks were set after setting the editor. It wasn't working because sometimes the ProjectionAnnotationModel was not ready when the file was parsed... so, basically I put a Thread to get it later... I've also changed the package structure... Well that's it... Fabio Zadrozny ------------------------------------------------------ Software Developer ESSS - Engineering Simulation and Scientific Software www.esss.com.br ------------------------------------------------------- This SF.Net email is sponsored by BEA Weblogic Workshop FREE Java Enterprise J2EE developer tools! Get your free copy of BEA WebLogic Workshop 8.1 today. http://ads.osdn.com/?ad_id=4721&alloc_id=10040&op=click _______________________________________________ Pydev-code mailing list Pyd...@li... https://lists.sourceforge.net/lists/listinfo/pydev-code |