Package org.freeplane.plugin.openmaps

Source Code of org.freeplane.plugin.openmaps.Activator

package org.freeplane.plugin.openmaps;

import java.util.Hashtable;
import org.freeplane.features.mode.ModeController;
import org.freeplane.features.mode.mindmapmode.MModeController;
import org.freeplane.main.osgi.IModeControllerExtensionProvider;
import org.osgi.framework.BundleActivator;
import org.osgi.framework.BundleContext;

/**
* @author Blair Archibald
*/
public class Activator implements BundleActivator {

  public void start(BundleContext bundleContext) throws Exception {
    bundleContext.registerService(IModeControllerExtensionProvider.class.getName(),
        new IModeControllerExtensionProvider() {
          public void installExtension(ModeController modeController) {
            new OpenMapsRegistration(modeController);
          }
        }, getProperties());
  }
 
  private Hashtable<String, String[]> getProperties() {
    final Hashtable<String, String[]> properties = new Hashtable<String, String[]>();
    properties.put("mode", new String[] { MModeController.MODENAME });
    return properties;
  }

  public void stop(BundleContext bundleContext) throws Exception {
  }

}
TOP

Related Classes of org.freeplane.plugin.openmaps.Activator

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.