/* (non-Javadoc)
   * @see org.eclipse.debug.internal.core.sourcelookup.ISourcePathComputerDelegate#computeSourceContainers(org.eclipse.debug.core.ILaunchConfiguration, org.eclipse.core.runtime.IProgressMonitor)
   */
  public ISourceContainer[] computeSourceContainers(
      ILaunchConfiguration configuration, IProgressMonitor monitor) throws CoreException {
    String project =
        configuration.getAttribute(IRascalResources.ATTR_RASCAL_PROJECT, (String) null);

    if (project != null) {
      IProject associatedProject = ResourcesPlugin.getWorkspace().getRoot().getProject(project);
      Evaluator eval = ProjectEvaluatorFactory.getInstance().getEvaluator(associatedProject);
      List<ISourceLocation> path = eval.getRascalResolver().collect();
      ISourceContainer[] result = new ISourceContainer[path.size() + 1];

      int i = 0;
      for (ISourceLocation elem : path) {
        result[i++] = new URISourceContainer(elem);
      }

      result[i++] = new DummyConsoleSourceContainer();

      return result;
    } else {
      /* default case */
      return new ISourceContainer[] {new DummyConsoleSourceContainer()};
    }
  }
 public RascalInterpreter(IProject project) {
   super(ProjectEvaluatorFactory.getInstance().createProjectEvaluator(project));
 }
 public RascalInterpreter(IProject project, PrintWriter stdout, PrintWriter stderr) {
   super(stdout, stderr);
   ProjectEvaluatorFactory.getInstance().initializeProjectEvaluator(project, getEvaluator());
 }