Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision | ||
student:eclipse:help [2022/09/06 14:25] – stewarmc | student:eclipse:help [2024/03/19 15:50] – [Counting Lines of Code (LOC)] bernstdh | ||
---|---|---|---|
Line 67: | Line 67: | ||
Eclipse projects can be exported as '' | Eclipse projects can be exported as '' | ||
+ | |||
+ | |||
+ | === Converting a Generic Project to a Java Project === | ||
+ | |||
+ | Eclipse has many different kinds of projects. Java projects have a " | ||
+ | |||
+ | - Right-clicking on the project icon in the package explorer. | ||
+ | - Pulling down to " | ||
+ | - Selecting " | ||
+ | - Clicking on < | ||
+ | - Select " | ||
+ | |||
=== Customizing the Formatter === | === Customizing the Formatter === | ||
Line 99: | Line 111: | ||
=== Creating Packages === | === Creating Packages === | ||
- | Some courses require that code within a package | + | Some courses require that code within a project |
- Right-click on the appropriate project (in the package explorer). | - Right-click on the appropriate project (in the package explorer). | ||
Line 107: | Line 119: | ||
- Unless you are explicitly told to do so, **do not** check the " | - Unless you are explicitly told to do so, **do not** check the " | ||
+ | Subpackages can be created by including a dot/period in the name. So, for example, if you have a %%data%% package you can create a subpackage named %%data.io%% simply by including the dot/period in the name when you create it. However, note that Eclipse will not visually put the %%io%% package insides of the %%data%% package (though it will put the corresponding %%io%% directory/ | ||
=== Creating Files === | === Creating Files === | ||
Line 120: | Line 133: | ||
- Pull down to < | - Pull down to < | ||
- Pull over to < | - Pull over to < | ||
- | - Enter the name of the package in the " | + | - Enter the full name of the package |
- Enter the name of the class in the " | - Enter the name of the class in the " | ||
- Optionally, complete the other fields and make the appropriate selections. | - Optionally, complete the other fields and make the appropriate selections. | ||
Line 156: | Line 169: | ||
To instruct Eclipse to use them when compiling and executing you should: | To instruct Eclipse to use them when compiling and executing you should: | ||
- | - Create a directory/ | + | - Create a directory/ |
- Copy or download the '' | - Copy or download the '' | ||
- Open Eclipse. | - Open Eclipse. | ||
Line 167: | Line 180: | ||
* < | * < | ||
* < | * < | ||
- | - Navigate to the appropriate location and select | + | - Navigate to the appropriate location |
- | - Complete the rest of the process. | + | - Click on < |
- You may need to close and re-open the project for the files to be found. | - You may need to close and re-open the project for the files to be found. | ||
Remember, if you only have the byte code, you will not be able to edit these "third party" classes, but you will be able to use them in your source code. | Remember, if you only have the byte code, you will not be able to edit these "third party" classes, but you will be able to use them in your source code. | ||
+ | |||
+ | == Troubleshooting == | ||
+ | If in trying to run your project you get a '' | ||
Line 221: | Line 237: | ||
To find a matching curly bracket (either opening or closing) type < | To find a matching curly bracket (either opening or closing) type < | ||
+ | |||
+ | |||
+ | ==== Counting Lines of Code (LOC) ==== | ||
+ | |||
+ | Though there are several software metrics plug-ins available, there is an easy " | ||
+ | |||
+ | - Click on < | ||
+ | - Enter %%'' | ||
+ | - Check the " | ||
+ | - Enter '' | ||
+ | - Select the appropriate scope | ||
+ | - Click on < | ||
+ | |||
+ | The top line of the " | ||
+ | |||