Package com.dubture.getcomposer.packages

Examples of com.dubture.getcomposer.packages.AsyncPackagistSearch


      contentProvider.clear();
      viewer.setInput(contentProvider.packages);
      viewer.refresh();
     
      AsyncPackagistSearch search = new AsyncPackagistSearch();
      search.addPackageSearchListener(new PackageSearchListenerInterface() {
        @Override
        public void errorOccured(Exception e) {
         
        }
        @Override
        public void aborted(String url) {
         
        }
        @Override
        public void packagesFound(List<MinimalPackage> packages, String query, final SearchResult result) {
          if (packages != null) {
            final List<PackageFilterItem> items = new ArrayList<PackageFilterItem>();
            for (MinimalPackage pkg : packages) {
              items.add(new PackageFilterItem(pkg));
            }
           
            getControl().getDisplay().asyncExec(new Runnable() {
              @Override
              public void run() {
                contentProvider.add(items);
                viewer.refresh();
                searchResultCount.setText("Found " + result.total + " packages.");
              }
            });
          }
        }
      });
     
      if (showProjectsCheckbox.getSelection()) {
        search.setFilter("project");
      }
      search.search(text);
     
    } catch (Exception e) {
      Logger.logException(e);
    }
  }
View Full Code Here

TOP

Related Classes of com.dubture.getcomposer.packages.AsyncPackagistSearch

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.