Package aQute.bnd.service

Examples of aQute.bnd.service.RepositoryPlugin


            public void selectionChanged(SelectionChangedEvent event) {
                boolean writableRepoSelected = false;
                IStructuredSelection selection = (IStructuredSelection) viewer.getSelection();
                Object element = selection.getFirstElement();
                if (element instanceof RepositoryPlugin) {
                    RepositoryPlugin repo = (RepositoryPlugin) element;
                    writableRepoSelected = repo.canWrite();
                }
                addBundlesAction.setEnabled(writableRepoSelected);
            }
        });
        tree.addMouseListener(new MouseAdapter() {
View Full Code Here


            @Override
            public void run() {
                IStructuredSelection selection = (IStructuredSelection) viewer.getSelection();
                Object element = selection.getFirstElement();
                if (element != null && element instanceof RepositoryPlugin) {
                    RepositoryPlugin repo = (RepositoryPlugin) element;
                    if (repo.canWrite()) {
                        AddFilesToRepositoryWizard wizard = new AddFilesToRepositoryWizard(repo, new File[0]);
                        WizardDialog dialog = new WizardDialog(getViewSite().getShell(), wizard);
                        dialog.open();

                        viewer.refresh(repo);
View Full Code Here

        }
        return ret.toArray(new String[ret.size()]);
    }

    public static RepositoryPlugin getReleaseRepo(Project project) {
        RepositoryPlugin repo = null;
        String repoName = project.getProperty(Constants.RELEASEREPO);

        if (repoName != null && Constants.NONE.equals(repoName))
            return null;
View Full Code Here

    public static void initializeProjectDiffs(List<ProjectDiff> projects) {
        String[] repos = getReleaseRepositories();
        for (ProjectDiff projectDiff : projects) {

            RepositoryPlugin repoPlugin = ReleaseHelper.getReleaseRepo(projectDiff.getProject());
            String repo;
            if (repoPlugin != null) {
                repo = repoPlugin.getName();
            } else {
                repo = null;
            }

            if (repo == null) {
View Full Code Here

    }
    return ret.toArray(new String[ret.size()]);
  }

    public static RepositoryPlugin getReleaseRepo(Project project) {
        RepositoryPlugin repo = null;
        String repoName = project.getProperty(Constants.RELEASEREPO);

        if (repoName != null && Constants.NONE.equals(repoName))
            return null;
View Full Code Here

  public static void initializeProjectDiffs(List<ProjectDiff> projects) {
    String[] repos =  getReleaseRepositories();
    for (ProjectDiff projectDiff : projects) {

            RepositoryPlugin repoPlugin = ReleaseHelper.getReleaseRepo(projectDiff.getProject());
            String repo;
            if (repoPlugin != null) {
                repo = repoPlugin.getName();
            } else {
                repo = null;
            }

      if (repo == null) {
View Full Code Here

    monitor.beginTask(Messages.releasingProjects, projectDiffs.size());
    for (ProjectDiff projectDiff : projectDiffs) {
      if (projectDiff.isRelease()) {

        RepositoryPlugin release = null;
        if (projectDiff.getReleaseRepository() != null) {
          release = Activator.getRepositoryPlugin(projectDiff.getReleaseRepository());
        }

        ReleaseContext context = new ReleaseContext(projectDiff.getProject(), projectDiff.getBaselines(), release, releaseOption);
View Full Code Here

    assertEquals("2.4.0", versions.first().toString());
    assertEquals("2.5.0", versions.last().toString());
  }

  public void testStrategyExactVersion() throws Exception {
    RepositoryPlugin repo = createRepo();

    Map<String, String> attrs = new HashMap<String, String>();
    attrs.put("version", "2.5");
    attrs.put("strategy", "exact");

    File file = repo.get("javax.servlet:servlet-api", new Version(2, 5, 0), attrs , listener);

    assertNotNull(file);
    assertEquals( "servlet-api-2.5.jar", file.getName());
  }
View Full Code Here

    assertNotNull(file);
    assertEquals( "servlet-api-2.5.jar", file.getName());
  }

  public void testStrategyExactVersionBadGAV() throws Exception {
    RepositoryPlugin repo = createRepo();

    Map<String, String> attrs = new HashMap<String, String>();
    attrs.put("version", "1.0");
    attrs.put("strategy", "exact");

    File file = repo.get("foo.bar:foobar-api", new Version(1, 0, 0), attrs , listener);

    assertNull(file);
  }
View Full Code Here

    assertNull(file);
  }

  public void testSourceLookup() throws Exception {
    RepositoryPlugin repo = createRepo();

    Map<String, String> attrs = new HashMap<String, String>();
    attrs.put("version", "2.5");
    attrs.put("bsn", "javax.servlet:servlet-api");

    File file = repo.get("servlet-api.source", new Version(2, 5, 0), attrs , listener);

    assertTrue(file.exists());
    assertEquals("servlet-api-2.5-sources.jar", file.getName());
  }
View Full Code Here

TOP

Related Classes of aQute.bnd.service.RepositoryPlugin

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.