From Optflux
(→Configuring the structure of your plug-in directory) |
|||
Line 20: | Line 20: | ||
# Your Eclipse workspace should look something like: | # Your Eclipse workspace should look something like: | ||
#:[[Image:release4_1.png]] | #:[[Image:release4_1.png]] | ||
+ | |||
+ | = Configuring the structure of your plug-in directory = | ||
+ | |||
+ | # Right-click the plug-in source folder (''plugins_src/myplugin4optflux'') and: | ||
+ | ## Press Add -> New -> Package | ||
+ | ##: [[Image:release5.png]] | ||
+ | ## Name it whatever you like. We like to use the same name for the first folder in the directory structure. In this case ''myplugin4optflux'' | ||
+ | ##: [[Image:release6.png]] | ||
+ | # Create the '''mandatory plugin.xml''' file: | ||
+ | # Right-click the plug-in source folder (''plugins_src/myplugin4optflux'') and: | ||
+ | ## Press Add -> New -> File | ||
+ | ##:[[Image:release7.png]] | ||
+ | ## Name it '''plugin.xml''' | ||
+ | ##:[[Image:release8.png]] | ||
+ | # To understand the structure and contents of the plugin.xml file, please refer to the [[Developers#Plugin.xml]] section. | ||
+ | ## A sample content is herein presented | ||
+ | <plugin start="false"> | ||
+ | <uid>optflux_plugins_myplugin</uid> | ||
+ | <name>My first plugin for optflux</name> | ||
+ | <version>1.0</version> | ||
+ | ... | ||
+ | <dependencies> | ||
+ | <dependency uid="optflux.core"/> | ||
+ | <dependency uid="optflux.simulation"/> | ||
+ | </dependencies> | ||
+ | ... | ||
+ | <extensions> | ||
+ | |||
+ | <extension uid="aibench.core" | ||
+ | name="aibench.core.operation-definition" | ||
+ | class="myplugin.operations.MyOperation"> | ||
+ | <operation-description name="My Operation" | ||
+ | uid= "plugins.myplugin.myoperation" | ||
+ | path="20@Plugins/1@MyOperations" | ||
+ | shortcut="2" | ||
+ | /> | ||
+ | </extension> |
Revision as of 23:40, 2 December 2010
Contents
Creating a new project for your plug-in
- Begin by Running Eclipse
- Having downloaded the release from the website, let's begin creating a New Java Project
- Give a name to your project and:
- select the Create project from existing source;
- select the path to the directory where you extracted the OptFlux release.
- press next;
- Press the Create new source folder link
- Add a name your plug_in, preferably under plugins_src folder
- Switch to the Libraries tab
- Press the Add JARs... button
- Add any jar library under the lib[your_architecture] folder. In the example we are adding some extra libraries for MacOS X (darwin64)
- Your Eclipse workspace should look something like:
Configuring the structure of your plug-in directory
- Right-click the plug-in source folder (plugins_src/myplugin4optflux) and:
- Create the mandatory plugin.xml file:
- Right-click the plug-in source folder (plugins_src/myplugin4optflux) and:
- To understand the structure and contents of the plugin.xml file, please refer to the Developers#Plugin.xml section.
- A sample content is herein presented
<plugin start="false"> <uid>optflux_plugins_myplugin</uid> <name>My first plugin for optflux</name> <version>1.0</version> ... <dependencies> <dependency uid="optflux.core"/> <dependency uid="optflux.simulation"/> </dependencies> ... <extensions> <extension uid="aibench.core" name="aibench.core.operation-definition" class="myplugin.operations.MyOperation"> <operation-description name="My Operation" uid= "plugins.myplugin.myoperation" path="20@Plugins/1@MyOperations" shortcut="2" /> </extension>