forked from RefactoringTools/wrangler
-
Notifications
You must be signed in to change notification settings - Fork 0
/
README.txt
executable file
·74 lines (55 loc) · 3.61 KB
/
README.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
Wrangler -- An Erlang Refactorer
28/03/2012
http://www.cs.kent.ac.uk/projects/wrangler/
---------------------------------------------------------------------------
Refactoring is the process of improving the design of a program without
changing its external behaviour. While refactoring by hand is possible, tool
support for refactoring is invaluable as it is more reliable, and allows
refactoring to be done (or undone) easily. Wrangler is such a tool that
supports interactive refactoring of Erlang programs. Wrangler is integrated
into both (X)Emacs and Eclipse.
Wrangler's refactorings cover structural changes such as function, variable
and module renaming, function extraction and generalisation. Wrangler
recognises macros in code, and can be used on a single file or across a
whole project.
Wrangler can also be used to locate and remove code clones, and to improve
the module structure of projects.
Wrangler is extensible, with an API for writing new refactorings and a DSL
for scripting complex refactoring combinations.
Wrangler also supports testing in EUnit, QuickCheck and Common Test, so your
tests are refactored automatically when you refactor your code.
A new functionality added recently to Wrangler is the support for API
migration. With Wrangler, API migration is achieved in this way: whenever
an API function's interface is changed, the author of this API function only
needs to implement an adapter function in Erlang, which defines the old API
functions in terms of the new. From this definition we automatically generate
rules to transform the client code to make use of the new API rather than
the old.
--------------------------------- Documentation -------------------------------
Wrangler online documentation is available from http://refactoringtools.github.com/wrangler
-------------------------------- Wrangler Installation ------------------------
See INSTALL for instructions.
--------------------- how to use the refactorer -------------------------------
1. Open an Erlang source file in the Emacs editor. You should now have a
menu called <em>Erlang</em>, if you have configured Emacs properly to
use the Erlang-mode (see the file INSTALL otherwise).
2. To start Wrangler, type: `M-x erlang-wrangler-on', or
alternatively `Ctrl-c Ctrl-r'. After that, new menu <em>Wrangler</em>
should appear in the menu bar (see INSTALL otherwise).
3. To stop Wrangler, type `M-x erlang-wrangler-off', or
alternatively use `Ctrl-c Ctrl-r' again. The Refactor and Inspector
menus will disappear from the menu bar.
4. You can use `Ctrl-c Ctrl-r' to toggle Wrangler on or off.
5. For most refactorings, the editor interface will pass the current
filename (should be the module name, as well), the refactoring command,
and the current cursor position. For some refactorings, you'll also
need to highlight an expression, or enter a new name.
6. The 'Customize Wrangler' menu in the Wrangler submenu allows you
to specify the boundary of the system by giving the list of directories
to search for Erlang source files/header files that could be affected
by a refactoring.
7. For most refactorings, the editor interface will pass the current
filename (should be the module name, as well), the refactoring command,
and the current cursor position. For some refactorings, you'll also
need to highlight an expression, or enter a new name. More details are
available from the documenation.