Package xnap.plugin

Examples of xnap.plugin.PluginInfo


  jlStatus.setToolTipText(newValue);
    }

    public void valueChanged(ListSelectionEvent e)
    {
  PluginInfo i = (PluginInfo)jlPlugins.getSelectedValue();
  IPlugin p = PluginManager.getInstance().getPluginByName(i.getName());

  jlName.setText(i.getName());
  jlVersion.setText(i.getVersion());
  jlInstalledVersion.setText((p != null) ? p.getVersion() : "");
  jlDescription.setText(i.getDescription());

  if (p != null) {
      int c = VersionParser.compare(i.getVersion(), p.getVersion());
      acInstall.setEnabled(c != 0);
  }
  else {
      acInstall.setEnabled(true);
  }
View Full Code Here


      this.setEnabled(false);
        }

        public void actionPerformed(ActionEvent event)
  {
      PluginInfo i = (PluginInfo)jlPlugins.getSelectedValue();

      try {
    HttpConnection c = new HttpConnection();
    c.connect(i.getLocation());

    ProgressMonitorInputStream pIn = new ProgressMonitorInputStream
      (PluginDialog.this, "Downloading " + i.getFilename(),
       c.getInputStream());
    pIn.getProgressMonitor().setMillisToPopup(0);
    pIn.getProgressMonitor().setMillisToDecideToPopup(0);
    InputStream in = new BufferedInputStream(pIn);
    String f = FileHelper.getHomeDir("jars") + i.getFilename();

    HttpConnection.save(in, f);
      }
      catch (IOException e) {
    setStatus(e.getMessage());
View Full Code Here

  String plugins = props.getProperty("plugins");
  if (plugins != null) {
      StringTokenizer t = new StringTokenizer(plugins, ";");
      while (t.hasMoreTokens()) {
    PluginInfo info = new PluginInfo(t.nextToken(), props);
    //if (info.isValid()) {
        infos.add(info);
        //}
      }
  }
View Full Code Here

  p.load(in);

  String[] plugins
      = StringHelper.toArray(p.getProperty("plugins", ""), ";");
  for (int i = 0; i < plugins.length; i++) {
      PluginInfo info = new PluginInfo(plugins[i], p);

      // lafs are currently broken
      if (info.getType() == PluginInfo.TYPE_LAF) {
    continue;
      }

      // check requirements
      // FIX: this has to be adopted to the release_nr compare mechanism
//       String requires = info.getRequires();
//       if (requires.length() > 0
//     && VersionParser.compare(requires, XNap.VERSION) != 0) {
//     logger.warn("plugin requires XNap " + requires);
//       }
     
      logger.debug("adding plugin: " + info.getClassName());
      pluginInfos.add(info);
      if (path != null) {
    try {
        loadPlugin(path, info);
    }
    catch (IOException e) {
        logger.warn("could not load plugin", e);
    }
      }
      else {
    info.setLoaded(true);
      }
  }
    } 
View Full Code Here

    public String[] getClassNames(int pluginType)
    {
  ArrayList classNames = new ArrayList();
  for (Iterator i = pluginInfos.iterator(); i.hasNext();) {
      PluginInfo info = (PluginInfo)i.next();
      if (info.getType() == pluginType) {
    String[] names = info.getClassNames();
    for (int j = 0; j < names.length; j++) {
        classNames.add(names[j]);
    }
      }
  }
View Full Code Here

TOP

Related Classes of xnap.plugin.PluginInfo

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.