|
| 1 | +# Lesson 11 |
| 2 | + |
| 3 | +## Homework |
| 4 | + |
| 5 | +* Do the [housekeeping exercise](#housekeeping). |
| 6 | +* Continue working on [Lesson 10][lesson-10] homework assignment on **Applying SOLID Principles**. |
| 7 | +* No additional assigned book reading. |
| 8 | + |
| 9 | +## Housekeeping |
| 10 | + |
| 11 | +To help you complete the homework, I've updated the devcontainer configuration to provide some useful refactoring tools that will save you a substantial amount of time. Please read and follow these instructions carefully to get the latest goodness: |
| 12 | + |
| 13 | +1. First, sync your fork and pull changes to your local machine. |
| 14 | +2. Open the project folder BUT do not click the button to rebuild the container when prompted. |
| 15 | +3. Press `Cmd ⌘ - Shift ⇧ - P` to open the Command Palette. Search for and execute the `Dev Containers: Rebuild Container Without Cache` option. If you get an error while attempting to start the container, just click `Retry` and it should move forward. |
| 16 | + |
| 17 | + |
| 18 | + |
| 19 | +4. Let everything run for a couple of minutes to allow the extensions time to install. |
| 20 | +5. Next, uninstall the _[Extension Pack for Java][extension-pack]_ extension if it is still installed in VS Code. |
| 21 | +6. At this point, you should now be using the improved _[Java Platform Support][java-platform]_ extensions that provide more reliable refactoring and unit testing support. |
| 22 | + |
| 23 | +## Using VS Code Refactoring Tools |
| 24 | + |
| 25 | +Once you have the new tools setup, you should now be able to do things like rename a function or variable and update it everywhere it is used. You can [watch this YouTube video][renaming-video] to understand how this tooling works. |
| 26 | + |
| 27 | +## Troubleshooting |
| 28 | +If you still run into issues here are some things you can try: |
| 29 | + |
| 30 | +* Close VS Code and restart |
| 31 | +* Clean the language server workspace by opening the Command Palette (`Cmd ⌘ - Shift ⇧ - P`) and searching for the `Java: Clean Workspace` option. |
| 32 | + |
| 33 | + |
| 34 | + |
| 35 | +[lesson-10]: /lesson_10#applying-solid-principles-library-management-system-part-ii |
| 36 | +[extension-pack]: vscode:extension/vscjava.vscode-java-pack |
| 37 | +[java-platform]: vscode:extension/Oracle.oracle-java |
| 38 | +[renaming-video]: https://www.youtube.com/watch?v=S1Jzrmw0ww8 |
0 commit comments