1 11 package org.eclipse.jdt.internal.launching; 12 13 import java.util.ArrayList ; 14 import java.util.List ; 15 16 import org.eclipse.core.runtime.CoreException; 17 import org.eclipse.debug.core.ILaunchConfiguration; 18 import org.eclipse.jdt.core.IClasspathEntry; 19 import org.eclipse.jdt.core.IJavaProject; 20 import org.eclipse.jdt.launching.*; 21 import org.eclipse.jdt.launching.IRuntimeClasspathEntry; 22 import org.eclipse.jdt.launching.IRuntimeClasspathEntryResolver; 23 import org.eclipse.jdt.launching.IVMInstall; 24 import org.eclipse.jdt.launching.JavaRuntime; 25 26 29 public class DefaultEntryResolver implements IRuntimeClasspathEntryResolver { 30 33 public IRuntimeClasspathEntry[] resolveRuntimeClasspathEntry(IRuntimeClasspathEntry entry, ILaunchConfiguration configuration) throws CoreException { 34 IRuntimeClasspathEntry2 entry2 = (IRuntimeClasspathEntry2)entry; 35 IRuntimeClasspathEntry[] entries = entry2.getRuntimeClasspathEntries(configuration); 36 List resolved = new ArrayList (); 37 for (int i = 0; i < entries.length; i++) { 38 IRuntimeClasspathEntry[] temp = JavaRuntime.resolveRuntimeClasspathEntry(entries[i], configuration); 39 for (int j = 0; j < temp.length; j++) { 40 resolved.add(temp[j]); 41 } 42 } 43 return (IRuntimeClasspathEntry[]) resolved.toArray(new IRuntimeClasspathEntry[resolved.size()]); 44 } 45 48 public IRuntimeClasspathEntry[] resolveRuntimeClasspathEntry(IRuntimeClasspathEntry entry, IJavaProject project) throws CoreException { 49 IRuntimeClasspathEntry2 entry2 = (IRuntimeClasspathEntry2)entry; 50 IRuntimeClasspathEntry[] entries = entry2.getRuntimeClasspathEntries(null); 51 List resolved = new ArrayList (); 52 for (int i = 0; i < entries.length; i++) { 53 IRuntimeClasspathEntry[] temp = JavaRuntime.resolveRuntimeClasspathEntry(entries[i], project); 54 for (int j = 0; j < temp.length; j++) { 55 resolved.add(temp[j]); 56 } 57 } 58 return (IRuntimeClasspathEntry[]) resolved.toArray(new IRuntimeClasspathEntry[resolved.size()]); 59 } 60 61 64 public IVMInstall resolveVMInstall(IClasspathEntry entry) throws CoreException { 65 return null; 66 } 67 } 68 | Popular Tags |