To get your IDE set up, import the code and be able to run TouchCORE, please follow all of these instructions.
You need Java 7 or higher. If you don't have it installed yet, install the latest version first. You can find it on Oracle's website.
It is highly recommended that you use the Java JDK. The Java Runtime Environment is not enough. The JDK contains documentation and the Java source, which will help you when developing and debugging.
Eclipse Mars is required for TouchCORE. While you may use your existing Eclipse installation, it is recommended to start off with the Eclipse Modeling Tools. If you feel comfortable enough, you can add these to your existing installation.
-
Download and install the Eclipse Modeling Tools package from eclipse.org.
Note: Due to problems you cannot use the Eclipse Installer. Download the Eclipse Modeling Tools directly instead to avoid any problems, please.
-
Unzip and start it.
-
Recommended: Create a new workspace for TouchCORE related development.
-
Go to Preferences > General > Editors > Text Editors
-
Optional: If you use Java 8 (recommended) and don't want to see the warning "Build path specifies execution environment JavaSE-1.7. There are no JREs installed in the workspace that are strictly compatible with this environment." do the following:
Preferences > Java > Compiler > Building > "No strictly compatible JRE [...]" change to Ignore
The following plug-ins are required to be installed.
The metamodel makes use of OCL for derivation, operation bodies and constraints.
- Go to Help > Install New Software.
- Select the release update site of the current Eclipse version (e.g., "Mars - " for Eclipse Mars).
- Choose OCL Samples and Editors from the Modeling category.
- Follow the instructions.
Acceleo is required by the code generation module of TouchCORE.
- Go to Help > Install Modeling Components.
- Select and install Acceleo.
Checkstyle (eclipse-cs) is used to maintain a consistent coding style across contributors within TouchCORE. You need to do the same to maintain a consistent coding style within your team and not make it harder for the evaluators/graders.
- Install Checkstyle using the update site: http://eclipse-cs.sourceforge.net/update/
- Follow the instructions.
Before you can import the projects into Eclipse, you need to clone your repository (if you forked on GitHub) or add the code to your repository (and then commit it). Since this is done by one team member, everyone else needs to clone the repository (or pull the changes) first.
- Open the Git Repository Exploring perspective.
- Clone the repository.
- Import projects from the local (cloned) repository.
- Clone the repository to a local location of your choice.
- Import the projects into your workspace in Eclipse (see link above).
Now that Eclipse and the plug-ins are installed and the projects are imported, all that is left is some configuring.
In order for Eclipse to support you with the coding style that is checked by Checkstyle, the Java Code Formatter needs to be configured.
- Go to Preferences > Java > Code Style > Formatter.
- Click on Import.
- Select the file touchram_formatter.xml located in the project ca.mcgill.sel.commons.
- Press OK.
- Go to Preferences > Checkstyle and press New.
- Select Project Relative Configuration.
- Name: TouchRAM Checks (use exactly this name [case-sensitive])
- Location: /ca.mcgill.sel.commons/touchram_checkstyle.xml
- Click on OK and confirm rebuilding all projects.
- Set this configuration as your default.
- If you weren't asked to rebuild: Go to Project > Clean... and select Clean all projects.
The code is maintained using the distributed version control system Git. You can either use the command line, your local Git client or Eclipse, which by default has Git support (EGit).
Before you start using Git you need to configure your username and email in order to be properly identified when committing.
Follow the instructions to set up your identity. Alternatively, you can do it directly in Eclipse as described in the user guide.
You're done and can now run TouchCORE (see README).