Principles
Introduction

In order to benefit from Cameleon2, one must know the way it works.

The goal of Cameleon2 is to offer tools to make the development of OCaml (and eventually other languages) applications easier. So Cameleon2 comes with:

  • A mecanism of view on ressources. A ressource can be a directory containing source files, for example. Then one can see this directory from the version configuration management point of view with the "CVS view", or from the dependencies-of-modules point of view, through a dependency graph,
  • Specific tools like an XML template designer (Report), a tool to design a database schema and generate OCaml code to access the database, a browser in OCaml modules documentation, a graphical toplevel (Topcameleon).
  • Various libraries used in Cameleon2: configuration files management, creation of configuration windows, ...
  • The ability to customize all menus, buttons bar and keyboard shortcuts,
  • The ability to add features with plugins.

To open views or use other features, the user uses Cameleon2 "commands". These commandes looks like simple shell script commands: a command name followed eventually by arguments. These commands can be associated to menus, buttons in the button bar and keyboard shortcuts. One can also launch a command "by hand" by using the "eval" predefined command. More commands can be defined by using plugins. The last way to launch a command is to use the "-e" option of Cameleon2 from the shell:

cameleon2.{x,byte} -e "open_view /work/cameleon2 modules"

Then the command is launched, eventually by an already launched cameleon2 (see the server). For information, the above command opens a "modules" view on the directory "/work/cameleon2".

Views

Various views are available by default. More can be added using plugins.

The views are open with the command

open_view ressource_name view_name

The view "view_name" is then open on the ressource "ressource_name". If the view does not exist, an error message is display in the log window; this log window is displayed with the command

log_window

The following views are available:

  • cvstree (on a directory): This view displays a directory tree with the given tree (the ressource) as root; directories handled by CVS are in bold, and contextual popup menus (with right button of the mouse) allow to launch CVS operations or open other views.
  • cvsfiles (on a directory): This view displays the list of files in the given directory which are handled by CVS. One can use contextual menus to perform CVS operations on the files.
  • directory (on a directory): This view display a simple directory tree from the given tree. One can use the contextual menu to open other views on a selected directory.
  • filetypes (on a directory): This view display the files in the given directory, grouping them by file type. File types are defined with the "configure_file_types_rules" command et actions can be associated to each file type by the "configure_file_types_handlers" command. In this view, the contextual menu allows gives access to the various actions associated to the selected file(s).
  • modules (on a directory): This view uses the dump.odoc file of the given directory to display the list of OCaml modules contained in it, and each of their elements, in a tree-oriented way. A contextual menu allows the edition of the selected element (module, type, ...). The command used to edit the element is (by now) defined in the file ~/.cameleon2/gui.ini (open_source_command = "...."). The OCamldoc dump file is obtained with a command like
    ocamldoc -dump dump.odoc -I ... module1.ml module2.mli module2.ml ...
    
    This kind of command can be put in a Makefile so that the dump file can be easily generated.
  • multiview: This view is used to display various views in the same window, with a "tab" per view. Here is an example of a commande to open such a view:
    open_view my_view multiview /work/cameleon2 cvstree /work/caml-get modules
    
    This command opens a multiview on the ressource "my_view" (the name is only used not to display to different windows simultaneously with the same command; only one window can display a given view on a given ressource). With this command, the multiview contains two views: a "cvstree" view on the "/work/cameleon2" ressource and a "modules" view on the "/work/caml-get" ressource. If you keep the window open and try to open the "modules" view on "/work/caml-get", then the multiview window is raised, not to have two windows with the same view.

To complete...

Server
To be updated.