1 11 package org.eclipse.jdt.launching.sourcelookup.containers; 12 13 import org.eclipse.core.runtime.CoreException; 14 import org.eclipse.core.runtime.IProgressMonitor; 15 import org.eclipse.debug.core.ILaunchConfiguration; 16 import org.eclipse.debug.core.sourcelookup.ISourceContainer; 17 import org.eclipse.debug.core.sourcelookup.ISourcePathComputerDelegate; 18 import org.eclipse.jdt.launching.IRuntimeClasspathEntry; 19 import org.eclipse.jdt.launching.JavaRuntime; 20 21 35 public class JavaSourcePathComputer implements ISourcePathComputerDelegate { 36 37 41 public static final String ID = "org.eclipse.jdt.launching.sourceLookup.javaSourcePathComputer"; 43 48 public String getId() { 49 return ID; 50 } 51 52 55 public ISourceContainer[] computeSourceContainers(ILaunchConfiguration configuration, IProgressMonitor monitor) throws CoreException { 56 IRuntimeClasspathEntry[] entries = JavaRuntime.computeUnresolvedSourceLookupPath(configuration); 57 IRuntimeClasspathEntry[] resolved = JavaRuntime.resolveSourceLookupPath(entries, configuration); 58 return JavaRuntime.getSourceContainers(resolved); 59 } 60 61 } 62 | Popular Tags |