Folding editor?

Dwight Hughes dwighth at ipa.net
Thu May 27 22:57:41 UTC 1999


Some code that might be of interest is Golgi for Squeak from Michal
Starke. Here is his message to the list about it.

-- Dwight

-------- Original Message --------
Subject: Golgi
Date: Fri, 16 Oct 1998 20:26:26 +0100
From: michal starke <Michal.Starke at lettres.unige.ch>
To: squeak at cs.uiuc.edu

hi all,

you might be interested in a morphic outliner that i wrote as a
smalltalk-learning project some weeks ago and that has grown into a
decent
alpha/prototype (provisionally called 'Golgi'). The core of it is a
MORE-like outliner, with each header a full PluggableTextMorph, with
reorg
of headers, hoisting etc. (screenshot here:
http://latl.unige.ch/lmc/f5/goRaw.gif).

Maybe more directly relevant to squeak: one of the goals i had in mind
is
that it should be fairly easy to adapt the outliner to specialised uses.
This version comes with one such specialised use: a smalltalk (squeak)
code-editor integrated into standard squeak browsers. (screenshot here:
http://latl.unige.ch/lmc/f5/goSqueak.gif).

Qua squeak-code editor, it presents several benefits:
- less punctuation hassle: it inserts dots at the end of the relevant
headers. indentation signals blocks so that it can inserts square
brackets
automatically, it allows to comment out code by simply hitting cmd-t
(the
wedge becomes a quote sign and the header is commented. headers under
that
header are automatically commented too), to insert a breakpoints by
hitting
cmd-k, to forego the var-declaration syntax '|'. in short it allows one
to
concentrate on the meaning while writing code, minimising the syntactic
chores.
- quick and easy view/manipulation of the structure. useful particularly
when the code becomes bigger than what one pane would contain. Again,
allows one to concentrate on the meaning of it all :-)

I plan to integrate Golgi very closely with squeak since there are many
parts of squeak into which i would like to sneak outline-like views. Eg:
- inspectors (wouldn't it be great to be able to expand down an
inspector
rather than opening zillions of them?!)
- list-views, particularly browser list views. that would allow
hierarchical categorization of classes.

You can download the current prototype of Golgi either as a fileIn-set
(there is an installer) or as a complete image preloaded with Golgi:

http://latl.unige.ch/lmc/f5/golgi_052a10.hqx (file-in)
http://latl.unige.ch/lmc/f5/golgi_052a10.zip (file-in)
http://latl.unige.ch/lmc/f5/MACFULLGOLGI_052A10.HQX (5MB)
http://latl.unige.ch/lmc/f5/WINGOLGFULL_052A10.ZIP

Warnings:
- keep in mind that this is an early alpha. it is usable, but bugs will
jump at you! I am sharing this now not because it is mature, but (first
for
the sheer pleasure of sharing it! and...) to let people know about the
ongoing project, maybe get some feedback and to allow people to tinker
with
teh code if they feel like it.
- if you choose the file-in + installer, back up before: it installs
some
methods in system classes to allow manipulation of its shared pools)
- if you go looking at the under the hood, don't trust what you see (or
read in comments) yet. there are several successive layers of prototypes
in
there that i haven't had time to clean up entirely.

On the other hand i have kept all my notes in it for the last couple of
weeks and still haven't lost anything.

michal
-----------------------------------------------------------

Edward P Luwish wrote:
> 
> Does anyone know of a folding editor implemented on Squeak or any other
> Smalltalk that I can get from the archive?  If not, I have a pretty
> interesting project to do, in addition to porting Squeak to EPOC32.
> 
> If you are not sure what it is, a folding editor is like an outliner, in
> that you can hide subordinate data behind a short descriptive heading in
> a hierarchy of headings.  Entire branches of the tree can be cut, copied
> and pasted by simply cutting and pasting the root topic to another part
> of the tree.
> 
> A syntax-sensitive editor can be subclassed from a folding editor.
> There used to be a DEC product like this:  you picked a computer
> language and the extended BNF construct "{program}" appeared on the
> screen.  Each time you select a BNF construct, you can expand it into
> the right hand side of the BNF production.  If the right hand side is a
> choice (like "{statement}"), a pop-up menu appears with the choices (in
> a C example, you would see "{if_statement}", "{block}", etc.).
> Provisions are made for mandatory and optional syntactic constructs, and
> those that can be repeated.  At any point you can give up and just type
> something, but if you don't,  it's a nice aid for syntax checking and
> consistent coding.  There's probably something in Emacs like this, but I
> never was a big Emaxer. (This could be another nice project, which can
> reuse existing stuff if you know of any)
> 
> I would like to have Squeak be my desktop, even if I am writing a novel
> or a C program.  That's why I am interested in tools like this.
> Ultimately, I want to have a whole suite of PIM and Office tools, such
> as are found on a PDA or a typical WordSpreadDatabase package like
> Appleworks, and a multi-language development environment.
> 
> Ed





More information about the Squeak-dev mailing list