Collapse/expand of code loop |
hum... |
AciD
Guest
|
i forgot to tell i saw this feature in the 'kate' editor for linux (if u wanna see it in action :))
|
||||||||||||
|
Site Admin
|
yeah, I know what code collapsing means
Agreed, it's a nice feature. Unfortunately, it requires huge development... I can't make sure when and if this feature will be implemented. |
||||||||||||
|
|
yeah... whould be realy cool.
but a little hard to implement i think... cuz it must be compatible with all the different coding styles... i prefer making the brakets this way:
others prefer this
|
||||||||||||||||
|
Site Admin
|
that's the least problem.
you'll see if () {...} while others will see if () {...} where {...} is collapsed block. |
||||||||||||
|
|
Awh, what the hell, I know this is years old and all, but I just had to make a post about this one.
I love code collapse, that's why I'm bumping this one up. I've tried looking through your announcements searching for keywords similar to code collapsing, but I can't really figure out if this is implemented or not.... :/ I was just thinking about the thoughts you had about this feature and it seems to me that you'd prefferably have the function be fully automatic, trying to interpret where a loop starts and ends. But how about having custom made collapses? Wouldn't that ease off the interpreter pain that seems to be the big issue here? Just have people select an amount of text, no matter where and what it is, have a right-click context menu with an option to "collapse" and perhaps a small note could be entered to keep track of what you're collapsing. Or, if you'd rather it be automatic or "semi"-automatic, have the users enter quotes in the code that are collapsible. I'm not saying that it should be forcing anyone to type stuff like:
because it clutters everyones probably already cluttered code, but it could be an option? The interpreter part could be anything you choose, of course, I'd just love to see some kind of code collapse than none at all. |
||||||||||||||
|
Actually thats not a bad idea |
|
I've taken phpDocumentor and expanded it for our developers to include @change, @state, @suggestion. ect. You should be documenting your code
So, why not just have he editor detect @collapse ina docblock and then collapse everything in the following class, method, function? /** * After much thought and work, here is the new improved hello world function * @param String; $world; The world in which you wish to say hello to * @access public * @return void * @collapse */ function hello($world) {...} or class World extends planet { /** * This is the constructor method for the class. * @author Some Smuck * @collapse */ final public __constructor() {...} /** * This is the destructor method for the class. * @author Some Smuck * @collapse */ final public __destructor() {...} } or /** * This class allows you to say hello to any world. * @package World * @author Some Smuck * @collapse */ class CWorld extends planet {...} It would be easy to do, all you have to add is @collapse which will not in a comment block or line before the function, class, ect. have the editor keep track of this by giving each collapse a name from what we know. filename world.php so key "world.php.CWorld" would be set to true or false depending on state of CWorld Class Just an idea. |
||||||||||||
|
|
nah, using comments to denote collapsible block endpoints is a bad idea
a better would be to make the editor got throug the code and look for { and }, using some kind of stack to keep track of current block id, and then mark up beginning and end. then there is another array for keeping track of which block is visible and which is not. if a block is invisible then the editor will print the first line of that block and skip other lines to the next block. also it will skip any sub-blocks (nested if-s and for-s etc) then there will be a bit messing with removing and creating new blocks on-the-fly /edit: critical typos |
||||||||||||
Last edited by netgert on Wed Mar 30, 2005 11:50 pm; edited 1 time in total _________________ -/ NetGert /- |
What are the odds of this development |
|
I am new to PHPed and I am really enjoying it mainly for it's debugging. But I find that it is missing two key features. One is the collapsible blocks and the second is better block editing.
I do a lot of block editing in Ultra Edit and find it reallly saves on development time. |
||||||||||||
|
|
could u explain what is "block editing"
|
||||||||||||
_________________ -/ NetGert /- |
Guru master
|
Block Editing is called column mode in UE: From the UE site:
The only block-ish thing i frequently miss is being able to draw a selection line (with no characters selected) (fig 1) and then when pressing tab only the code from that line on is indented (fig 2). What I already requested long time ago iirc still stands: being able to modify the characters interpreted as word boundaries. (or something similar), phpEd skips a lot of things I would prefer it didn't when using the Control+Arrow. UE interpretes symbols like (){}=\/. etc etc as word breaks as well and I for one find that method more comfortable (perhaps a simple switch to enable extended wordbreaks or not) <suckup> Anyway, whatever the result off my and other requests is, i still love phpEd and haven't regretted paying for it for a sec (although it was a substantioal amount of money for my little company;) ) </suckup> Fig1: Fig2: |
||||||||||||||||
|
|
okay, got the idea now. however the usefulness seems very rare and not for php editing
|
||||||||||||
_________________ -/ NetGert /- |
Collapse/expand of code loop |
|
||
Content © NuSphere Corp., PHP IDE team
Powered by phpBB © phpBB Group, Design by phpBBStyles.com | Styles Database.
Powered by
Powered by phpBB © phpBB Group, Design by phpBBStyles.com | Styles Database.
Powered by