Package tvbrowser.core.plugin

Examples of tvbrowser.core.plugin.PluginProxy


    }
    JMenuItem menuItem = MenuUtil.createMenuItem(mLocalizer.msg(
        "disablePlugin", "Disable plugin"));
    menuItem.addActionListener(new ActionListener() {
      public void actionPerformed(ActionEvent e) {
        final PluginProxy plugin = PluginProxyManager.getInstance()
            .getPluginForId(getPluginId());
        if (plugin != null) {
          try {
            PluginProxyManager.getInstance().deactivatePlugin(plugin);
          } catch (TvBrowserException e1) {
            e1.printStackTrace();
          }
        }
      }
    });
    menu.add(menuItem);
    ImageIcon icon = IconLoader.getInstance().getIconFromTheme("apps",
        "help-browser", 16);
    menuItem = MenuUtil.createMenuItem(Localizer.getLocalization(Localizer.I18N_HELP));
    menuItem.setIcon(icon);
    menuItem.addActionListener(new ActionListener() {
      public void actionPerformed(ActionEvent e) {
        final PluginProxy plugin = PluginProxyManager.getInstance()
            .getPluginForId(getPluginId());
        if (plugin != null) {
          String helpUrl = plugin.getInfo().getHelpUrl();
          if (helpUrl == null) {
            helpUrl = PluginInfo.getHelpUrl(plugin.getId());
          }
          if (helpUrl != null) {
            Launch.openURL(helpUrl);
          }
        }
View Full Code Here


        mMarkPriority = (byte) Math.max(mMarkPriority,marker.getMarkPriorityForProgram(this));

        // add program to artificial plugin tree
        if (marker instanceof PluginProxy) {
          PluginProxy proxy = (PluginProxy) marker;
          if (! proxy.canUseProgramTree() || proxy.hasArtificialPluginTree() ) {
            if (proxy.getArtificialRootNode() == null || proxy.getArtificialRootNode().size() < 100) {
              proxy.addToArtificialPluginTree(this);
            }
          }
        }

        fireStateChanged();
View Full Code Here

          mMarkerArr = newArr;
        }

        // remove from artificial plugin tree
        if (marker instanceof PluginProxy) {
          PluginProxy proxy = (PluginProxy) marker;
          if (proxy.hasArtificialPluginTree() && proxy.getArtificialRootNode().size() < 100) {
            proxy.getArtificialRootNode().removeProgram(this);
          }
        }

        fireStateChanged();
      }
View Full Code Here

            }
            return false;
          }});
        if (proxyFiles != null) {
          for (File proxyFile : proxyFiles) {
            PluginProxy proxy = loadProxy(proxyFile);
            if (proxy != null) {
              loadedProxies.add(proxy);
              mLog.info("Loaded plugin proxy " + proxyFile);
            }
            else {
              mLog.warning("Failed loading plugin proxy " + proxyFile);
            }
          }
        }
      }
    }

    File[] fileArr = folder.listFiles(new FilenameFilter(){
      public boolean accept(File dir, String fileName) {
        for (String ignored : IGNORED_PLUGINS) {
          if (fileName.equalsIgnoreCase(ignored)) {
            return false;
          }
        }
        return true;
      }
    });
    if (fileArr == null) {
      return;
    }

    // remove old cleverepg service, if new one is found
    File oldService = null;
    ArrayList<File> files = new ArrayList<File>(Arrays.asList(fileArr));
    for (File file : fileArr) {
      if (file.getName().equalsIgnoreCase("CleverEPGDataService3.jar")) {
        for (File file2 : files) {
          if (file2.getName().equalsIgnoreCase("CleverEPGDataService.jar")) {
            oldService = file2;
            break;
          }
        }
      }
    }
    if (oldService != null) {
      files.remove(oldService);
    }

    for (File file : files) {
      boolean load = true;
      for (PluginProxy proxy : loadedProxies) {
        if (proxy.getPluginFileName().equalsIgnoreCase(file.getPath())) {
          load = false;
          break;
        }
      }
      if (load) {
View Full Code Here

   */
  public ContextMenuIf getContextMenuIfForId(String id) {
    if (id == null) {
      return null;
    }
    PluginProxy plugin = PluginProxyManager.getInstance().getActivatedPluginForId(id);
    if(plugin != null) {
      return plugin;
    }
    TvDataServiceProxy dataService = TvDataServiceProxyManager.getInstance().findDataServiceById(id);
   
View Full Code Here

TOP

Related Classes of tvbrowser.core.plugin.PluginProxy

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.