Package org.eclipse.debug.core.sourcelookup.containers

Examples of org.eclipse.debug.core.sourcelookup.containers.ProjectSourceContainer


            throws CoreException {
        final List<ISourceContainer> containers = new ArrayList<ISourceContainer>();
        final IProject[] projects = LaunchUtils
                .getErlangLaunchConfigurationProjects(configuration);
        for (final IProject p : projects) {
            containers.add(new ProjectSourceContainer(p, false));
        }
        if (containers.isEmpty()) {
            containers.add(new WorkspaceSourceContainer());
        }
        final String runtimeName = configuration.getAttribute(
View Full Code Here


    //IProject project = XVRUtils.getActiveProject();
    String name = configuration.getAttribute(XVRConstants.XVR_LAUNCH_CONFIG_PROJECT_NAME_KEY, (String)null);
    IProject project = ResourcesPlugin.getWorkspace().getRoot().getProject(name);
    ISourceContainer sourceContainer = null;
    if(project.exists()){
      sourceContainer = new ProjectSourceContainer(project, false);
    }else{
      sourceContainer = new WorkspaceSourceContainer();
    }
    return new ISourceContainer[]{sourceContainer};
  }
View Full Code Here

  private ISourceContainer[] computeWorkspaceSourceContainers(ILaunchConfiguration configuration, IProgressMonitor monitor) throws CoreException {
    IProject[] projects = ResourcesPlugin.getWorkspace().getRoot().getProjects();
    ISourceContainer[] containers = new ISourceContainer[projects.length];
   
    for (int i = 0; i < projects.length; i++) {
      ISourceContainer container = new ProjectSourceContainer(projects[i], false);
      containers[i] = container;
    }
    return containers;   
  }
View Full Code Here

  private boolean isAnyProjectInSourceContainers(
      ISourceContainer[] containers, Set<IProject> projects) {
    for (ISourceContainer container : containers) {
      if (container instanceof ProjectSourceContainer) {
        ProjectSourceContainer projectContainer = (ProjectSourceContainer) container;
        if (projects.contains(projectContainer.getProject()))
          return true;
      }
      try {
        boolean found = isAnyProjectInSourceContainers(
            container.getSourceContainers(), projects);
View Full Code Here

  }

  protected ISourceContainer[] createSourceContainers() throws CoreException {
    ArrayList<ISourceContainer> containers = new ArrayList<ISourceContainer>();

    ISourceContainer projectContainer = new ProjectSourceContainer(project,
        false);
    containers.add(projectContainer);
    IBuildpathEntry[] entries = DLTKCore.create(project).getRawBuildpath();
    if (entries != null) {
      for (IBuildpathEntry element : entries) {
        if (element.getEntryKind() == IBuildpathEntry.BPE_LIBRARY) {
          IPath path = element.getPath();
          File file = new File(path.toOSString());
          if (element.getContentKind() == IProjectFragment.K_BINARY) {
            containers.add(new ExternalArchiveSourceContainer(file
                .getAbsolutePath(), false));
          } else {
            containers
                .add(new DirectorySourceContainer(file, false));
          }
        } else if (element.getEntryKind() == IBuildpathEntry.BPE_PROJECT) {
          IResource resource = ResourcesPlugin.getWorkspace()
              .getRoot().findMember(
                  element.getPath().lastSegment());
          if (resource instanceof IProject) {
            IProject includeProject = (IProject) resource;
            containers.add(new ProjectSourceContainer(
                includeProject, false));
          }
        } else if (element.getEntryKind() == IBuildpathEntry.BPE_VARIABLE) {
          IPath path = element.getPath();
          containers.add(new PHPVariableSourceContainer(path));
View Full Code Here

TOP

Related Classes of org.eclipse.debug.core.sourcelookup.containers.ProjectSourceContainer

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.