Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision |
student:eclipse:help [2023/12/02 06:29] – bernstdh | student:eclipse:help [2024/03/25 17:24] (current) – bernstdh |
---|
| |
To find a matching curly bracket (either opening or closing) type <key>Ctrl</key>+<key>Shift</key>+<key>P</key>. | To find a matching curly bracket (either opening or closing) type <key>Ctrl</key>+<key>Shift</key>+<key>P</key>. |
| |
| |
| ==== Counting Lines of Code (LOC) ==== |
| |
| Though there are several software metrics plug-ins available, there is an easy "hack" for counting lines of code. |
| |
| - Click on <key>Search</key>+<key>File</key> |
| - Enter ''\n'' (to count all lines) or ''\n[\s]*'' (to count non-blank lines) in the "Containing text:" field |
| - Check the "Regular expressions" checkbox |
| - Enter ''*.java'' (or other file type) in the "File name patterns" field |
| - Select the appropriate scope |
| - Click on <key>Search</key> |
| |
| The top line of the "Search" panel will show the total number of matches (i.e., lines). You can also get matches/counts by package, file, etc. |
| |
| |
| |
| |
| |
In Eclipse, applications are started using the <key>Run</key> button or the "Run" menu. | In Eclipse, applications are started using the <key>Run</key> button or the "Run" menu. They are configured from the 'Run" menu using the "Run Configurations..." option. |
| |
| |
| === Run Configurations === |
| |
| There are different kinds of run configurations, the two most important are configurations for Java Applications and configurations for JUnit tests. |
| |
| To create a run configuration, select the appropriate type and click on the [New launch configuration] button (that looks like a blank sheet with a + in the upper-right corner). Then, fill in the name and other relevant information. For Java Applications, the most important information is entered on the "Main" tab. For JUnit tests, the most important information is entered on the "Test" tab. |
| |
| |