Tutorial Using Zephyr Plugins
This tutorial is for people that would like to run Zephyr directly from Eclipse or embed Zephyr in a Eclipse application.1. Requirements installation
- See the download page to install Zephyr plug-ins for Eclipse
- Make sure the plugins for Eclipse for RCP and RAP Developers are installed
2. Having an Eclipse Plug-in Project:
The first thing you need to do is to contribute to Zephyr (with your code generating the data you want to plot) is an Eclipse Plug-in Project. The first way is to create a new project:- Select (in Plug-in Development) then push
- Give the project a name then push and then
- Right-click on your Java project and then
- Select your project and then click
3. Making your project work with Zephyr:
When Zephyr starts, it needs to know what to run in your code. To this purpose, we use the Extension framework of Eclipse:- Open the file META-INF/MANIFEST.MF (this file should exist for every Eclipse Plug-in Project)
- Click on the tab zephyr.plugin.core
and zephyr.plugin.core.api then click
then click then select - Click on the tab zephyr.runnable
then click
then click then select - Click right on the extension then
- Click on the new client and set a class (click on the link java.lang.Runnable to create a new one or browse to select an existing one). This class must implement the interface
- Save the file
When Zephyr starts, it requests to Eclipse every clients in plugins that provide zephyr.runnable extension and then start each client provided by the extension in its own thread.
See the Java Archive tutorial for declaring data to monitor for Zephyr.
4. Running Zephyr with your client
- Go to:
- On the left, right click on then
- Give a name to your configuration
- In zephyr.product.product select
- Select the tab
- In select
- Click zephyr.example.simpleplugin) and click then select your Eclipse Plug-in Project (e.g. select
- If autostart=false in the client of your zephyr.runnable
extension, then you need to add the id (not the class) of your client to the program
arguments:
- Select the tab
- Add to id of your client (e.g. zephyr.example.simpleplugin.client) the
- Note: you can find the id by opening the file plugin.xml of your project, then the tab , then select your client in zephyr.runnable, finally check the field id
- Click on
Links:
- Source of the Zephyr example plugin project: http://zephyrplugins.github.io/examples/zephyr.example.simpleplugin.tar.gz
- The Zephyr example
plugin project on github
- Creating Eclipse plugins: http://www.vogella.de/articles/EclipsePlugIn/article.html
- Eclipse RCP tutorial (how to create menu items, commands,
views, ...): http://www.vogella.de/articles/EclipseRCP/article.html
- http://www.eclipsepluginsite.com/