Using Rodin as Target Platform: Difference between revisions

From Event-B
Jump to navigationJump to search
imported>Laurent
imported>Laurent
→‎File to Download: Put back sources.
Line 8: Line 8:
== Configuring a Target Platform ==
== Configuring a Target Platform ==


=== File to Download ===
=== Preparation ===


To configure a Rodin release as a target platform, you must first download a p2 repository of the Rodin platform.  It can be downloaded from SourceForge and is named {{file|rodin-VERSION-repo.zip}}.
To configure a Rodin release as a target platform, first download two files from SourceForge:
* {{file|rodin-VERSION-dev.zip}}: contains the Rodin platform together with its sources,
* {{file|rodin-VERSION-repo.zip}}: a p2 repository of the full Rodin platform.
 
Then, unpack the {{file|dev}} file somewhere on your hard diskThere is no need to unpack the {{file|repo}} file anywhere, as Eclipse can process it directly.


=== Definition of the Target Platform ===
=== Definition of the Target Platform ===

Revision as of 11:40, 16 December 2012

When developing plug-ins for Rodin, it is somewhat cumbersome to have to download all sources from the SVN repository, or to import them in the workspace somehow, just to be able to read them. Using a target platform is a convenient alternative. Moreover, this alternative allows to validate one's plugin against a specific version of the Rodin platform and facilitates regression testing.

Configuring a Target Platform

Preparation

To configure a Rodin release as a target platform, first download two files from SourceForge:

  • rodin-VERSION-dev.zip
    : contains the Rodin platform together with its sources,
  • rodin-VERSION-repo.zip
    : a p2 repository of the full Rodin platform.

Then, unpack the

dev

file somewhere on your hard disk. There is no need to unpack the

repo

file anywhere, as Eclipse can process it directly.

Definition of the Target Platform

Then, in Eclipse, open the Preferences pop-up window by clicking Window>Preferences. Then, select Plug-in Development>Target Platform in the tree, and click : click Add....

In the Target Definition window that pops up, select

 Nothing: Start with an empty target definition

, then click Next >. Enter a name for your target platform, for instance

Rodin 2.7

.

Then, click the Add... button of the Locations tab.

In the Add content window that pops up, select Software Site, then click Next >. In the new page, titled Add Software Site, click Add....

In the Add Repository window that pops up, click Archive… and select the repository file you have downloaded (e.g.,

Rodin-2.7-repo.zip

and click OK until you are back to the

Add Software Site window. There, untick the Group by Category checkbox, select Event-B Modeling Environment in the list and click Finish twice.

Back to the Preferences window, select the Rodin platform you have just added to activate it and click OK.

Complement to the Target Platform

If you plan to run tests with JUnit, you have to add the JUnit plug-in as a complement to your target platform. For that, edit the target platform definition from the Preferences window and select Features in the Add Content window. In the next page, click Variables... and select eclipse_home. Then, select the feature org.eclipse.jdt from the list and click Finish twice.