From: Curt Hibbs Date: 2002-01-14T16:20:59+09:00 Subject: RE: Small Methods - a ramble > From: Ron Jeffries [mailto:ronjeffries@REMOVEacm.org] > Sent: Sunday, January 13, 2002 6:29 PM > > >Some editors can collapse Ruby methods; that could help. > > I've not seen one of those, where can I find one? I'm just using TextPad > as I'm a Windows guy ... CodeWright does this. See http://www.premia.com/products/codewright/ > Yes. I'm not sure whether or how to hook up with the FreeRIDE project > right now. Chet and I have been working a little bit on a fully > incremental Ruby browser and might continue that. It seems to me that > the Smalltalk style is so different from what most Rubyites are used to > that it might never catch on. I am also, an ex-Smalltalker, so I am very familiar with the Smalltalk browser. I want this capability to be in FreeRIDE, and as the lead developer of FreeRIDE's editor project I am certain that FreeRIDE *will* have it in some form. At the same time I hate to see us duplicating each other's work. I would really like to discuss this with you. If you feel amenable to this please contact me off the mailing list at curt@hibbs.com. In the meantime, let me see if I can summarize some of my thoughts on browsing & editing in FreeRIDE. I believe it is important for FreeRIDE to have the flexibility that allows each developer use the style of browsing and editing suits them, individually. Over the last decade I have use many different development environments. In these development environments there are several predominant forms of code navigation and editing, that I believe can synergistically coexist in a single IDE. = Flat File = Not much to say here. This is your basic textpad style editing where you see everything that is in a single file and your only form of navigation is moving up and down in the file and searching. Very primitive. A useful addition to this is the ability right-click on a symbol in the code and get a context menu that lets you go to its definition. = Collapsible Text = This is a very nice addition to flat file editing. Intelligent parsing can allow the text to be collapsed at particular code points (usually method and class definitions). A very flexible adhoc use of collapsible text is when you are allowed to collapse text sections based on the matches of a regular expression. CodeWright (which I mentioned above) does all of this. = Browsing = This is where you are allowed to view the code in your project based on the logical entities that it contains (classes, methods, modules) instead of its rather arbitrary physical storage (files). There are several ways to present this, but they all boil down to essentially the same thing. There is a hierarchy of names: classes/modules by inheritance/mixin which contain methods. When you click on one of these names, the editor should show that entity's definition, ready for editing. The name hierarchy can be displayed in the form of a collapsible tree control, or in classic Smalltalk panes. The display pane that shows code for editing can contain only that particular entity (Smalltalk style) or could be the entire file containing that entity with the selected entity visible for editing (and perhaps the rest of the file slightly "grayed" to visually distinguish the selected entity). I particularly like the this last approach because it lets me navigate logically, but easily see the physical organization without any additional effort. This is also the form that is most natural for non-Smalltalkers as it takes what they are use to (editing physical files) and layers onto that the capability to navigate using the names of the logical entities in their code. Also, there are many possible types of logical navigation panes: class hierarchy, reverse class hierarchy, "uses of ", etc. Curt