Ober, an environment for Scala based on Oberon

Current binary (run with java -jar): http://zot.github.com/Ober-scala/ober.jar
Current source: http://github.com/zot/Ober-scala/tree/master


Basic Operation

Mouse button 1 functions as normal

Mouse button 2 or Ctrl-Mouse button 1 executes text as a command as below, but if it surfs, it uses a new viewer

Mouse button 3 as below


Ober windows are composed of tags, viewers, and tracks.

Tags are single-line text fields, viewers are large areas of text, and tracks are columns of viewers.  Tracks and viewers also have draggers next to their tags, which you can use to resize the tracks and viewers.

Tags have this format: name [namespace ...] command ...

When you execute a command or surf, Ober uses the namespaces in brackets to resolve the action.  Viewers use the tag directly above them for command resolution.  Each namespace can inherit from a list of namespaces.  Here's how Ober looks up a command when you execute it in a File viewer:
  1. Check the File, Viewer, Track, and Ober namespaces for your command
  2. otherwise, see if it's Import or the name of a class (the Class namespace does this)
  3. otherwise, try to execute it as a system (shell) command (the System namespace does this)
  4. otherwise, try to surf to it (using the first namespace which can successfully surf). If the current viewer is dirty, it opens a new viewer

Some commands take arguments.  These can be words, quoted text, or Scala expressions enclosed in curly braces.

Scala expressions are evaluated in their own blocks.  To create definitions that persist past the current argument, use the Exec command.


Ober (parents: Class, System)

Quit Quit Ober
New Create new viewer.  It will appear in the widest track, cutting the tallest view in half
Newcol Create a new track.  It will cut the widest track in half
Load Load commands, line-by-line from a file indicated by viewer name as if you clicked each one in the current context
Rename newname Renames current viewer to newname
Echo (args to end of line) echo arguments in the Err viewer
Help Show this document
Run viewer command Execute command in the context of the named viewer
Append text Add text to a viewer's main view
Exec (args to end of line) Concatenate arguments and execute as Scala code
Namespaces (args to end of line) Set the namespaces of the current viewer

Track (parents: Ober)

Delcol Remove the current column
Width width Set the width of a track
TrackPosition pos Set the position of a track

Viewer (parents: Track)

Del Delete the current viewer
Height height Set the height of a viewer
ViewerPosition pos Set the position of a viewer

File (parents: Viewer)

Get Load the file indicated by the viewer name as text
GetHTML Load the file indicated by the viewer name as HTML
Surf Load the file indicated by the viewer name as either text or html, depending on content type
Put Store viewer contents to the file indicated by the viewer name


Import package Add package to the import path
classname (args to end of line) Run the main method on a class with the arguments


systemcmd (args to end of line)
Run the system command


file or url
Surf to the file or url

To Do