/** * Returns the classpath entries associated with the given VM * in the context of the given path and project. * * @param vm the VM * @param containerPath the container path resolution is for * @param project project the resolution is for * @return classpath entries */ private static IClasspathEntry[] getClasspathEntries(IVMInstall vm, IPath containerPath, IJavaProject project) { String id = JavaRuntime.getExecutionEnvironmentId(containerPath); IClasspathEntry[] entries = null; if (id == null) { // cache classpath entries per JRE when not bound to an EE entries = fgClasspathEntries.get(vm); if (entries == null) { entries = computeClasspathEntries(vm, project, id); fgClasspathEntries.put(vm, entries); } } else { if (LaunchingPlugin.DEBUG_JRE_CONTAINER) { LaunchingPlugin.trace("\tEE:\t" + id); //$NON-NLS-1$ } // dynamically compute entries when bound to an EE entries = computeClasspathEntries(vm, project, id); } return entries; }
/** * Returns the classpath entries associated with the given VM * in the context of the given path and project. * * @param vm the VM * @param containerPath the container path resolution is for * @param project project the resolution is for * @return classpath entries */ private static IClasspathEntry[] getClasspathEntries(IVMInstall vm, IPath containerPath, IJavaProject project) { String id = JavaRuntime.getExecutionEnvironmentId(containerPath); IClasspathEntry[] entries = null; if (id == null) { // cache classpath entries per JRE when not bound to an EE entries = fgClasspathEntries.get(vm); if (entries == null) { entries = computeClasspathEntries(vm, project, id); fgClasspathEntries.put(vm, entries); } } else { if (LaunchingPlugin.DEBUG_JRE_CONTAINER) { LaunchingPlugin.trace("\tEE:\t" + id); //$NON-NLS-1$ } // dynamically compute entries when bound to an EE entries = computeClasspathEntries(vm, project, id); } return entries; }