-
Notifications
You must be signed in to change notification settings - Fork 3
write a genlab plugin
samthiriot edited this page Mar 6, 2015
·
6 revisions
Genlab is based on Eclipse. It means we do reuse the look&feel, basic components, available plugins from Eclipse. Contributing to Genlab thus requires the understanding of the eclipse plugin structure, and of some other eclipse aspects.
To read more about eclipse plugins, see some of these articles:
- http://eclipse.org/articles/Article-Your%20First%20Plug-in/YourFirstPlugin.html
- http://www.eclipse.org/articles/Article-PDE-does-plugins/PDE-intro.html
- http://www.ibm.com/developerworks/library/os-eclipse-plugindev1/index.html
- http://www.onjava.com/pub/a/onjava/2005/02/09/eclipse.html
- http://www.ibm.com/developerworks/opensource/library/os-ecplug/
- http://www.ibm.com/developerworks/library/os-ecplug/
You do create a plugin in genlab to add what is named algorithms, that is boxes you will connect with other boxes to use them for generating populations (or related topics).
- define what you are going to add to GenLab:
- a graphic algorithm ? (it is opening a view in Eclipse, is displaying curves or so on); it means this algorithm will be packaged with the graphical version of genlab, but not with the non graphical one
- a non-graphic algorithm ? It will be available in the batch mode of genlab.
- in eclipse: file / new / other; select "plugin development / plugin project"
- an assistant appears. Use it such as:
- page 1
- name: name it something meaningfull. If it is supposed to be part of the future genlab core distrib, start with genlab. Else start with you company name or wathever.
- keep defaults: default location is ok, create src and bin, etc.
- page 2
- fill Name, Vendor...
- "generate an acivator" should be checked
- if you are creating a GUI pluging, check "this plugin will make contributions to the UI"
- page 3:
- uncheck the "create a plugin unsing one template..."
Eclipse probably opened for you the META-INF/Manifest of the novel plugin ; if it is not the case, open it yourself.
In tab "Overview":
- "active the plugin when..." should be checked
- check "this plugin is a singleton"
- for any plugin, add:
- genlab.core
- for GUI plugins, add:
- genlab.examples,
- genlab.gui
Activators should implement in Genlab:
- make them implement IGenlabPlugin
- public static final String getName()
- public static final String getDescription()
- in the start() function, add a GLLogger.infoTech("Initializing plugin XXX;, it provides YYY")
in the plugin genlab.gui, open genlab.product;
- in "dependancies", add you plugin, then click "add required plugins"
- then in "overview", click "synchronize".
- then "run as an application"
TODO