Differences between revisions 3 and 4
Revision 3 as of 2008-07-31 19:03:43
Size: 2400
Editor: KeiichiroOno
Comment:
Revision 4 as of 2008-08-01 00:08:10
Size: 2788
Editor: KeiichiroOno
Comment:
Deletions are marked like this. Additions are marked like this.
Line 41: Line 41:
 1. Open a terminal. Execute the following script:
 {{{
 }}}
 1. Move to the root directory of your plugin project. Now you can see the files like the following:
 {{{
 }}}
 1. Convert this plugin project to Eclipse project
 {{{
   mvn pax:provision
 }}}
 1. Start Eclipse
 1. Select '''''Run > Run Configurations...'''''
 1. Right click '''''Maven Build''''' and create new configuration
 1. Press '''''Variables...''''' and select '''''workspace_loc''''' as the destination directory for the new plugin project. However, the location is up to you. You can select any directory.
Line 52: Line 46:
= Command Line Tools =
== Pax-Construct ==
To generate eclipse project files from projects generated by Pax-Construct, type:
 attachment:pluginProject1.png
Line 56: Line 48:
{{{
mvn pax:eclipse
}}}
 1. Press '''''Select...''''' and select '''''pax:create-project''''' as the goal
 1. Press '''''Add''''' and set '''''artifactId''''' and '''''groupId'''''. Usually, ''groupId'' is based on your organization's URL. This is because once you publish your plugin in the Maven repository, the string ''groupId+artifactId'' must be unique to locate your project

 attachment:pluginProject2.png
 
 1. Press '''''Apply''''' and '''''Run'''''.

How to Build an OSGi-Based Cytoscape 3 Plugin on Eclipse

Status

TableOfContents()

Introduction

This section is a step-by-step instruction for building Cytoscape 3 plugin based on OSGi framework. By following this tutorial, you can create/port your plugin for Cytoscape 3.

Background

In an OSGi system, everything is a plugin. This means, Cytoscape 3 running on OSGi framework is a collection of plugins called bundle and developing a plugin for Cytoscape 3 is equivalent to developing OSGi bundles.

The main difference between Cytoscape 2.x plugin and 3.x plugin is that you do not have to implement CytoscapePlugin interface in Cytoscape 3. Instead, you need to build your plugin jar file with metadata for OSGi. However, this process will be handled by Eclipse and other tools and you do not have to create metadata manually.

Requirements

To understand each steps in this document, it is better to understand following before building your plugin:

  • Basic Java
  • How to build Java project on Eclipse
  • OSGi Bundle
    • Note: OSGi Bundle = regular jar file + metadata text file.
  • OSGi-Dependent API
    • BundleActivator

Tools

The following tools should be installed on your machine before starting this tutorial:

Eclipse Plugins

Procedure

  1. Start Eclipse
  2. Select Run > Run Configurations...

  3. Right click Maven Build and create new configuration

  4. Press Variables... and select workspace_loc as the destination directory for the new plugin project. However, the location is up to you. You can select any directory. attachment:pluginProject1.png

  5. Press Select... and select pax:create-project as the goal

  6. Press Add and set artifactId and groupId. Usually, groupId is based on your organization's URL. This is because once you publish your plugin in the Maven repository, the string groupId+artifactId must be unique to locate your project attachment:pluginProject2.png

  7. Press Apply and Run.

Outdated_Cytoscape_3.0/Eclipse/PluginDevelopment (last edited 2011-02-24 15:36:04 by PietMolenaar)

Funding for Cytoscape is provided by a federal grant from the U.S. National Institute of General Medical Sciences (NIGMS) of the Na tional Institutes of Health (NIH) under award number GM070743-01. Corporate funding is provided through a contract from Unilever PLC.

MoinMoin Appliance - Powered by TurnKey Linux