Examples of StandardPlugin


Examples of org.gudy.azureus2.plugins.installer.StandardPlugin

                 
                  StandardPlugin[]  sps = installer.getStandardPlugins();
                 
                  for (int j=0;j<sps.length;j++){
                   
                    final StandardPlugin  sp = sps[j];
                   
                    if ( sp.getId().equals( rp_id )){
                   
                      found_one = true;
                     
                      checker.getCheckInstance().addListener(
                        new UpdateCheckInstanceListener()
                        {
                          public void
                          cancelled(
                            UpdateCheckInstance    instance )
                          {                         
                          }
                         
                          public void
                          complete(
                            UpdateCheckInstance    instance )
                          {
                            if ( instance.getUpdates().length == 0 ){
                             
                              installRecommendedPlugin( installer, sp );
                             
                              plugin_config.setPluginParameter( config_key, true );
                            }
                          }
                        });
                     
                      break;
                    }
                  }
                 
                }catch( Throwable e ){
                 
                }
              }
             
              if ( found_one ){
               
                break;
              }
            }
           
            if ( !found_one ){
             
              Set<String>  auto_install = vc.getAutoInstallPluginIDs();
             
              final List<String>  to_do = new ArrayList<String>();
             
              for ( String pid: auto_install ){
               
                if ( plugin_manager.getPluginInterfaceByID( pid, false ) == null ){
                 
                  to_do.add( pid );
                }
              }
             
              if ( to_do.size() > 0 ){
               
                new AEThread2( "pup:autoinst" )
                {
                  public void
                  run()
                  {   
                    try{
                      Thread.sleep( 120*1000 );
                     
                    }catch( Throwable e ){
                     
                      Debug.out( e );
                     
                      return;
                    }
                   
                    UpdateManager update_manager = plugin_interface.getUpdateManager();
                   
                    final List<UpdateCheckInstance>  l_instances = new ArrayList<UpdateCheckInstance>();
                   
                    update_manager.addListener(
                      new UpdateManagerListener()
                      {
                        public void
                        checkInstanceCreated(
                          UpdateCheckInstance  instance )
                        {
                          synchronized( l_instances ){
                           
                            l_instances.add( instance );
                          }
                        }
                      });
                   
                    UpdateCheckInstance[] instances = update_manager.getCheckInstances();
                   
                    l_instances.addAll( Arrays.asList( instances ));
                   
                    long start = SystemTime.getMonotonousTime();
                   
                    while( true ){
                     
                      if ( SystemTime.getMonotonousTime() - start >= 5*60*1000 ){
                       
                        break;
                      }
                     
                      try{
                        Thread.sleep(5000);
                       
                      }catch( Throwable e ){
                       
                        Debug.out( e );
                       
                        return;
                      }
                     
                      if ( l_instances.size() > 0 ){
                     
                        boolean  all_done = true;
                       
                        for ( UpdateCheckInstance instance: l_instances ){
                         
                          if ( !instance.isCompleteOrCancelled()){
                           
                            all_done = false;
                           
                            break;
                          }
                        }
                       
                        if ( all_done ){
                         
                          break;
                        }
                      }
                    }
                   
                    if ( update_manager.getInstallers().length > 0 ){
                     
                      return;
                    }
                   
                    PluginInstaller installer = plugin_interface.getPluginManager().getPluginInstaller();
                   
                    List<InstallablePlugin>  sps = new ArrayList<InstallablePlugin>();
                   
                    for ( String pid: to_do ){
                     
                      try{
                        StandardPlugin sp = installer.getStandardPlugin( pid );
                       
                        if ( sp != null ){
                         
                          log.log( "Auto-installing " + pid );
                         
View Full Code Here

Examples of org.gudy.azureus2.plugins.installer.StandardPlugin

  data.heightHint = 100;
  link_area.getComponent().setLayoutData(data);

  CoreWaiterSWT.waitForCore(TriggerInThread.NEW_THREAD, new AzureusCoreRunningListener() {
    public void azureusCoreRunning(AzureusCore core) {
      final StandardPlugin plugins[];
      try {
        plugins = ((InstallPluginWizard)wizard).getStandardPlugins(core);
       
        Arrays.sort(
          plugins,
        new Comparator()
      {
            public int
        compare(
          Object o1,
          Object o2)
            {
              return(((StandardPlugin)o1).getName().compareToIgnoreCase(((StandardPlugin)o2).getName()));
            }
      });
     
      } catch(final Exception e) {
       
        Debug.printStackTrace(e);
        wizard.getDisplay().asyncExec(new AERunnable() {
            public void runSupport() {
              link_area.addLine( Debug.getNestedExceptionMessage(e));
            }
        });
       
        return;
      }
     
      wizard.getDisplay().asyncExec(new AERunnable() {
        public void runSupport() {
        
          lblStatus.setText( ((InstallPluginWizard)wizard).getListTitleText());
         
          List  selected_plugins = ((InstallPluginWizard)wizard).getPluginList();

          for(int i = 0 ; i < plugins.length ; i++) {
            StandardPlugin plugin = plugins[i];
            if(plugin.getAlreadyInstalledPlugin() == null) {
              if(pluginList == null || pluginList.isDisposed())
                return;
              TableItem item = new TableItem(pluginList,SWT.NULL);
              item.setData(plugin);
              item.setText(0,plugin.getName());
              boolean  selected = false;
              for (int j=0;j<selected_plugins.size();j++){
                if (((StandardPlugin)selected_plugins.get(j)).getId() == plugin.getId()){
                  selected = true;
                }
              }
              item.setChecked( selected );
              item.setText(1,plugin.getVersion());
            }
          }
         
            // if there's only one entry then we might as well pull it in (this is really to
            // support explicit install directions in the wizard as opposed to selection from
View Full Code Here

Examples of org.gudy.azureus2.plugins.installer.StandardPlugin

    {
      link_area.reset();
     
      link_area.addLine( MessageText.getString( "installPluginsWizard.details.loading"));
    
        final StandardPlugin plugin = (StandardPlugin) selected_item.getData();
       
       
        AEThread detailsLoader = new AEThread("Detail Loader") {
          public void runSupport() {          
           final String description = HTMLUtils.convertListToString(HTMLUtils.convertHTMLToText(plugin.getDescription(),""));
           wizard.getDisplay().asyncExec(new AERunnable() {
            public void runSupport() {
              if(pluginList == null || pluginList.isDisposed() || pluginList.getSelectionCount() ==0)
                return;
              if(pluginList.getSelection()[0] != selected_item)
                return;
          
              link_area.reset();
             
              link_area.setRelativeURLBase( plugin.getRelativeURLBase());
             
              link_area.addLine(description);
            }
            });
          }
View Full Code Here

Examples of org.gudy.azureus2.plugins.installer.StandardPlugin

 
    try{
     
      installer = AzureusCoreFactory.getSingleton().getPluginManager().getPluginInstaller();
     
       StandardPlugin sp = installer.getStandardPlugin( plugin_id );
           
       if ( sp == null ){
        
         throw( new Exception( "Unknown plugin" ));
       }
View Full Code Here

Examples of org.gudy.azureus2.plugins.installer.StandardPlugin

   
    try{
     
      installer = AzureusCoreFactory.getSingleton().getPluginManager().getPluginInstaller();
     
       StandardPlugin sp = installer.getStandardPlugin( "azemp" );
           
      Map<Integer, Object> properties = new HashMap<Integer, Object>();
 
      properties.put( UpdateCheckInstance.PT_UI_STYLE, UpdateCheckInstance.PT_UI_STYLE_NONE );
       
View Full Code Here

Examples of org.gudy.azureus2.plugins.installer.StandardPlugin

      public void parameterChanged(Parameter param) {
        CoreWaiterSWT.waitForCoreRunning(new AzureusCoreRunningListener() {
          public void azureusCoreRunning(AzureusCore core) {
            try {
              PluginInstaller installer = core.getPluginManager().getPluginInstaller();
              StandardPlugin itunes_plugin = installer.getStandardPlugin("azitunes");
             
              itunes_plugin.install(false);
             
            } catch (Throwable e) {
             
              Debug.printStackTrace(e);
            }
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.