Package org.java.plugin

Examples of org.java.plugin.PluginManager


      JCheckBoxMenuItem viewAction) {
    ((InfoDockPlugin) plugin).initializeDockWidget(parentWindow, viewAction);
  }
 
  public void init(MainWindow parentWindow, JCheckBoxMenuItem viewAction) {
    PluginManager pManager = PluginManager.lookup(this);
    InfoDockPlugin plugin = null;
    try {
      plugin = (InfoDockPlugin) pManager.getPlugin(InfoDockPlugin.PLUGIN_ID);
    } catch (PluginLifecycleException e) {
      Logger log = Logger.getLogger(this.getClass());
      log.error("Error while initializing Infodock dock component", e);
    }
    plugin.initializeDockWidget(parentWindow, viewAction);
View Full Code Here


public class CarEditorProvider implements EditorProviderInterface {

  @Override
  public void init(JMenu topMenuElement, MainWindow window) {

    PluginManager pManager = PluginManager.lookup(this);
    CarEditorPlugin plugin = null;
    try {
      plugin = (CarEditorPlugin)pManager.getPlugin(CarEditorPlugin.PLUGIN_ID);
    } catch (PluginLifecycleException e) {
      Logger log = Logger.getLogger(this.getClass());
      log.error("Error while initializing Car Editor GUI support.", e);
    }
View Full Code Here

  /**
   * Loads the tasks implemented as plugins.
   *
   */
  private void loadJPFPlugins() {
    PluginManager pluginManager;
   
    // Create a new JPF plugin manager.
    pluginManager = ObjectFactory.newInstance().createManager();
   
    // Search known locations for plugin files.
    LOG.fine("Searching for JPF plugins.");
    List<PluginLocation> locations = gatherJpfPlugins();
   
    // Register the core plugin.
    LOG.fine("Registering the core plugin.");
    registerCorePlugin(pluginManager);
   
    // Register all located plugins.
    LOG.fine("Registering the extension plugins.");
    if (locations.size() == 0) {
      // There are no plugins available so stop processing here.
       return;
    }
    registerJpfPlugins(pluginManager, locations);
   
    // Initialise all of the plugins that have been registered.
    LOG.fine("Activating the plugins.");
    // load plugins for the task-extension-point
    PluginDescriptor core = pluginManager.getRegistry()
        .getPluginDescriptor("org.openstreetmap.osmosis.core.plugin.Core");

    ExtensionPoint point = pluginManager.getRegistry().getExtensionPoint(core.getId(), "Task");
    for (Iterator<Extension> it = point.getConnectedExtensions().iterator(); it.hasNext();) {

      Extension ext = it.next();
      PluginDescriptor descr = ext.getDeclaringPluginDescriptor();
      try {
        pluginManager.enablePlugin(descr, true);
        pluginManager.activatePlugin(descr.getId());
        ClassLoader classLoader = pluginManager.getPluginClassLoader(descr);
        loadPluginClass(ext.getParameter("class").valueAsString(), classLoader);
      } catch (PluginLifecycleException e) {
        throw new OsmosisRuntimeException("Cannot load JPF-plugin '" + ext.getId()
            + "' for extensionpoint '" + ext.getExtendedPointId() + "'", e);
      }
View Full Code Here

TOP

Related Classes of org.java.plugin.PluginManager

Copyright © 2018 www.massapicom. 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.