Examples of PluginManager


Examples of net.sourceforge.cruisecontrol.utilities.PluginManager

public class BootstrapStartup {

  public static void main(String[] args ){
   
    // initialize the ext location
    PluginManager pluginManager = new PluginManager( "/java/cruisecontrol-2.2.1/main/dist" );
   
    try {
      Class theMainWindow = pluginManager.loadClass( "net.sourceforge.cruisecontrol.gui.MainWindow" );
      Method theBuildMethod = theMainWindow.getDeclaredMethod( "buildWindow", new Class[0] );
      theBuildMethod.invoke( theMainWindow, new Object[0] );
    }
    catch (Exception e ) {
      System.out.println( e.toString() );
View Full Code Here

Examples of net.sourceforge.squirrel_sql.client.plugin.PluginManager

    {
      indicateNewStartupTask(splash, s_stringMgr.getString("Application.splash.notloadingplugins"));
    }

    UIFactory.initialize(_prefs, this);
    _pluginManager = new PluginManager(this);
    if (args.getLoadPlugins())
    {
      if (null != splash && _prefs.getShowPluginFilesInSplashScreen())
      {
        ClassLoaderListener listener = splash.getClassLoaderListener();
View Full Code Here

Examples of net.sourceforge.squirrel_sql.client.plugin.PluginManager

    public MockApplication() {
        resource =
            new SquirrelResources("net.sourceforge.squirrel_sql.client.resources.squirrel");
        prefs = SquirrelPreferences.load();
        threadPool = new TaskThreadPool();
        pluginManager = new PluginManager(this);
        actions = new ActionCollection(this);
        history = new SQLHistory();
        messageHandler = new MockMessageHandler();
        sessionHandler = new MockSessionManager(this);
        fontInfoStore = new FontInfoStore();
View Full Code Here

Examples of net.sourceforge.squirrel_sql.client.plugin.PluginManager

    public MockApplication() {
        resource =
            new SquirrelResources("net.sourceforge.squirrel_sql.client.resources.squirrel");
        prefs = SquirrelPreferences.load();
        threadPool = new TaskThreadPool();
        pluginManager = new PluginManager(this);
        actions = new ActionCollection(this);
        history = new SQLHistory();
        sqlEntryPanelFactory = new MockSQLEntryPanelFactory();
        messageHandler = new MockMessageHandler();
        sessionHandler = new MockSessionManager(this);
View Full Code Here

Examples of net.xeoh.plugins.base.PluginManager

        final JSPFProperties props = new JSPFProperties();

        props.setProperty(PluginManager.class, "cache.enabled", "true");
        props.setProperty(PluginManager.class, "cache.file", "myjspf.cache");

        final PluginManager pm = PluginManagerFactory.createPluginManager(props);

        DiscoveryMangerFileImpl dmp = new DiscoveryMangerFileImpl();
        dmp.anouncePlugin(pm, PublishMethod.JAVASCRIPT, new URI("http://xxx.com"));

        Thread.sleep(2000);
View Full Code Here

Examples of net.xeoh.plugins.base.PluginManager

        /*
         * The is the only time you have to access a class directly. Just returns the
         * Plugin manager.
         */
        final PluginManager pmf = PluginManagerFactory.createPluginManager();

        /*
         * Add plugins from somewhere. Be sure to put *the right path* in here. This
         * method may be called multiple times. If you plan to deliver your application
         * replace bin/ with for example myplugins.jar
         */
        pmf.addPluginsFrom(new File("target/test-classes/").toURI());

        /*
         * Obtain multiple plugins
         */
        PluginManagerUtil pmu = new PluginManagerUtil(pmf);
View Full Code Here

Examples of net.xeoh.plugins.base.PluginManager

        /*
         * The is the only time you have to access a class directly. Just returns the
         * Plugin manager.
         */
        final PluginManager pmf = PluginManagerFactory.createPluginManager();

        /*
         * Add plugins from somewhere. Be sure to put *the right path* in here. This
         * method may be called multiple times. If you plan to deliver your application
         * replace bin/ with for example myplugins.jar
         */
        pmf.addPluginsFrom(new File("bin/").toURI());

        /*
         * Thats it. Technically all plugins have now been loaded and are running. If you
         * would like to retrieve one, do it like this:
         */
        final OutputService plugin = pmf.getPlugin(OutputService.class);
        plugin.doSomething();
    }
View Full Code Here

Examples of net.xeoh.plugins.base.PluginManager

    @Test
    public void testMany() {
        for(int i=0; i<10000; i++) {
            System.out.println();
            System.out.println("Run " + i);
            PluginManager manager = PluginManagerFactory.createPluginManager();
            manager.addPluginsFrom(ClassURI.CLASSPATH);
            manager.shutdown();
        }
    }
View Full Code Here

Examples of net.xeoh.plugins.base.PluginManager

        try {
            UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
        } catch (final Exception e) {}

        // We only need the default plugins and a few of our owns
        final PluginManager pluginManager = PluginManagerFactory.createPluginManager();
        final PluginManagerUtil pluginManagerUtil = new PluginManagerUtil(pluginManager);

        pluginManager.addPluginsFrom(ClassURI.PLUGIN(PlainConverterImpl.class));
        pluginManager.addPluginsFrom(ClassURI.PLUGIN(CSVConverterImpl.class));
        pluginManager.addPluginsFrom(ClassURI.PLUGIN(XMLConverterImpl.class));
        pluginManager.addPluginsFrom(new File("plugins/").toURI());

        final MainWindow mainWindow = new MainWindow(pluginManager);
        mainWindow.setVisible(true);

        final Collection<Converter> converters = pluginManagerUtil.getPlugins(Converter.class);
View Full Code Here

Examples of net.xeoh.plugins.base.PluginManager

    /**
     * @throws MalformedURLException
     */
    @Test
    public void testAddPluginsFrom() throws MalformedURLException {
        final PluginManager pm2 = PluginManagerFactory.createPluginManager();

        Assert.assertNull(pm2.getPlugin(TestAnnotations.class));
    }
View Full Code Here
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.