SystemBrowser
The Browser works best on Webkit and Safari. There are errors in Firefox. Can somebody please test it on Chrome? Thanks!
Purpose: viewing and editing source code (all of it!) within the Lively Kernel
To start the browser:
- in the WorldMenu? choose Tools.../SystemBrowser
- in the ToolDock? click on SystemBrowser
- programmatically: lively.ide.SystemBrowser.browse(moduleName, className, methodName)
Basics
The browser has three panes: The left pane shows the modules (files), the middle pane shows classes, functions, and objects, and the right pane displays methods and properties. The contents of each pane are dependent of the list selection of the adjacent left pane. The pane showing modules allows to switch between classes, objects, and functions.
The browser loads some modules at startup. See lively.ide.SystemBrowser.browse('ide.js', 'AnotherSourceDatabase', 'preLoadFileNames'); (simply evaluate it in a TextMorph) for details. Please feel free to customize that list. Modules which aren't loaded at startup can be loaded via the menu of the left pane.
To modify a method/function/class...: Browse to the element you want to modify by clicking on the lists in the three panes until you reach the element. In the TextMorph in the lower half of the browser make your edits. Save (alt+s or via menu) to store changes in the files
Browser Buttons
- Load all modules
- All files which appear in the left pane are parse, this may take some seconds. Useful when you want to search the whole code base.
- Toggle LineNo?
- Show hide the line numbers of the elements
- Refresh
- Reload the browser contents, experimental, should not be necessary to use (a change in one browser updates other open browsers)
- Turn eval on
- Evaluates your changes in the running system. Currently works only for method changes
- Sort
- Sort the browser content
Adding removing elements
To delete an element and select 'remove' from the menu of the list pane the element is in.
To add an element: select the 'owner'. Add the element directly in the source code. For example, adding a method to a class: Browse the class. Click in the TextMorph displaying the source code and simply create the method definition like in a normal TextEditor?. Save. A new list entry for the element should appear in one of the list panes (if you view the correct category).
Searching/Explorative? browsing
To search the source code several options exist:
- select the text you want to search (case sensitive) and hit alt+w
- searching for class/object references: select a class/object and open the menu. Choose 'references'
- To search for implementors/senders of methods and functions: Select the method/function open its menu and select 'implementors' or 'senders'
The result of those searches will be displayed in a ChangeList? window. Generally it is possible to edit code there but there are some issues which might lead to errors, so try to edit code only from within browsers. To open a browser on a search result, click on the list entry (top window) of the ChangeList? window and hit alt+b (don't let go the mouse).
Emergency
In the case of an emergency: don't panic ;-) If the browser has successfully eaten all your source files you worked on during the last two hours, you will find all those sources in a working version in your Web browser (with which you runLK). And: this shouldn't happen ;-)
- Todo
- extend changes to modify the running system
- check syntax before saving (partly done)
- buttons/menu options for adding elements
- syntax highlighting
- Profiling Help - remove this line; it should go on the front page at the bottom
Attachments
-
Picture 14.png
(123.5 KB) -
added by robertkrahn 3 years ago.

