Version 3 (modified by tothm, 4 years ago) (diff) |
---|
Install
To install RefactorErl you can use the referl script located in the bin directory of the release. Unzip the release and type the following command:
bin/referl -build tool
System requirements: Install page
Build configuration options: Parameters of the referl script
Starting the tool
To start the tool with the default config use: bin/referl. This will store the source code representation in a Mnesia database. However, to decrease memory footprint and speed up the tool you may want to use the Kyoto Cabinet backend of RefactorErl:
bin/referl -db kcmini
For further options please check the StartUp page
Interfaces: ri, web
ri:h
Building a database
For a first time user, we suggest using the ri interface to build the database of RefactorErl? from the source code. There are several options to analyse the source files. For details see the file management page. Here we discuss some basic scenarios.
You can add files using the ri:add/* functions. To add a single module just provide the path to the file as an argument: ri:add("path_to_file")
The same command can be used to add directories recursievely: ri:add("path_to_dir")
If your included files are located in a separate directory, please add them as an include environment> ri:addenv(include, "path_to_include_dir")
If your software follows the Erlang application hierarchy and you have a library of your software.
- Add the path to the application libarary as an environment variable: ri:addenv(appbase, "path_to_my_lib")
- Add the files using a subkey of the application base path and the name of the application> ri:add(my_lib, my_application)
- This mode helps RefactorErl to find the include files in the appropriate include folders.