Package aQute.bnd.build

Examples of aQute.bnd.build.Project


            result = getRepositoryBundles(repo);
        } else if (parentElement instanceof RepositoryBundle) {
            RepositoryBundle bundle = (RepositoryBundle) parentElement;
            result = getRepositoryBundleVersions(bundle);
        } else if (parentElement instanceof Project) {
            Project project = (Project) parentElement;
            result = getProjectBundles(project);
        }

        return result;
    }
View Full Code Here


        }
    }

    private void loadBuilders(IProject project) {
        try {
            Project model = Central.getProject(project.getLocation().toFile());
            if (model != null)
                projectBuilders.addAll(model.getSubBuilders());
        } catch (Exception e) {
            logger.logError(Messages.RunBundlesPart_errorGettingBuilders, e);
        }
    }
View Full Code Here

                cell.setImage(image);
            }
        } else if (element instanceof Project) {
            if (index == 0) {
                Project project = (Project) element;
                StyledString label = new StyledString(project.getName());
                if (showRepoId)
                    label.append("  [Workspace]", StyledString.QUALIFIER_STYLER);

                cell.setText(label.getString());
                cell.setStyleRanges(label.getStyleRanges());
View Full Code Here

            if (element instanceof Actionable) {
                return ((Actionable) element).title();
            } else if (element instanceof RepositoryPlugin) {
                return ((RepositoryPlugin) element).getName();
            } else if (element instanceof Project) {
                Project project = (Project) element;
                return project.getName();
            } else if (element instanceof ProjectBundle) {
                return ((ProjectBundle) element).getBsn();
            }
        } catch (Exception e) {
            // just take the default
View Full Code Here

    }

    void setupProjects() throws Exception {
        IProject[] projects = ResourcesPlugin.getWorkspace().getRoot().getProjects();
        for (IProject project : projects) {
            Project model = Central.getProject(project.getLocation().toFile());
            if (model != null) {
                File targetDir = getTarget(model);
                if (targetDir != null) {
                    File indexFile = new File(targetDir, ".index");
                    if (indexFile.isFile()) {
View Full Code Here

            // Make sure we do macro expansion properly
            //

            File resource = model.getBndResource();
            if (model.isProjectFile()) {
                Project project = Central.getProject(resource.getParentFile());
                //
                // run's in projects are based on the project
                // and implicitly the ws
                //
                model.setProject(project);
View Full Code Here

        PrintStream pathsStream = null;
        try {
            File targetDir;

            File projectDir = file.getProject().getLocation().toFile();
            Project project = Central.getProject(projectDir);
            if (project != null)
                targetDir = project.getTarget();
            else {
                String targetName = Workspace.getDefaults().get("target", "generated");
                targetDir = new File(projectDir, targetName);
            }
View Full Code Here

        IProject project = wsfiles[0].getProject();

        // Calculate the manifest
        try {
            Project bndProject = Central.getInstance().getModel(JavaCore.create(project));
            if (bndProject == null)
                return null;
            Builder builder;
            if (file.getName().equals(Project.BNDFILE)) {
                builder = bndProject.getSubBuilders().iterator().next();
            } else {
                builder = bndProject.getSubBuilder(file);
            }

            if (builder == null) {
                builder = new Builder();
                builder.setProperties(file);
View Full Code Here

        return;
      }

      for (Map.Entry<Project, List<File>> me : bndFiles.entrySet()) {

        Project project;
        try {
          project = me.getKey();
        } catch (Exception e) {
          throw new RuntimeException(e);
        }
View Full Code Here

  public void selectionChanged(IAction action, ISelection selection) {
    IFile[] locations = getLocations(selection);
    bndFiles = new LinkedHashMap<Project, List<File>>();
    for (IFile iFile : locations) {
      File file = iFile.getLocation().toFile();
      Project project;
      try {
          IProject iProject = iFile.getProject();
        project = Central.getWorkspace().getProject(iProject.getName());
        // .bnd files exists in cnf that are unreleasable
        if (project == null || project.isCnf()) {
            continue;
        }
      } catch (Exception e) {
        throw new RuntimeException(e);
      }
View Full Code Here

TOP

Related Classes of aQute.bnd.build.Project

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.