Installing the Eclipse[2] platform

MONTAGES XOCL
QUICK STARTUP
WHAT IS THIS XOCL ALL ABOUT
XOCL (www.xocl.org) is an open source project based on the Eclipse Modeling Framework that aims to
bring domain modeling out of the inner circle of IT specialists to business analysts and managers.
XOCL greatly simplifies the usage of standard EMF by encouraging best practices and improving user
interface.
This document describes how to install XOCL on your computer and guides you through a live example of its
capabilities.
WHAT DO YOU NEED
In order to run the provided example you need:

A working connection to the internet, to download Java, Eclipse and XOCL frameworks.

The thinktank.ecore file. This provides a business model example.

The Montages.thinktank file. This is a concrete example of a company which is modeled
accordingly to the model above. In modeling terms, this is referred to as an instance of the
model.
OVERVIEW
The rest of the document will guide you through the necessary steps to setup your first XOCL example:
Montages AG – http://www.montages.com
Page 1
1. Installing the Java platform.
TM
All of the modeling tools provided are based on the Java
be already installed on your computer.
platform, which in most cases should
2. Installing the Eclipse platform.
This will constitute the basis for the whole modeling environment.
3. Installing the XOCL framework.
Montages XOCL builds a professional, easy to use, modeling framework on top of Eclipse.
4. Creating an XOCL project by importing the provided model example.
5. Opening an example that shows how the provided model is used to model a real-case
company.
STEP BY STEP
1
INSTALLING THE JAVA PLATFORM

Go to the Java website:
http://www.java.com/en/download/installed.jsp
The online tool provided there will check if latest Java version is installed on your machine.
Should this not be the case, follow on-screen instructions to download and install latest Java
version.
2
INSTALLING THE ECLIPSE PLATFORM

Go to:
1
Java is open source software provided by Oracle.
2
Eclipse is open source software provided by the Eclipse Foundation.
Montages AG – http://www.montages.com
Page 2
http://www.eclipse.org/downloads/packages/release/galileo/sr2
and download the Eclipse Classic ZIP file.

Right-click on the downloaded ZIP file and choose “Extract All…”.

Extract Eclipse to your C: drive .
Check “Show extracted files…” and click “Extract”.
Files will be extracted and a file explorer will open showing the extracted files.

Open the eclipse folder and launch the Eclipse IDE by double clicking on it.
3
3
Eclipse can be extracted to any folder, is strongly suggested to avoid folders with spaces in their names or that
are rooted too deeply in the file system hierarchy.
Montages AG – http://www.montages.com
Page 3

Make sure you have the latest version of Eclipse by choosing: “Help > Check for Updates” from
the Eclipse main menu.
If any update is available, follow the on-screen instructions to download and install it
automatically.
INSTALLING XOCL FRAMEWORK

Choose “Help > Install New Software...” from the Eclipse main menu.
Montages AG – http://www.montages.com
Page 4

On the Install dialog, click the “Add…” button.

Enter the Montages website URL: http://eclipse.montages.com/org.xocl.update and click “OK”.

Check the XOCL bundle and then choose “Next >” button.
Montages AG – http://www.montages.com
Page 5

Review the list of items being installed and press “Next >” button.

Accept licenses agreements and choose “Finish”.
Montages AG – http://www.montages.com
Page 6
4
Ignore warnings for unsigned packages :
Accept the Eclipse certificate:

Finally, restart Eclipse so the desired modifications will take place.
4
XOCL bundle is provided without a digital signature, this triggers a warning that can be safely ignored.
Montages AG – http://www.montages.com
Page 7
CREATING AN XOCL PROJECT

Start up Eclipse.
The first time it opens, a Welcome screen is shown. Please close it by clicking the close icon in
the Welcome tab.

You will be presented with the main Eclipse interface; this is called the Eclipse Workbench.
On the left there is the (currently empty) list of the projects you created.

To create a new project within Eclipse choose “File > New > Other…” from the main menu.
Montages AG – http://www.montages.com
Page 8

In the New Project Wizard, choose “XOCL > XOCL Project”, then click “Next >” button.

In the next page, enter a project name, make sure you choose to create the project from an
existing ecore (ecore files are files that contain a model description), then click “Next >” button.
Montages AG – http://www.montages.com
Page 9

In the next page, click “Browse File System”, then locate thinktank.ecore file provided as
an example model.
Make sure that the check boxes are set as shown in the image below, then click “Finish".

In a while, the provided model will be copied into a new project.
Furthermore, Java code necessary to run the model (as seen below) is automatically generated;
four new projects will be added to the Eclipse workbench.
Open the main project with a double click, under the “model” folder the sample model can be
found and it can be opened in the editor by double clicking on it.
Montages AG – http://www.montages.com
Page 10

Inside the editor, open the model root by double clicking on it, a list of tables settings will
appear.
These settings are automatically-generated editor settings and can be ignored for now.
The actual model can be found by scrolling at the end of the file.

Opening the project node, you’ll be presented with the actual model.
Montages AG – http://www.montages.com
Page 11

Please refer to the XOCL tutorial to learn how to create and edit models.
OPENING AN EXAMPLE

Click on the drop-down arrow next to “Run” icon, then choose “Run Configurations…”.

In the Run configurations dialog, under “Eclipse Application” there will be a run configuration
named after your project. Select it then click “Run” button.
Montages AG – http://www.montages.com
Page 12

A new Eclipse workbench will appear.
Inside this new workbench you will create and edit instances of your models.
To create a new instance of the thinktank example model, just right click on the (empty) test
project in the workbench e choose “New > Other…” from the pop-up menu.

In the Wizard dialog, choose “Thinktank Model”, then click “Next >” button.
Montages AG – http://www.montages.com
Page 13

In the next page, leave default options and click “Finish”.

The newly created model will appear in the editor.
Please refer to the XOCL tutorial to learn how to edit models using Montages table editor.

You can also open the sample instance provided, just choose “File > Open File…” from the
main menu and open the provided Montages.thinktank file.
Montages AG – http://www.montages.com
Page 14

The file will open in the main editor.
Montages AG – http://www.montages.com
Page 15