Java 类org.eclipse.debug.core.sourcelookup.containers.ProjectSourceContainer 实例源码

项目:gerrit-tools    文件:BranchOperationUI.java   
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);
            if (found)
                return true;
        } catch (CoreException e) {
            // Ignore the child source containers, continue search
        }
    }
    return false;
}
项目:brainfuck    文件:BfSourcePathComputer.java   
@Override
public ISourceContainer[] computeSourceContainers(ILaunchConfiguration configuration, IProgressMonitor monitor)
        throws CoreException {
    String projectName = configuration.getAttribute(BfLaunchConfigurationDelegate.PROJECT_ATTR, "");
    IProject project = ResourcesPlugin.getWorkspace().getRoot().getProject(projectName);
    if (project != null) {
        return new ISourceContainer[]{new ProjectSourceContainer(project, false)};
    }
    else {
        return new ISourceContainer[]{new WorkspaceSourceContainer()};
    }
}