swarm-support
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

emacs, xemacs, and OO-browser


From: Paul Johnson
Subject: emacs, xemacs, and OO-browser
Date: Mon, 15 Sep 1997 13:58:50 -0500 ()

I was reading Brad Cox and Andrew Novolbiski, Object-Oriented Programming:
An Evolutionary Approach,2ed (1991) and I rather enjoyed it! In Chapter 9,
"Iconic User Interfaces," they discuss the Stepstone corporation's object
browser.  I was thinking "I wish I had that!"  Then I found out I already
did have it!  Well, a pretty good approximation.

It seemed to me many users might not know, either, so I'm posting this.
In xemacs 20-1, which I got from the Redhat site in rpm format, one finds 
xemacs (formely Lucent emacs).  Contrary to what many new folks have
thought, it is not the emacs that you get with Redhat, even though they
say that is emacs with X11 support.  xemacs is supposed to mimic all emacs
functions (there's some debate about how well).  But, the big difference
is that xemacs comes with more installed packages.  For example, one could
install the OO-browser in emacs, but it does not come with it. xemacs
has it, already compiled, and it shows up under the Tools menu.

I know the emacs experts will cringe, but xemacs has lots of easier
features. Easier adjustment of colors, for example.  There's a point and
click font adjuster.

But, back to the OO-Browser in xemacs.  When you start it, it asks where
your environment is, and if you already have a file called OOBR somewhere,
you tell it where. If you don't, you can specify directories where
OO-browser is supposed to find source files for objects.  I don't
understand all the subtleties (yet), but you just give directory names for
the "system" and "library" categories. The system/library distinction is
supposed to represent the permanent versus under-development code.  I
don't actually think it matters which category you put which directory
into (god, grammar!), because after you are finished specifying them, it
runs a directory-recursive search to make a list of all classes and it
searches through both categories of directories. (While doing this, I got
some error messages because some of the implementation files in the swarm
1.0.1 distribution did not have @end statements, but as soon as I fixed
that, it was OK!). 

After the environment is compiled, it shows a list of all classes. Right
click on one, move down to the 'class' header, choose to view ancestors or
descendants of that class, and poof, they show in a second buffer.  Then
choose 'class" and 'features' and all the methods of the chosen class are
displayed.  THen choose 'features' 'implementors' and you get a list of
all classes that have a method of the chosen name.  Any time, you can
choose to edit a source file from which a class is taken.

I've found this useful in exploring the swarm files. I have some
unanswered questions/problems, so let me warn you I can't answer these
questions.

1.  xoobr (the graphical object browser) is not compiled and installed in 
the xemacs distribution. There is lisp code for it, and
i've compiled it (its in the lisp/oobr/xtree directory). THere is a readme
and makefile there.  (You make it, and then copy xoobr binary to a
directory in the path).  So, once OO-browser is working, if you right
click, choose class, "graphical view" you are supposed to see a tree,
where you can click.  My display of the tree all black, however, and i've
fiddled with x resources lots, to no avail.  Could be the Matrox Mystique
"barely supported" video card.

2.  I have not yet discerned the way that the OO-browser distinguishes h
and m files when you choose to edit the source. I know m files should be
what you get when you go into the 'features' 'implementors' aparatus, but
sometimes I seem to get h files.

3.  I've reconfigured the
environment many times, and I've found that if you include both the
swarm/include and swarm/src directories, you get a lot of duplicated
classes (duh!).  SO I'm just including swarm/src, along with the directory
of the code I'm developing, and I also include the directory where /objc.h
is held.  If other people have looked at this, I'd wonder what they found.
If I were to include just swarm/include, it would find all the h files,
but not have access to m files. Right?  Same goes for objc.h?
As I understand it, there is no objc.m file because the authors
have already compiled that into a library, so the OO-browser has no way to
reveal the source code for objc.m, even if you want to change it.


Paul E. Johnson                 address@hidden  
Associate Professor             http://lark.cc.ukans.edu/~pauljohn
Dept. of Political Science      Fax:   (913) 864-5700
University of Kansas            Phone: (913) 864-9086
Lawrence, Kansas 66045


                  ==================================
   Swarm-Support is for discussion of the technical details of the day
   to day usage of Swarm.  For list administration needs (esp.
   [un]subscribing), please send a message to <address@hidden>
   with "help" in the body of the message.
                  ==================================


reply via email to

[Prev in Thread] Current Thread [Next in Thread]