If you are looking for Jitsi Meet, the WebRTC compatible video conferencing product click here.

previous | TOC | next

How to write GUI plugins

Create a plugin bundle

Create your package directory in the src.net.java.sip.communicator.plugin package. This becomes the source directory for your plugin.

Create a class named YourPluginNameActivator.java, which implements org.osgi.framework.BundleActivator.

Note: you can find the code for this example in the plugin.pluginexample package in the Jitsi project.

package net.java.sip.communicator.plugin.exampleplugin;

import org.osgi.framework.*;

public class ExamplePluginActivator implements BundleActivator
{
    public void start(BundleContext bc) throws Exception
    {
    }

    public void stop(BundleContext bc) throws Exception
    {
    }
}
 

Each bundle should have a file called yourbundlename.manifest.mf, where you should specify the full activator name, some description of your bundle and list all libraries imported in your bundle classes.

The manifest file is needed by the OSGi framework for manipulating the bundle. It is packaged into a JAR file along with the Java class files associated with the bundle; the whole JAR package is actually referred to as a bundle. Follow the example below to make your own manifest.

Bundle-Activator: net.java.sip.communicator.plugin.exampleplugin.ExamplePluginActivator
Bundle-Name: Example plugin
Bundle-Description: An example showing how to make plugins for the ui.
Bundle-Vendor: sip-communicator.org
Bundle-Version: 0.0.1
Import-Package: org.osgi.framework,
 net.java.sip.communicator.util,
 net.java.sip.communicator.service.contactlist,
 net.java.sip.communicator.service.contactlist.event,
 net.java.sip.communicator.service.gui,
 net.java.sip.communicator.service.gui.event,
 javax.swing,
 javax.swing.event,
 javax.swing.table,
 javax.swing.text,
 javax.swing.text.html,
 javax.accessibility,
 javax.swing.plaf,
 javax.swing.plaf.metal,
 javax.swing.plaf.basic,
 javax.imageio,
 javax.swing.filechooser,
 javax.swing.tree,
 javax.swing.undo,
 javax.swing.border

Note: For more information on bundles see the OSGi Tutorial

previous | TOC | next