How to read Rodin projects and elements programmatically

From Event-B
Revision as of 13:53, 28 October 2008 by imported>Maria
Jump to navigationJump to search

How to read a Rodin Project

You can access an existing Rodin project using RodinCore.getRodinDB().getRodinProject("your_project_name"). This returns a handle to an IRodinProject. This project may or may not exist. Call exists on the resulting project to be sure.

An other option is calling RodinCore.getRodinDB().getRodinProjects, which returns an array with of all existing IRodinProjects.

How to read a Machine or a Context

Machines and Contexts are accessed through IMachineRoot and IContextRoot respectively. Those roots are stored in IRodinFiles.

The following method returns all existing IMachineRoots of a project: