LateralGM:Developing:Import - hpgDesigns/hpgdesigns-dev.io GitHub Wiki
This page describes how to import LateralGM into the Eclipse IDE from an existing source, rather than via the Repository. This method is primarily useful for computers without internet access on which you wish to develop LateralGM anyways.
Start up Eclipse, if you haven't already. In the briefest of terms, we need to load up the LateralGM source as a project. At first hand, these may seem like fairly simple tasks, but Eclipse is a very powerful program with many menu and wizard options that you won't be using, so it's very easy to get lost in the menus and wizards. As such, this section explains how to do this, step by step.
Load up the source
We begin by creating a New Java Project which will contain our plugin's source. There are several ways to do this, any one of these is sufficient:
- Click File > New > Java Project.
- Click the New Button (first toolbar button), preferably the dropdown
arrow.
- If you click on the button but not the arrow, a wizard will ask what type of project, so select Java Project and click Next.
- If you click the arrow, simply click Java Project from the dropdown.
- Right click the area below the Package Explorer (this is the package tree) > New > Java Project.
If you don't see Java Project as an option, you probably don't have the Eclipse JDT installed, so close Eclipse, install the JDT, restart Eclipse, and try again.
Once you have done this, you will be taken to the New Java Project wizard.
Source in directory
If your plugin source is contained in a directory, we will use that directory as our project directory:
- Contents should be Create project from existing source.
- Some versions do not show this section, and instead have a Use default location checkbox. Uncheck it.
- For the location/directory, browse to the LateralGM source directory.
- Working Sets should be left as-is.
- Click Finish.
Source in lgm*.jar or .zip
If you did not extract the lgm*.jar or .zip, we will create a new blank project and import it later:
- Enter a Project Name that you like, such as LateralGM.
- Contents should be Create a new project in the workspace.
- Some versions do not show this section, and instead have a Use default location checkbox. Ensure it is checked.
- JRE may be left as-is.
- Project Layout should be Use project root..., the first option.
- Working Sets should be left as-is.
- Click Finish.
And now we import.
- In the project tree under Project Explorer, locate the new LateralGM project.
- Right Click > Import... (about halfway down the dropdown menu).
- In the wizard, expand General, and select Archive File. Click Next.
- For From archive file, browse to your lgm*.jar or .zip.
- Ensure that the folder named / is checked in the left tree pane.
- If it's only partially checked (e.g. a solid filled checkbox without a checkmark), uncheck and re-check it.
- Leave Into folder as-is.
- Check Overwrite existing resources without warning.
- Click Finish.