Skip to content

Eclipse Workspace Configuration

Calvin Weaver edited this page Jun 8, 2023 · 31 revisions

⚠️ IMPORTANT: Ridhvl2 has received major changes since this page was written! ⚠️

Most of this information is no longer accurate with respect to Ridhvl2's master branch. A new setup guide will be created when time allows. In the meantime (if you absolutely must use the old configuration) you can switch to the legacy-lwjgl2 branch.

0. Introduction

In this wiki we'll show you the fundamentals of Ridhvl2 using Eclipse and Java 8. We're using Eclipse Neon for the images in this wiki, however other versions of Eclipse should work just fine.

This section explains how to perform the initial Eclipse workspace setup. This procedure must only be followed once and supports an unlimited number of Ridhvl2 projects.

1. Setting up Eclipse

I. Install Java 8 and the latest version of Eclipse (for Java developers). Make sure your version of Eclipse comes with EGit (generally the standard).

II. Choose a destination for your Eclipse workspace. This is where all your projects will be stored.

III. Close the Welcome tab. Navigate in the top toolbar Window > Show View > Other. From the Show View window, choose Git>Git Repositories. You should now have a Git Repositories view.

I keep this view staged at the bottom of my Eclipse editor, but wherever you choose is fine.

2. Cloning Ridhvl2

You'll need to clone Ridhvl2 to get a local version to use in your projects. Ridhvl2 doesn't use Maven or Gradle; users simply import the Eclipse project directly from the cloned repository.

I. In the Git Repositories view, click on the button that says Clone a Git Repository.

II. In the text field labeled URI, paste the following link: https://github.com/osreboot/Ridhvl2.git

The Host and Repository path text fields should be automatically filled. You'll need to enter your GitHub username and password into the Authentication section of this window.

III. Click Next twice until you get to the Local Destination section. This is where you choose a directory to store your local version of Ridhvl2. Click Browse, choose a location outside of your Eclipse workspace and then click Finish.

IV. Ridhvl2 should now appear in the Git Repositories view. Right click on it then select Import Projects. Make sure the Import existing Eclipse projects radio button is ticked and click Next.

V. Ensure the project is selected and click Finish.

If the project can't be selected then something went wrong during the cloning process. You'll need to delete the repository and try again.

VI. Verify that Ridhvl2 now appears in the Project Explorer view.

3. Configuring Static Imports

Ridhvl2 is designed to have a single class imported statically. It is highly recommended that you configure Eclipse to recognize this static import. Doing so will save you an enormous amount of unnecessary typing and ensure that you have the most streamlined experience possible.

I. Navigate in the top toolbar Window > Preferences > Java > Editor > Content Assist > Favorites.

II. Click on New Type and paste the following line: com.osreboot.ridhvl2.HvlStatics

III. Click OK. Ensure the type was successfully added and click Apply and then OK.

Congratulations! You're ready to create your first Ridhvl2 project!