Developer FAQ: Difference between revisions
imported>Tommy |
imported>Tommy |
||
Line 33: | Line 33: | ||
* For the Location, select the place where you unpacked Eclipse 4.4 and click {{Button|Finish}}. | * For the Location, select the place where you unpacked Eclipse 4.4 and click {{Button|Finish}}. | ||
* Then, click {{Button|Finish}} to close the target content popup and finally select the just defined target platform to activate it and click {{Button|OK}} in the {{Menu|Preferences}} window. | * Then, click {{Button|Finish}} to close the target content popup and finally select the just defined target platform to activate it and click {{Button|OK}} in the {{Menu|Preferences}} window. | ||
The workspace normally build itself against this newly defined target platform. If it is not the case, please select {{Button|Project > Clean...}}, select {{Button|Clean all projects}} and click {{Button|OK}}. | |||
You have finished installing the core development environment. Please see below for accessing the source files from Git. | You have finished installing the core development environment. Please see below for accessing the source files from Git. |
Revision as of 15:50, 19 May 2015
How to contribute?
What are the main community channels?
Beside the mailing lists, you may want to follow:
- the #rodin channel on irc://irc.freenode.net
- the commit RSS feed on cia.vc,
- one of the sourceforge RSS feed,
- the Main Page of this very site.
The Village Pump may also be useful for everything which is more or less wiki related.
How do I report a bug or a feature request?
You may use sourceforge bug and feature tracker. Please verify that your bug has not already been reported before submitting it.
You may want to submit a partial or full log which you can find in the following file
under the rodin workspace (generally
).
How to setup an environment for core platform development?
To develop on the core platform, you will need to proceed as follows. Please note that this is specific to core platform development. If you rather intend to develop a plug-in see the next point which is much simpler.
First, you have to download the files that will constitute your development target platform:
- the Eclipse SDK for your OS from Eclipse 4.4.(0),
- the Delta Pack from the same location,
Then, in some stable directory (it will need to last as long as you are developing on Rodin core), unpack these two files in the same place (the second will overwrite some files).
You need to download and install Eclipse 4.4.2 as your development IDE. After installation, please proceed with the following steps:
- Click . Then, select the site and select the feature and install it.
- Click , type target in the search box in the upper-left corner and select in the tree and click in the pane.
- In the popup, click (start with ), then enter a name such as Eclipse 4.4.0.
- Then, click again. In the new popup, select and click .
- For the Location, select the place where you unpacked Eclipse 4.4 and click .
- Then, click to close the target content popup and finally select the just defined target platform to activate it and click in the window.
The workspace normally build itself against this newly defined target platform. If it is not the case, please select
, select and click .
You have finished installing the core development environment. Please see below for accessing the source files from Git.
How to setup an environment for plug-in development?
You first need to download the Rodin developer archive from SourceForge. It is the file named
located in the appropriate sub-directory of [1].
You need to download and install Eclipse 4.3.2 for your development OS. After installation, please proceed with the following steps:
- Click , type target in the search box in the upper-left corner and select in the tree and click in the pane.
- In the popup, click (start with ), then enter a name such as Rodin 3.x.
- Then, click . In the new popup, select "Software Site" and click .
- In the "Work with" text entry, enter the full path to the downloaded Rodin developer archive, then select the category and click .
- Then, click to close the target content popup and finally select the just defined target platform to activate it and click in the window.
You have finished installing the plug-in development environment. You are ready to start plug-in development.
Linux troubleshooting
If you experience crashes launching Eclipse, it might be this bug: https://bugs.eclipse.org/bugs/show_bug.cgi?id=404776 Workaround proposed there is to add
-Dorg.eclipse.swt.browser.DefaultType=mozilla -Dorg.eclipse.swt.browser.XULRunnerPath=/usr/lib[64]/xulrunner/
to your eclipse.ini file, adapting the path to your installation.
How do I get current source code?
You may get the whole Rodin Platform and most of associated Rodin Plug-ins from SourceForge.
To compile the core platform from sources fetched from Git, download the latest stable version of Eclipse Classic and install the EGit plug-ins. Then, follow this procedure to fetch the source plug-ins:
- click
- select and click
- select and click
- in the URI field, enter git://git.code.sf.net/p/rodin-b-sharp/rodincore and click
- select the branches you are interested in and click
- configure local paths (default configuration is generally fine) and click
- the clone operation takes around a quarter of an hour
- select and click
- All available projects are listed and selected, click
Then all projects of the Rodin platform have been retrieved from Git into your workspace.
Note: in order to compile without errors, you may need to
- set preference
- clean build
- refresh projects ast, seqprover and pptrans (because of generated source files)
How do I launch the Rodin Platform from Eclipse?
Normally, you should be able to launch the Rodin Platform by launching Rodin.product in org.rodinp.platform as an Eclipse application. At the time of writing (June 11, 2009), the platform crashes, because not all the required plug-ins are included.
A workaround is to include all workspace and enabled target plug-ins in the run configuration:
- go to run -> run configurations
- select the newly generated run configuration
- go to the tab "plug-ins"
- Choose: "launch with: all workspace and enabled target plug-ins in the run configuration"
How can I access or create Rodin elements like projects, components or proofs?
This section illustrates some of the things you are likely to want to do in your plug-ins if you are extending the Rodin platform.
- How do I start a new development ? See the Procedure for developing, reviewing and publishing a plugin.
- How to read Rodin projects and elements programmatically.
- How to create Rodin projects programmatically.
- How to access Proof Obligations.
- How to add automatic or manual inference reasoners.
- How to add automatic or manual rewrite reasoners.
- How to make extensions to Rodin features.
How do I propose a patch?
You may find useful directions and good practises in the page describing how to submit patches.
Developer FAQ
How can I get the sources of the Rodin platform?
There are two options for getting the sources of the Rodin platform:
- The safe option is to download the source bundle which is made available with each platform release. This ensures that you will get a consistent set of source files, albeit maybe a bit outdated.
- The other option is to fetch the sources from Subversion, which allows to get their latest version. The Rodin developers strive for keeping theses sources usable (i.e. they should always compile and pass unit tests), but breakage can happen.
Installing the source bundle in Eclipse
To install the bundled sources, you first have to download the bundle from SourceForge. It takes the form of a ZIP file named rodin-VERSION-sources.zip. Then, in Eclipse, click
In the Import popup, select and click . Then tick and enter the path to the source bundle you have just downloaded. Ensure that all projects are ticked and click . Your workspace gets populated with the source projects of the Rodin platform and Eclipse starts building.Installing the sources from Git in Eclipse
See How do I get current source code?
Using Rodin as Target Platform
From Rodin 1.3 on, source bundles can be included in a target platform configuration.
Using Rodin-SVN from Eclipse consumes too much memory
Running the Rodin platform from Eclipse can consume a lot of RAM and become impractical on a small machine. If you fall in this case, you can generate a product and use it as if it was a normal release.
How do I generate a Rodin product from sources?
In the project org.rodinp.platform, right-click on Rodin.platform and select
. Choose and click on type Rodin for the Root directory, and choose the Destination directory. Then click on .How to build Rodin headless?
When releasing a new version of the Rodin platform, the Rodin team builds the platform headless (i.e. using batch scripts rather than Eclipse GUI). The process used for that is described in Building Rodin Headless. Alternatively, the Rodin team has also set up a CruiseControl server for checking that builds do not break.
How to generate Rodin source plugins for a Target Platform configuration ?
For source plugins to work properly in a target platform configuration, use the Ant script explained in this page.
How do I collect debug information from the Rodin platform?
You may see the log in the console by appending -consoleLog to the rodin executable: rodin -consoleLog
You may add specific debug informations by setting specific options: rodin --debug options.file -consoleLog
where
contains something like:
org.pluginname/debug = true org.pluginname/debug/optionaldebug = true
where optionaldebug may be found in the
file in the rodin source repository.
How do I submit a patch?
Good practises for patch submission are described here.
How do I track memory leaks?
If you suspect that some memory isn't freed, you may find some useful directions on how to track memory leaks here.
How do I report a bug.
See the How to contribute page.
How do I save the models ?
After the separation between a file (IRodinFile) and its root (a IInternalElement), that occurred in version 0.9.2, model saving is no more achievable through internal elements. Instead, you have to save the IRodinFile.
IInternalElement element = ... element.getRodinFile().save(...);
How do I add a new attribute to existing elements (e.g. Event-B event)?
You need to extend the following extension point org.rodinp.core.attributeTypes
to declare the new attribute.
Note: There is no constraint on which element type this attribute type associated with. In principle, any attribute type can be attached to the any internal element type.
The detail steps are described in the following page Extending the Rodin Database.
How do I extend the Event-B structure editor (the Edit Tab of the Event-B editor) for editing an attribute (which I added to the Rodin DB as described here)?
You need to extend the following extension point org.eventb.ui.editorItems
to declare the two different elements:
- How the attribute is going to be displayed/edited. This is done by declaring one of the following elements:
textAttribute
,choiceAttribute
ortoggleAttribute
.
- The relationship between the attribute and internal elements. This is done by declaring an
attributeRelation
element. Note: In fact, this relationship declares which element allows to have this attribute, which is not something enforce when the attribute is added as described here.
The detail steps are described in the following page Extending the Structure Editor.
I have compilation errors after having checked out the org.eventb.core.seqprover plug-in, what shall I do?
Two reasons may cause compilation errors right after having checked out the org.eventb.core.seqprover plug-in:
r1. The classes are not generated properly although the project was build.
Solution : Right-click on the build-tom.xml file and select "Run As... > Ant Build". Sometimes it is also necessary to refresh: right-click the project and select "Refresh".
r2. The solution of 1 didn't work and I still have some errors in the plugin.xml file. (You will have to force the plugin.xml resource refreshing)
Solution :
- open the plugin.xml file
- go to the plugin.xml tab of the editor
- insert a whitespace anywhere and save the file
- then delete the inserted whitespace to revert your changes and save again.
The plugin.xml has been refreshed and normally all errors disappeared. If you still encounter compilation errors, please contact the Rodin developers.
I need to create a new file type. How do I know my file extension isn't already used by another plugin?
An inventory of file extensions used in the Rodin platform is maintained here: Rodin File Types. Please add your file extension to the inventory.