Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision |
student:jgrasp [2018/08/10 13:34] – created bernstdh | student:jgrasp [2018/08/10 13:46] (current) – removed bernstdh |
---|
<?xml version="1.0"?> | |
<!DOCTYPE text SYSTEM "../entities.dtd"> | |
| |
<division title="jGRASP Tips and Tricks"> | |
| |
<division title="What is jGRASP?"> | |
According to <a href="https://www.jGRASP.org/">www.jGRASP.org</a>, "jGRASP is a lightweight development environment, created specifically to provide automatic generation of software visualizations to improve the comprehensibility of software". | |
</division> | |
| |
| |
<division title="Entering Command-Line Arguments"> | |
Command-line arguments are the <code>String</code> objects that are passed to the <code>main()</code> method (as a <code>String[]</code>). They can be set/entered in several ways. | |
| |
<p> | |
One way is to click on <mouse>Build</mouse> and pull down to <mouse>Run Arguments</mouse>. This will open an entry field below the tool bar that you can use to enter the arguments (delimited by spaces) that will be passed to <code>main()</code> when you run the application. | |
</p> | |
| |
<p> | |
You can also "permanently" set the command-line arguments by clicking on <mouse>Settings</mouse>, pulling down to <mouse>Compiler Settings</mouse> and then over to <mouse>Workspace</mouse> or <mouse>File</mouse>, whichever you prefer. Then select the "Compiler" tab and the "Flags/Args" tab. The "Run" field under "FLAGS or ARGS" contains the command-line arguments. When the box next to it is selected, no arguments are passed to <code>main()</code>, when it isn't whatever arguments are in the field are passed to <code>main()</code>. | |
</p> | |
</division> | |
| |
<division title="Setting the Tab Size"> | |
To set the tab size, click on <mouse>Settings</mouse>+<mouse>CSD Window</mouse> and then select either File, Project or Workspace (depending on which you want to change). Then "unlock" the tab size slider (by clicking on the default box) and change the "Tab Size" to the value you want. | |
</division> | |
| |
| |
<division title="Changing Tabs to Spaces (and Back)"> | |
Some editors use tabs and some use spaces. This makes it a little difficult to move between editors. Most, however, allow you to switch between the two. In jGRASP: | |
| |
<enumerate> | |
<item>Select the text you want to change.</item> | |
| |
<item>Click on <mouse>Edit</mouse>+<mouse>Spaces/Tabs</mouse> and then <mouse>Tabify</mouse> or <mouse>Untabify</mouse>.</item> | |
| |
</enumerate> | |
</division> | |
| |
<division title="Using checkstyle"> | |
| |
<division title="Selecting a Checks File"> | |
In jGRASP, click on <mouse>Tools</mouse>, pull down to <mouse>Checkstyle</mouse> and across to <mouse>Settings</mouse>. In the field labeled "Checks File" navigate to the <code>.xml</code> file. Then, click on <mouse>OK</mouse>. | |
| |
<p> | |
You must exit and re-start jGRASP for the change to take effect. | |
</p> | |
</division> | |
| |
<division title="Running Checkstyle"> | |
In jGRASP, click on <mouse>Tools</mouse>, pull down to <mouse>Checkstyle</mouse> and over to <mouse>Check File</mouse> (or click on <img src="jGRASP-RunCheckstyleOnFile.png"/>). | |
</division> | |
</division> | |
| |
<division title="Cleaning-Up Indenting"> | |
jGRASP does not have a command that re-indents code, but you can trick it into doing so. | |
| |
<enumerate> | |
<item> | |
Click on <mouse>View</mouse>+<mouse>Generate CSD</mouse> (or the <img src="jGRASP-viewcsd.png" /> button). | |
</item> | |
| |
<item> | |
Click on <mouse>View</mouse>+<mouse>Remove CSD</mouse> (or the <img src="jGRASP-removecsd.png" /> button). | |
</item> | |
</enumerate> | |
</division> | |
</division> | |
| |
| |