1 11 package org.eclipse.jdt.internal.debug.ui.snippeteditor; 12 13 import org.eclipse.core.runtime.CoreException; 14 import org.eclipse.debug.core.ILaunchConfiguration; 15 import org.eclipse.jdt.core.IJavaProject; 16 import org.eclipse.jdt.launching.IJavaLaunchConfigurationConstants; 17 import org.eclipse.jdt.launching.IRuntimeClasspathEntry; 18 import org.eclipse.jdt.launching.JavaRuntime; 19 import org.eclipse.jdt.launching.StandardSourcePathProvider; 20 21 24 public class ScrapbookSourcepathProvider extends StandardSourcePathProvider { 25 26 public IRuntimeClasspathEntry[] computeUnresolvedClasspath(ILaunchConfiguration configuration) throws CoreException { 27 boolean useDefault = configuration.getAttribute(IJavaLaunchConfigurationConstants.ATTR_DEFAULT_SOURCE_PATH, true); 28 IRuntimeClasspathEntry[] entries = null; 29 if (useDefault) { 30 IJavaProject project = JavaRuntime.getJavaProject(configuration); 32 entries = JavaRuntime.computeUnresolvedRuntimeClasspath(project); 33 } else { 34 entries = recoverRuntimePath(configuration, IJavaLaunchConfigurationConstants.ATTR_SOURCE_PATH); 36 } 37 return entries; 38 } 39 } 40 | Popular Tags |