This section of the guide covers how to open a class project in Eclipse. It is very important that you DO NOT simply open the class project: instead, you must import the project using the following steps.
You should also make sure you're connected to the internet when performing these steps. When you're importing the project, Eclipse will automatically try and download some libraries you need to run your code.
If you have not already done so, follow step 4 of the Eclipse setup instructions to set up SSH keys on your machine and add them to Gitlab.
First, navigate to the Gitlab page of your project. For homework 1 summer 2018, it should be located at https://gitlab.cs.washington.edu/cse373-18su-hw1/hw1-YOUR_NET_ID
Under the name of the project, there is a text box with a dropdown to its left. Make sure the dropdown says "SSH", then copy the string in the textbox. It should look something like "git@gitlab.cs.washingt.n.edu:...".
Run Eclipse. Select the "File" > "Import" option from the menu:
Select the "Git" > "Projects from Git" option and click next.
Select the "Clone URI" option and click next.
Now paste the string you copied from Gitlab into the "URI" text field (Eclipse may paste it automatically). The rest of the text fields will automatically populate themselves, click "Next", and then "Next" again.
You should now be at a page called "Local Destination".
Here you can set the directory you would like the project to be downloaded to. Remember (copy) which directory you choose, you will need it later. Click "Next" again once you have chosen a location for your project.
On this page, some time will pass as a green bar fills up at the bottom. This is Eclipse downloading your project to the location you have selected. Once this is finished, you should be at a page that looks like this:
IMPORTANT: click "Cancel" to exit the wizard. We need to exit now because the Git wizard does not know how to import Gradle projects properly.
Select the "File" > "Import" option from the menu again:
Select the "Gradle" > "Existing Gradle Project" option.
Hit "Ok" and "Next" until you encounter the below dialog (it may start on this page if this is not your first Gradle import). Click the "Browse" button:
Here is where you need the directory your project was downloaded to. Navigate to where your Gitlab project is located and select it.
IMPORTANT: when you unzip the project files, you may end up creating two nested folders, both named "project1". When selecting your project, be sure to pick the innermost folder – that is, pick the folder that contains the "src" folder, the "build.gradle" file, etc...
For example:
Click through the rest of the wizard using the default settings and click "Finish". Importing a Gradle project can take a bit of time. There may be a green progress bar in the bottom right corner of your screen. Eventually, your project will appear in the "Package Explorer" panel of Eclipse, next to your other projects. You will also notice that the project name has a yellowed-out "[repository-name master]" next to it. This tells you that the project is under version control.