Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
student:eclipse:help [2023/12/02 06:29] bernstdhstudent:eclipse:help [2025/11/10 12:25] (current) bernstdh
Line 8: Line 8:
  
  
-If Eclispe is running slowly you may want to increase the amount of memory allocated to it. You can do this by adding lines to the file ''%%eclipse.ini%%''. For example:+If Eclipse is running slowly you may want to increase the amount of memory allocated to it. You can do this by adding lines to the file ''%%eclipse.ini%%''. For example:
  
  
Line 20: Line 20:
  
 The first line indicates that the subsequent lines should be sent to the virtual machine as arguments. The second sets the heap space to 128Mb initially. The third sets the maximum heap space to 521Mb. The last two set the starting and maximum amount of space to use for class names, objects that are never garbage collected, etc...) to 128Mb. The first line indicates that the subsequent lines should be sent to the virtual machine as arguments. The second sets the heap space to 128Mb initially. The third sets the maximum heap space to 521Mb. The last two set the starting and maximum amount of space to use for class names, objects that are never garbage collected, etc...) to 128Mb.
 +
 +
 +==== Opening a Terminal ====
 +
 +You can open a terminal in Eclipse by clicking on <mouse>Window+Show View+Terminal</mouse>
 + and then clicking on the <mouse>Open Terminal</mouse> button and making the appropriate choices (e.g., Local Terminal, SSH, etc.) in the dialog box. 
  
  
Line 237: Line 243:
  
 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.
 +
  
  
Line 281: Line 302:
  
  
-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.