Skip to content

Commit 5ea9d86

Browse files
author
Jennifer Lhoták
committed
- adding plugin documentation
1 parent 7318413 commit 5ea9d86

22 files changed

+157
-75
lines changed

eclipse/ca.mcgill.sable.soot.help/doc/concepts/attributes.html

-32
Original file line numberDiff line numberDiff line change
@@ -7,37 +7,5 @@ <h3>Attributes</h3>
77

88
<p>This section describes the use of attributes in the Soot Eclipse Plugin.</p>
99

10-
<h4>Eclipse Related Attributes and Visual Representations</h4>
11-
12-
<h4>Attributes:</h4>
13-
14-
<b>JimpleLineNumberTag</b><br>
15-
<p>When xml-attributes option is selected a tag containing the jimple line number is added to the stmt or method automatically (contains start line and end line in case of multi-line stmt).</p>
16-
17-
<b>PositionTag</b><br>
18-
<p>When xml-attributes option is selected a tag containing the the start position and end position of a stmt is added to the stmt and the start position and end position of a valueBox is added to the valueBox automatically.</p>
19-
20-
<b>ColorTag</b><br>
21-
<p>This tag must be added manually to a stmt or valueBox. It has six predefined colors red, yellow, blue, green, orange and purple. You may use one of these or define your own using rgb color specification. Keep in mind that dark colors make text difficult to see.</p>
22-
23-
<b>LinkTag</b><br>
24-
<p>This tag extends StringTag and takes a string for a label. It also needs a host (this is where the link is to) a className (the class that contains the host) and a packageName (the package that contains the class)</p>
25-
26-
<br>
27-
<hr>
28-
<br>
29-
30-
31-
<h4>Visual Representations:</h4>
32-
33-
When the Soot-Eclipse plugin encounters a String Tag or a Link Tag it generates a hoverHelp tooltip that becomes visible upon mousing over the corresponding line number. This occurs in JavaEditor and JimpleEditor.
34-
<br><br>
35-
When the Soot-Eclipse plugin encounters any attributes it places a SootAttribute marker int the vertical ruler of the editor at the corresponding line number. This occurs in JavaEditor and JimpleEditor.
36-
<br><br>
37-
When the Soot-Eclipse plugin encounters a Color Tag along with a Position Tag it colors the region specified in the Position Tag with the color specified in the Color Tag. This currently only works in JimpleEditor
38-
<br><br>
39-
When the Soot-Eclipse plugin encounters a Link Tag, not only does it display the string (label) as a tooltip but it creates a link that can be accessed by clicking on the marker at the corresponding line in the vertical ruler to the left of the editor. A popup list will popup with a list of links. Clicking on one of the links will move the focus to the link target.
40-
<br><br>
41-
<hr>
4210
</body>
4311
</html>
Loading

eclipse/ca.mcgill.sable.soot.help/doc/concepts/concept_index.html

+11-2
Original file line numberDiff line numberDiff line change
@@ -11,18 +11,27 @@ <h3>Concepts</h3>
1111
<li><a href="folder_actions.html" target="concept">Folder Level</a></li>
1212
<li><a href="file_actions.html" target="concept">File Level</a></li>
1313
</ul>
14+
<li><a href="dialogs.html" target="concept">Dialogs</a></li>
15+
<ul>
16+
<li><a href="options_dialog.html" target="concept">Options Dialog</a></li>
17+
<li><a href="config_dialog.html" target="concept">Configurations Dialog</a></li>
18+
</ul>
1419
<li><a href="views.html" target="concept">Views</a></li>
1520
<ul>
1621
<li><a href="soot_output_view.html" target="concept">Soot Output View</a></li>
17-
<li><a href="jco_view.html" target="concept">Jimple Content Outline View</a></li>
22+
<li><a href="jco_view.html" target="concept">IR Editor Content Outline View</a></li>
1823
</ul>
1924
<li><a href="editors.html" target="concept">Editors</a></li>
2025
<ul>
21-
<li><a href="jimple_editor.html" target="concept">Jimple Editor</a></li>
26+
<li><a href="jimple_editor.html" target="concept">IR Editor</a></li>
2227
</ul>
2328

2429

2530
<li><a href="attributes.html" target="concept">Attributes</a></li>
31+
<ul>
32+
<li><a href="tags.html" target="concept">Tags</a></li>
33+
<li><a href="visualizations.html" target="concept">Visualizations</a></li>
34+
</ul>
2635
</ul>
2736
</body>
2837
</html>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
<html>
2+
<body>
3+
<h3>Soot Configurations Manager Dialog</h3>
4+
<p>This dialog allows you to save and manage sets of Soot options as named configurations.</p>
5+
<img src="config_dialog.png">
6+
7+
<p> The list at the left shows configurations you have already created. They can be given any unique name. At the right are buttons for managing the configurations.
8+
<ul>
9+
<li>The <tt>New</tt> button is for creating a new configuration. Upon clicking it you will be prompted for a name. This name must be unique and must not be null. Then the Options Dialog will be shown with a <tt>Save</tt> intead of <tt>Run</tt> button at the bottom. Select you options and click <tt>Save</tt> to finish creating your new configuration.
10+
</li>
11+
<li>The <tt>Edit</tt> button only works if you have first selected a configuration to edit. Upon clicking it an Options Dialog appears with the configuration options preset. You can then change them in any way and click <tt>Save</tt> to finish editting your configuration. </li>
12+
<li>The <tt>Delete</tt> button only works if you have first selected a configuration from the left to delete. Upon clicking it you will be asked to confirm that you actually want to delete the configuration and upon clicking <tt>Yes</tt> the configuration will be removed from the list and no longer available.</li>
13+
<li>The <tt>Rename</tt> button is for changing the name of an existing configuration and is only avaliable when a configuration is selected.
14+
</li>
15+
<li>The <tt>Clone</tt> button is for creating a new configuration that is similar to an existing one. It is only avaliable when you have selected a configuration. After creating the copy you can then use the <tt>Edit</tt> button to modify it.</li>
16+
17+
</ul>
18+
Finally, at the bottom is a <tt>Run</tt> button for running a saved configuration. It is only available upon selecting a configuration. This is useful if you want to run a Soot with a particular set of options many times.</p>
19+
</body>
20+
</html>
Loading
Loading
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
<html>
2+
<body>
3+
<h3>Soot Plugin Dialogs</h3>
4+
<p>This section describes the dialogs available for running Soot, using the Soot Eclipse Plugin.</p>
5+
</body>
6+
</html>
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,15 @@
11
<html>
22
<body>
33
<h3>File Actions</h3>
4-
<p>These actions are available when you right click on a .class file, a .java file or a .jimple file. If a .java file is selected the corresponding .class file will be procesed if one can be found.
4+
<p>These actions are available when you right click on a .class file, a .java file or a .jimple file. In the Package Explorer, if a .java file is selected then there are twice as many options available: each option detailed below with src-prec java, causing the source file to be processed or src-prec class causing the corresponding class file to be procesed if one can be found. In the Navigator view (where one can actually see the class files) the options are more straightforward.</p>
5+
6+
<h5>Actions Available</h5>
57
<ul>
6-
<li>Create Jimple - Selecting this menu item will create a Jimple file corresponding to the selected file. This is not currently available.</li>
7-
<li>Dava Decompile App - Selecting this menu item will cause Soot to decompile in application mode. It only works for files with a main method.</li>
8-
<li>Soot Options - There are about 182 options that one can use to in Soot (and the number grows frequently). Selecting this menu item will display a dialog box where you can choose from all the available options. This dialog makes no assumptions about how options interact with one another. For example: if you select an option that requires another option you must also select the other option, otherwise Soot will run and give you an error message.</li>
9-
<ul>
10-
<li>Run - Runs the selected configuration.</li>
11-
<li>Close - Closes the dialog.</li>
12-
</ul>
13-
<li>Manage Soot Configurations - Selecting this menu item will display a dialog where you can create, edit, delete, etc your favorite Soot configurations.
14-
<ul>
15-
<li>New - Creates a new configuration by first asking for a name (duplicate names are not permitted) and displaying the Soot Options dialog where you will have a "Save" instead of "Run" button available.</li>
16-
<li>Edit - Displays the Soot Options dialog and allows you to make any changes (or none) and to Save them.</li>
17-
<li>Delete - Deletes the selected configuration. Don't worry, a confirmation dialog pops up when this is selected in case you didn't really mean it.</li>
18-
<li>Rename - This gives you the option to give a new name to the selected configuration.</li>
19-
<li>Clone - This gives you the ability to make an exact copy of the options in the selected configuration but with a different name.</li>
20-
<li>Run - Runs the selected configuration.</li>
21-
<li>Close - Closes the dialog.</li>
22-
</ul>
8+
<li><tt>Create Jimple</tt> - Selecting this menu item will create a Jimple file corresponding to the selected file.</li>
9+
<li><tt>Create Grimp</tt> - Selecting this menu item will create a Grimp file corresponding to the selected file.</li>
10+
<li><tt>Dava Decompile App</tt> - Selecting this menu item will cause Soot to decompile in application mode. It only works for files with a main method.</li>
11+
<li><tt>Run Soot ...</tt> - see <a href="options_dialog.html">Options Dialog</a>
12+
<li><tt>Manage Configurations ...</tt> - see <a href="config_dialog.html">Configurations Dialog</a>
2313
</ul>
2414
</body>
2515
</html>

eclipse/ca.mcgill.sable.soot.help/doc/concepts/folder_actions.html

+3-1
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,10 @@
33
<h3>Folder Actions</h3>
44
<p>These actions are available when one right clicks on a Package Fragment Root (for example a folder of classes).
55
<p>If the Package Fragment Root contains source files instead of class files Soot will not process anything. This may be changed in the future.</p>
6+
7+
<h5>Actions Available</h5>
68
<ul>
7-
<li>Dava Decompile - Selecting this menu item will cause Soot to decompile every class file in the folder, creating a new Java file for each one.</li>
9+
<li><tt>Dava Decompile</tt> - Selecting this menu item will cause Soot to decompile every class file in the folder, creating a new Java file for each one.</li>
810
</ul>
911
</body>
1012
</html>
Loading

eclipse/ca.mcgill.sable.soot.help/doc/concepts/jco_view.html

+2
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ <h3>Jimple Content Outline View</h3>
55
<p>It only (at this point) gives visual indications of public, protected, private fields, methods and classes and interfaces. It does not indicate abstract, final, static, synchronized, volatile, native or transient.</p>
66
<p>It also does not update dynamically, you must close and re-open the Jimple file to get an accurate outline and if you edit the Jimple file and then select an element in the outline it may be incorrect.</p>
77

8+
<img src="content_outline_view.png">
9+
810
<h5>Actions Available</h5>
911
<p>There are no actions available from this view.</p>
1012
</body>
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
<html>
22
<body>
3-
<h3>Jimple Editor</h3>
4-
<p>This is the only Soot related editor available. It displays Jimple files (and also Grimp files)</p>
5-
<p>This editor highlights Jimple keywords.</p>
6-
<p>It also has the capability of displaying hover help and when they exist, displays tooltip hover help about Soot attributes and markers indicating which lines contain this information.</p>
3+
<h3>Intermediate Representations (IR) Editor</h3>
4+
<p>Soot has several different IR's, some of which can be displayed using this editor. It displays Jimple, Grimp, Baf and Shimple files.</p>
5+
<p>This editor highlights keywords in the various IR's and works together with the <a href="jco_view.html">IR Editor Content Outline View</a>.</p>
6+
<img src="ir_editor.png">
7+
8+
<p>It also has the capability of displaying hover help and when they exist, displays tooltip hover help about Soot attributes and markers indicating which lines contain this information. Many more details are given in the <a href="attributes.html">Attributes</a> section.</p>
79
</body>
810
</html>
Loading
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<html>
2+
<body>
3+
<h3>Soot Options Dialog</h3>
4+
<p>This dialog gives you a way to set any of the Soot options and then run Soot. There are approximately 180 options. This dialog stays in synch with the Soot options parsing code. Each time it is opened the defaults are reset. For saving specific configurations of options see <a href="config_dialog.html">Configurations Dialog</a>.</p>
5+
6+
<img src="options_dialog.png" alt="Options Dialog"><!-- width="629" height="456"-->
7+
8+
<p>Use the tree on the left to navigate to a section of options. Change specific options in the right panel. Each option has a tooltip explaining the option. Click <tt>Run</tt> to run Soot using the options you have selected. Click <tt> Close</tt> to close the dialog without running Soot.</p>
9+
<p><h4>Note:</h4>At this time changing an option will not update other options that may be dependent on it. Hopefully this will be implemented in the future.</p>
10+
11+
</body>
12+
</html>
Loading

eclipse/ca.mcgill.sable.soot.help/doc/concepts/project_actions.html

+7-18
Original file line numberDiff line numberDiff line change
@@ -6,25 +6,14 @@ <h3>Project Actions</h3>
66
Window -&gt; Customize Perspective -&gt; Other -&gt; Soot</p>
77
<p>If the menu items are unavailable (greyed out): Select any file in the
88
Package Explorer (in the project you wish to work on) and try again.</p>
9-
<p>You must build the project before using Soot (as it works on .class files and not on .java files)</p>
9+
<p>You can run Soot either on all the classes in your project or all the source files. You must build the project before using Soot on class files.</p>
10+
11+
<h5>Actions Available</h5>
1012
<ul>
11-
<li>Create Jimple - Selecting this menu item will create Jimple files corresponding to every class file in the project.</li>
12-
<li>Dava Decompile - Selecting this menu item will cause Soot to decompile every class file in the project, creating a new Java file for each one.</li>
13-
<li>Soot Options - There are about 182 options that one can use to in Soot (and the number grows frequently). Selecting this menu item will display a dialog box where you can choose from all the available options. This dialog makes no assumptions about how options interact with one another. For example: if you select an option that requires another option you must also select the other option, otherwise Soot will run and give you an error message.</li>
14-
<ul>
15-
<li>Run - Runs the selected configuration.</li>
16-
<li>Close - Closes the dialog.</li>
17-
</ul>
18-
<li>Manage Soot Configurations - Selecting this menu item will display a dialog where you can create, edit, delete, etc your favorite Soot configurations.
19-
<ul>
20-
<li>New - Creates a new configuration by first asking for a name (duplicate names are not permitted) and displaying the Soot Options dialog where you will have a "Save" instead of "Run" button available.</li>
21-
<li>Edit - Displays the Soot Options dialog and allows you to make any changes (or none) and to Save them.</li>
22-
<li>Delete - Deletes the selected configuration. Don't worry, a confirmation dialog pops up when this is selected in case you didn't really mean it.</li>
23-
<li>Rename - This gives you the option to give a new name to the selected configuration.</li>
24-
<li>Clone - This gives you the ability to make an exact copy of the options in the selected configuration but with a different name.</li>
25-
<li>Run - Runs the selected configuration.</li>
26-
<li>Close - Closes the dialog.</li>
27-
</ul>
13+
<li><tt>Create Jimple for Project</tt> - Selecting this menu item will create Jimple files corresponding to every class or source file in the project.</li>
14+
<li><tt>Dava Decompile Project</tt> - Selecting this menu item will cause Soot to decompile every class or source file in the project, creating a new Java file for each one.</li>
15+
<li><tt>Run Soot ...</tt> - see <a href="options_dialog.html">Options Dialog</a>
16+
<li><tt>Manage Configurations ...</tt> - see <a href="config_dialog.html">Configurations Dialog</a>
2817
</ul>
2918
</body>
3019
</html>
Loading

eclipse/ca.mcgill.sable.soot.help/doc/concepts/soot_output_view.html

+5
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,16 @@ <h3>Soot Output View</h3>
44
<p>This view is where you will see the output generated while running Soot. It behaves much like the Java Console view, but it is much simpler.</p>
55
<p>You do not need to do anything special to see this view, it is created and given focus as needed. If you accidently close it and want to re-display it. You can do so by selecting Window -&gt; Show View -&gt; Other -&gt; Soot -&gt; Soot Output.</p>
66

7+
<img src="soot_output_view.png">
8+
9+
<p>The first line shown is the command line needed if you were running Soot from the command line. Subsequent lines are the Soot output.</p>
10+
711
<h5>Actions Available</h5>
812
<p>There are two actions available from the context menu in this view.</p>
913
<ul>
1014
<li>Select All - Selects all text in view.</li>
1115
<li>Copy - Copies the selected text in the view.</li>
1216
</ul>
17+
<p>Right click to access these actions.</p>
1318
</body>
1419
</html>
Loading
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
<html>
2+
<title>
3+
Soot - Eclipse Plugin Help
4+
</title>
5+
<body>
6+
<h3>Soot Tags related to the Soot - Eclipse Plugin</h3>
7+
8+
<p>A number of tags have been created to facilitate the communication between Soot and Eclipse. For more information about tags in Soot see <a href="">Tags</a>.</p>
9+
10+
<h5>JimpleLineNumberTag</h5>
11+
<p>When the options xml-attributes and output Jimple are selected a tag containing the start line number and end line number is added to each Jimple value box, statement, field and method automatically as needed. </p>
12+
13+
<h5>PositionTag</h5>
14+
<p>When the options xml-attributes and output Jimple are selected a tag containing the start column and end column is added to each Jimple value box, statement, field and method automatically.</p>
15+
16+
<h5>SourceLnPosTag</h5>
17+
<p>When the options xml-attributes and src-prec Java are selected line number and column position tags are added to each Jimple value box, statement, field and method with information indicating the position of the Java source code related to the Jimple.</p>
18+
19+
<p>These first three types of tags are generated automatically as needed and require no work for the analysis developer. The next three tags are added by the analysis developer to annotate their analysis as the like. </p>
20+
21+
<h5>StringTag</h5>
22+
<p>String tags can be attatched to a statement, field or method, and take a string as a paremeter, indicating a textual representatio of the analysis results.</p>
23+
24+
<h6>ex:</h6>
25+
<pre><tt>stmt.addTag(new StringTag(val+": "+analysisResult(val)));</tt></pre>
26+
27+
<h5>ColorTag</h5>
28+
<p>This tag must be added manually to a value box, statement, field or method. It has six predefined colors red, yellow, blue, green, orange and purple. You may use one of these or define your own using a rgb color specification. Keep in mind that dark colors make text difficult to see. In addition, you may specify whether with a boolean if the background or foreground should be coloured. By default the background is coloured.</p>
29+
30+
<h6>ex:</h6>
31+
<pre><tt>stmt.addTag(new ColorTag(ColorTag.GREEN)));</tt></pre>
32+
<h6>ex:</h6>
33+
<pre><tt>stmt.addTag(new ColorTag(245, 200, 34)));</tt></pre>
34+
<h6>ex:</h6>
35+
<pre><tt>method.addTag(new ColorTag(Color.RED, true)));</tt></pre>
36+
37+
<h5>LinkTag</h5>
38+
<p>This tag extends StringTag and takes a string for a label. It also needs a host (this is where the link is to) a className (the class that contains the host)</p><!-- and a packageName (the package that contains the class)</p>-->
39+
40+
<h6>ex:</h6>
41+
<pre>
42+
<tt>String text = "Target:"+m.toString()";</tt>
43+
<tt>Host h = m;</tt>
44+
<tt>String className = m.getDeclaringClass().getName();</tt>
45+
<tt>stmt.addTag(new LinkTag(text, h, className));</tt></pre>
46+
47+
<br>
48+
<br>
49+
</body>
50+
<html>
Loading
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
<html>
2+
<title>
3+
Soot - Eclipse Plugin Help
4+
</title>
5+
<body>
6+
<h3>Visualizations</h3>
7+
8+
<p>This page describes how attributes are visualized in the Soot Eclipse Plugin. These visual representations work in both the IR Editor and the regular Java source editor.</p>
9+
10+
<h5>Tooltips</h5>
11+
<p>When the Soot-Eclipse plugin encounters a String Tag or a Link Tag it generates a hoverHelp tooltip that becomes visible upon mousing over the corresponding line number.</p>
12+
<img src="tooltip.png" border="1">
13+
14+
<h5>Line Markers</h5>
15+
<p>When the Soot-Eclipse plugin encounters any textual attributes it places a SootAttribute marker int the vertical ruler of the editor at the corresponding line number. This is to indicate there is some information avaliable at that line.</p>
16+
<img src="sa_icon.png" border="1">
17+
18+
<h5>Region Colouring</h5>
19+
<p>When the Soot-Eclipse plugin encounters a Color Tag along with a Position Tag it colors the region specified in the Position Tag with the color specified in the Color Tag.</p>
20+
<img src="coloring.png" border="1">
21+
22+
<h5>Pop-up Navigational Links</h5>
23+
<p>When the Soot-Eclipse plugin encounters a Link Tag, not only does it display the string (label) as a tooltip but it creates a link that can be accessed by clicking on the marker at the corresponding line in the vertical ruler to the left of the editor. A popup list will popup with a list of links. Clicking on one of the links will move the focus to the link target.</p>
24+
<img src="links.png" border="1">
25+
26+
</body>
27+
</html>

0 commit comments

Comments
 (0)