Skip to content

Setting up Eclipse for Rodin feature development

Dr Colin Snook edited this page Aug 31, 2022 · 9 revisions

Introduction

This page describes how to install and set up Eclipse for Rodin plugin development. In general, we use the latest version of Eclipse as the development platform for developing Rodin, plug-ins and the (possibly older) version of Eclipse on which Rodin is based. The Eclipse version used for the development platform must not be older than that on which Rodin is based. Currently, at the time of writing (August 2022), the following Eclipse platform versions are used.

  • Eclipse IDE 2022-06 (Modelling package)

  • Rodin 3.7.0 (built with Eclipse 2021-12)

Installing the latest Eclipse

The latest version of Eclipse can be downloaded from http://www.eclipse.org/downloads/packages/. We are going to use the Modeling Tools package. Download and follow the instructions to install Eclipse on your operating system.

Installing API Tools into Eclipse

We now can install additional development plugins, e.g.,API Tools Execution Environment Descriptions into the newly installed Eclipse. The following instructions are tested for Eclipse 2022-06 Modelling.

  • Launch Eclipse

  • Go to Menu Help -> Install New Software

  • From the dialog, from the dropdown list for Work with: select e.g., 2022-06 - https://download.eclipse.org/releases/2022-06/.

  • In the text field below, type API Tools, and a list of features matching API Tools will be shown.

  • Select API Tools Execution Environment Descriptions (e.g., 1.0.800.v2020114-1512), and click Next

  • Review the list of features then choose Next from the dialog page

  • Accept the license agreement and choose Finish from the dialog page

  • Choose Restart Now to restart Eclipse (tip: you can skip this and do one restart after installing XText below).

Installing Eclipse Releng Tools into Eclipse

The following instructions are tested for Eclipse 2022-06 Modelling.

  • Launch Eclipse

  • Go to Menu Help -> Install New Software

  • From the dialog, from the dropdown list for Work with: select e.g., The Eclipse Project Updates - https://download.eclipse.org/eclipse/updates/4.24.

  • Change the above address to The Eclipse Project Updates - https://download.eclipse.org/eclipse/updates/4.19 by editing the address (Eclipse Releng Tools is last packaged in Eclipse 4.19)

  • In the text field below, type Releng, and a list of features matching Releng will be shown.

  • Select Eclipse Releng Tools (e.g., 3.11.100.v20210205-2106), and click Next

  • Review the list of features then choose Next from the dialog page

  • Accept the license agreement and choose Finish from the dialog page

  • Choose Restart Now to restart Eclipse (tip: you can skip this and do one restart after installing XText below).

Installing XText into Eclipse

The following instructions are tested for Eclipse 2022-06 Modelling.

  • Launch Eclipse

  • Go to Menu Help -> Install New Software

  • From the dialog, from the dropdown list for Work with: select e.g., 2022-06 - https://download.eclipse.org/releases/2022-06/.

  • In the text field below, type XText, and a list of features matching XText will be shown.

  • Select Xtext Complete SDK (e.g., 2.27.0v20220530-0508), and click Next

  • Review the list of features then choose Next from the dialog page

  • Accept the license agreement and choose Finish from the dialog page

  • Choose Restart Now to restart Eclipse.

Setting up the Copyright tool template and options

  • Go to Preferences
  • Go to Copyright Tool (You can use copyright as a filter keyword).
  • Replace the Copyright template with the following
Copyright (c) ${date} University of Southampton.

This program and the accompanying materials
are made available under the terms of the Eclipse Public License 2.0
which accompanies this distribution, and is available at
https://www.eclipse.org/legal/epl-2.0/

SPDX-License-Identifier: EPL-2.0

Contributors:
    University of Southampton - initial API and implementation
  • Check the box Replace all existing copyright comments with this copyright template.

  • Click Apply and Close to close the Preferences dialog.

Setting up the Target Platform

We recommend using the pre-built Target Bundle from Rodin Bundles. The latest bundle can be found here.

  • Download the Target Bundle (e.g., TG2206) for your operating system.

  • Extract the downloaded target bundle.

  • Install Atelier-B Prover into the Rodin target bundle

    • Launch the Rodin target bundle
    • Go to Menu Help -> Install New Software
    • From the dialog, from the dropdown list for Work with: select Atelier B Provers - http://methode-b.com/update_site/atelierb_provers.
    • Select Atelier B provers (e.g., 2.3.0.416736), and click Next
    • Review the list of features then choose Next from the dialog page
    • Accept the license agreement and choose Finish from the dialog page
    • Choose Restart Now to restart Rodin.
  • Launch Eclipse (e.g., Eclipse 2022-06 Modelling)

  • Go to Preferences

  • Go to Plug-in Development -> Target Platform (You can use target as a filter keyword).

  • Choose Add to open the New Target Definition dialog (Target Definition page).

  • Select Nothing and choose Next to the Target Content page.

  • Choose a name for the new target platform, e.g., Rodin 3.7.0 TG2206.

  • Choose Add to open the Add Content dialog (Add Content page).

  • Select Installation and click Next to the Add Installation page.

  • Choose Browse and browse to the Rodin target platform (on MacOSX, it is the Contents/Eclipse folder in the application. For Windows select the \rodin\plugins folder), choose Open to close the Add Content dialog and return to the New Target Definition dialog.

  • Choose Finish to close the New Target Definition dialog to return to the Preference dialog.

  • Select the new target platform, then choose Apply and Close (a full rebuild of the workspace (possibly empty) is automatically launched).

Setting up the API Baseline

We recommend using the pre-built Baseline Bundle from Rodin Bundles. The latest bundle can be found here.

  • Download the Target Bundle (e.g., BL2206) for your operating system.

  • Extract the downloaded target bundle.

  • Launch Eclipse (e.g., Eclipse 2022-06 Modelling)

  • Go to Preferences

  • Go to Plug-in Development -> API Baselines (You can use baseline as a filter keyword).

  • Choose Add Baseline ... to open the New API Basline dialog (API Baseline page).

  • Select An existing Eclipse installation directory and choose Next.

  • Choose a name for the new target platform, e.g., Rodin 3.7.0 BL2206.

  • Choose Browse and browse to the Rodin basline platform (on MacOSX, it is the Contents/Eclipse folder in the application. For Windows select the \rodin\plugins folder), choose Open to close the Add Content dialog and return to the New API Baseline dialog.

  • Choose Finish to close the New API Baseline dialog to return to the Preference dialog.

  • Select the new API Baseline (if not selected already), then choose Apply and Close (a full rebuild of the workspace (possibly empty) is automatically launched).