doc remix
[eclipsethinslicer.git] / Svelte / doc / HOWTOINSTALLSOURCE-GITBASH.txt
blob4711edc6213dd632126a5619c5b842b35e4b4988
1 HOWTO DOWNLOAD ECLIPSE THIN SLICER SOURCE CODE USING GIT BASH
3 WINDOWS:
4 1. Installing git
5 Download and install git from
6 http://code.google.com/p/msysgit/downloads/list
7 (Git-1.5.5-preview20080413.exe is fine)
8 Git is a powerful distributed version control system used to keep the slicer source code.
10 WARNING: If you download git-1.5.5 or later, the autocrlf option, which 
11 converts between Windows and UNIX newlines, will be enabled by default. 
12 This causes problems with the WALA and slicer repositories, resulting in 
13 merge errors, and making it look like like you have modified files when 
14 you have not. If you are using git-1.5.5 or later, open Git Bash and 
15 type the following command to disable the autocrlf option:
17 git config --global core.autocrlf false
19 You only have to do this once.
21 2. Get WALA, WALA incubator, and Eclipse Thin Slicer source code via git
22 Make a new directory to hold your cloned git repositories. Within git 
23 bash, cd to this directory and type the following commands:
25 git clone git://repo.or.cz/wala.git
26 git clone git://repo.or.cz/walaincubator.git
27 git clone git://repo.or.cz/eclipsethinslicer.git
29 This will create three directories (wala, walaincubator, and 
30 eclipsethinslicer) with the WALA and slicer source. However, wala and 
31 walaincubator are by default on the "master" branch, which contains
32 direct code from WALA SVN trunk. To use the slicer, you will have to 
33 switch branches to use the slicer-specific WALA versions.
35 3. Create/switch branches
36 In the wala directory, run the following commands:
38 git branch --track v1.1.2 origin/v1.1.2-jdt
39 git checkout v1.1.2-jdt
41 This is a version of WALA, branched off from v1.1.2, with a JDT WALA
42 backend. You can repeat this to make more local branches for v1.1.2,
43 v1.1.2-LOCALBUGFIXES (WALA v1.1.2 with additional bugfixes), if you wish
44 to look at / work with these versions, but v1.1.2-jdt is the branch that 
45 the slicer currently uses.
47 In the walaincubator directory, run the following commands:
49 git branch --track v1.1.2 origin/v1.1.2
50 git checkout v1.1.2
52 This is the version of walaincubator closest to WALA v1.1.2, and is
53 currently required by the slicer. The "git branch" command makes a local 
54 branch to follow (or "track") the remote branch, and the second command 
55 checks out this local branch to the local working directory.
57 You do not have to switch branches in the eclipsethinslicer 
58 repository, as the default branch (master) is what you want.
60 4. As described the WALA Getting Started Guide
61 (http://wala.sourceforge.net/wiki/index.php/UserGuide:Getting_Started),
62 install the following in the wala repository directory:
63 * in com.ibm.wala.cast.java/lib:
64 polyglot.jar
65 java_cup.jar
67 * in com.ibm.wala.cast.js/lib:
68 js.jar
69 xalan.jar
71 5. Launch Eclipse and create a new fresh workspace. Go to File -> Import.
72 Under General, choose "Existing Projects into Workspace". Find the
73 directory that contains you used git to download the Eclipse Thin Slicer
74 into -- i.e. the directory which contains "Svelte" and choose this, and
75 then import the Svelte project. Repeat for "wala" and "walaincubator".
76 From "wala", you need everything but com.ibm.wala.j2ee. From
77 "walaincubator", you just need com.ibm.wala.eclipse and
78 com.ibm.wala.eclipse.tests
80 6. Debug or run the projects using the "wala.eclipse" launcher. In the new
81 workspace you should be ready to use the slicer. Try opening a java file,
82 selecting some text, and hitting the "CI" button.
84 -------------------------
85 Troubleshooting
86 1. I'm getting compile-time errors abount unresolved types. What do I do?
87 If you are getting compile-time errors about missing classes, make sure 
88 you have you have created the correct tracking branches in 
89 wala and walaincubator and that you have 
90 switched to the correct branches. You can display a listing of branches 
91 by running the command
93 git branch
95 from the repository directory (such as "wala" or "walaincubator"). The 
96 current working branch is marked with an asterisk. Remember, 
97 wala should be on branchv1.1.2-jdt and 
98 walaincubator should be on branch '''v1.1.2'''. If the 
99 branch you need is listed but does not have an asterisk, you need only 
100 run the command:
102 <pre>git checkout v1.1.2-jdt</pre>
104 for <code>wala</code> or
106 <pre>git checkout v1.1.2</pre>
108 for <code>walaincubator</code>.
110 ===I'm getting compile-time errors abount missing libraries. What do I 
111 do?===
112 If you are getting errors about missing libraries like polyglot and 
113 xalan, you probably do not have the external libraries used by WALA 
114 installed correctly. Make sure the files <code>polyglot.jar</code> and 
115 <code>java_cup.jar</code> are in 
116 <code>wala/com.ibm.wala.cast.java/lib</code>, and <code>js.jar</code> 
117 and <code>xalan.jar</code> are in 
118 <code>wala/com.ibm.wala.cast.js/lib</code>