Contents

Installing Prerequisites

In order to work on b3 you'll need to install prerequisites described in the following paragraphs. (In the order they are presented in this document.)

Eclipse

The first thing you'll need is the Eclipse 3.6 IDE for your platform. Here is a pointer (if you don't get it by heart yet) to the download page: http://www.eclipse.org/downloads/ Grab the Classic version at the very bottom and unpack the archive into a convenient path.

Git support

Git support is needed simply because the b3 sources are kept in an Git repository.

open the Help / Install New Software wizard

browse the Indigo repository

expand the Collaboration category

select the Eclipse EGit and Eclipse JGit entries

click through the other pages of the install wizard to finish the installation

EMF

EMF is the first of dependencies of b3, to install it follow these instructions:

open the Help / Install New Software wizard

browse the Indigo repository

expand the Modeling category

select the 'Ecore Tools SDK

select the EMF - Eclipse Modeling Framework SDK

click through the other pages of the install wizard to finish the installation

click through the other pages of the install wizard to finish the installation (you will need to acknowledge installation of unsigned software as some of the installed components are not signed)

The Xtext completes the installations so please restart the workbench as recommended this time!

If you are running on a 64 bit machine, a build after 20100503 will be required (soon) as there are pending changes that will cause "static intitializer exceeds size limit" errors otherwise. You can get nightly builds at http://download.itemis.com/updates/nightly/

Preparing The Workspace

In order to keep the code clean and to avoid merge problems, b3 projects should be organized with unified code style and formatting rules. Unfortunately not all the settings are available as project specific. This is why a workspace template should be used before any source code is checked out. Follow the steps below to initialize your workspace properly:

switch to the Package Explorer view and open the /src-b3/smoketestFunctionArithmetic.b3 file in the checked out project

the file should open in an editor supporting syntax highlighting

there should be an outline view with a root node of BeeModel

right click the BeeModel node in the outline view a select the Run Main Function option

a console window with the following content should show up:

Running the main function...
Result = true

Congratulations, you have just executed your first b3 code!

Running b3 JUnit tests

B3 has a JUnit runner that runs b3 scripts as JUnit tests. There are many tests written in b3. There is a launch configuration for running the tests - it is found here /org.eclipse.b3.beelang.tests/AllB3Tests - headless.launch - simply use this launch configuration to get the correct configuration.

At the time this instruction was updated there are three outstanding failures in the test (for which there are bugzillas logged) - one failure because repository syntax has changed and impl is not yet working, and two are related to b3's java integration.