Developers Guide: Setting Up Your IDE - skratchdot/open-electribe-editor GitHub Wiki

Summary

This guide will show you how to compile the source code for "Open Electribe Editor" using the Eclipse IDE. It was written using Ubuntu 10.10, but the steps should be basically the same for Windows or Mac users.

STEPS

Step 1

Download Eclipse by visiting http://www.eclipse.org/downloads/. Since we make use of EMF, you will need to download the "Eclipse Modeling Components" version.

images/ide/01.png

Step 2

If your download does not start automatically, choose a download mirror.

images/ide/02.png

Step 3

Save the archive to your downloads folder: ~/Downloads

images/ide/03.png

Step 4

Open a terminal window by using the following path in the menubar:

Applications->Accessories->Terminal  

Now we'll switch to a superuser by entering the following command in the terminal (you will have to enter your root password afterwards):

sudo -s

images/ide/04a.png

Now change to the directory where we downloaded Eclipse to. In the terminal type the following command:

cd ~/Downloads

images/ide/04b.png

Now extract the Eclipse download to the /opt folder by entering the following command in the terminal:

tar -xvf eclipse-modeling-helios-SR2-incubation-linux-gtk.tar.gz && mv eclipse /opt

images/ide/04c.png

Change to the newly created Eclipse directory by entering:

cd /opt/eclipse

images/ide/04d.png

Now we can exit the terminal by entering:

exit

Step 5

Now right-click on the Desktop and select "Create Launcher".

images/ide/05a.png

Fill the following fields:

Type: Application
Name: Eclipse EMF 3.6
Command: /opt/eclipse/eclipse
Comment: Leave empty
(optional): click the icon button, and choose the following icon: /opt/eclipse/icon.xpm

images/ide/05b.png

Step 6

Now double-click on the desktop launcher you just created.

Step 7

When asked for a workspace, you can leave the default, and click OK: /home/[username]/workspace

images/ide/07.png

Step 8

Now we can install eGit (http://download.eclipse.org/egit/), by adding a new update site in Eclipse:

a) In Eclipse, open the "Install New Software" dialog: "Help"->"Install New Software..."

images/ide/08a.png

b) When the "Install New Software" dialog opens, click the "add" button.

images/ide/08b.png

c) When the "Add Repository" dialog opens, enter the following information:

Name: eGit
Location: http://download.eclipse.org/egit/updates 

images/ide/08c.png

d) Back in the "Install New Software" dialog, click the "Select All" button.

images/ide/08d.png

e) Click the "Next" button.

images/ide/08e.png

f) Click the "Next" button, and Accept the license agreement.

images/ide/08f.png

g) Click the "Finish" button.

images/ide/08g.png

Step 9

Click the "Restart Now" button.

images/ide/09.png

Step 10

Now we can import the source code from GitHub:

a) "File"->"Import"->"Git"->"Projects from Git", and click "Next".

images/ide/10a.png

b) Click the "Clone" button.

images/ide/10b.png

c) Enter the following information, and click the "Next" button:

URI: https://github.com/skratchdot/open-electribe-editor.git
HOST: github.com
REPOSITORY PATH: /skratchdot/open-electribe-editor.git
PROTOCOL: https

images/ide/10c.png

d) Make sure "master" is checked, and click the "Next" button.

images/ide/10d.png

e) Choose the directory "/home/[username]/open-electribe-editor", and click the "Finish" button.

images/ide/10e.png

f) Select the repository you just cloned, and click the "Next" button.

images/ide/10f.png

g) Choose "Import Existing Projects" and click "Next".

images/ide/10g.png

h) Click "Select All", then click "Finish".

images/ide/10h.png

Step 11

Close the Welcome screen to get to your workbench.

images/ide/11.png

Step 12

Expand the "com.skratchdot.electribe.model.esx.editor" project.

a) Right-Click on the "OpenElectribeEditor.product.launch" file and choose: "Run As"->"OpenElectribeEditor.product"

images/ide/12a.png

b) An error should have occured. Now try something similar, except Right-Click on the "OpenElectribeEditor.product.launch" file and choose: "Run As"->"Run Configurations".

images/ide/12b.png

c) Click on the "plugins" tab.

images/ide/12c.png

d) Click the "Deselect All" button. Now click the "Add Required Plugins" button multiple twice.

images/ide/12d.png

e) Click the "Run" button. The program should compile and "Open Electribe Editor" should open up.

images/ide/12e.png