/** * Returns the JRE referenced by the specified JRE classpath container * path or <code>null</code> if none. * * @param jreContainerPath the path to the container to try and resolve the {@link IVMInstall} from * @return JRE referenced by the specified JRE classpath container * path or <code>null</code> * @since 3.2 */ public static IVMInstall getVMInstall(IPath jreContainerPath) { return JREContainerInitializer.resolveVM(jreContainerPath); }
/** * Returns the JRE referenced by the specified JRE classpath container * path or <code>null</code> if none. * * @param jreContainerPath the path to the container to try and resolve the {@link IVMInstall} from * @return JRE referenced by the specified JRE classpath container * path or <code>null</code> * @since 3.2 */ public static IVMInstall getVMInstall(IPath jreContainerPath) { return JREContainerInitializer.resolveVM(jreContainerPath); }
/** * The container can be updated if it refers to an existing VM. * * @see org.eclipse.jdt.core.ClasspathContainerInitializer#canUpdateClasspathContainer(org.eclipse.core.runtime.IPath, org.eclipse.jdt.core.IJavaProject) */ @Override public boolean canUpdateClasspathContainer(IPath containerPath, IJavaProject project) { if (containerPath != null && containerPath.segmentCount() > 0) { if (JavaRuntime.JRE_CONTAINER.equals(containerPath.segment(0))) { return resolveVM(containerPath) != null; } } return false; }
/** * The container can be updated if it refers to an existing VM. * * @see org.eclipse.jdt.core.ClasspathContainerInitializer#canUpdateClasspathContainer(org.eclipse.core.runtime.IPath, org.eclipse.jdt.core.IJavaProject) */ @Override public boolean canUpdateClasspathContainer(IPath containerPath, IJavaProject project) { if (containerPath != null && containerPath.segmentCount() > 0) { if (JavaRuntime.JRE_CONTAINER.equals(containerPath.segment(0))) { return resolveVM(containerPath) != null; } } return false; }
/** * @see IRuntimeClasspathEntryResolver#resolveVMInstall(IClasspathEntry) */ @Override public IVMInstall resolveVMInstall(IClasspathEntry entry) { switch (entry.getEntryKind()) { case IClasspathEntry.CPE_VARIABLE: if (entry.getPath().segment(0).equals(JavaRuntime.JRELIB_VARIABLE)) { return JavaRuntime.getDefaultVMInstall(); } break; case IClasspathEntry.CPE_CONTAINER: if (entry.getPath().segment(0).equals(JavaRuntime.JRE_CONTAINER)) { return JREContainerInitializer.resolveVM(entry.getPath()); } break; default: break; } return null; }
/** * @see IRuntimeClasspathEntryResolver#resolveVMInstall(IClasspathEntry) */ @Override public IVMInstall resolveVMInstall(IClasspathEntry entry) { switch (entry.getEntryKind()) { case IClasspathEntry.CPE_VARIABLE: if (entry.getPath().segment(0).equals(JavaRuntime.JRELIB_VARIABLE)) { return JavaRuntime.getDefaultVMInstall(); } break; case IClasspathEntry.CPE_CONTAINER: if (entry.getPath().segment(0).equals(JavaRuntime.JRE_CONTAINER)) { return JREContainerInitializer.resolveVM(entry.getPath()); } break; default: break; } return null; }
IVMInstall vm = resolveVM(containerPath); if (vm == null) { IStatus status = new Status(IStatus.ERROR, LaunchingPlugin.getUniqueIdentifier(), IJavaLaunchConfigurationConstants.ERR_VM_INSTALL_DOES_NOT_EXIST, NLS.bind(LaunchingMessages.JREContainerInitializer_JRE_referenced_by_classpath_container__0__does_not_exist__1, new String[]{containerPath.toString()}), null);
IVMInstall vm = resolveVM(containerPath); if (vm == null) { IStatus status = new Status(IStatus.ERROR, LaunchingPlugin.getUniqueIdentifier(), IJavaLaunchConfigurationConstants.ERR_VM_INSTALL_DOES_NOT_EXIST, NLS.bind(LaunchingMessages.JREContainerInitializer_JRE_referenced_by_classpath_container__0__does_not_exist__1, new String[]{containerPath.toString()}), null);
@Override public void buildFinished(IJavaProject project) { super.buildFinished(project); if (fCleaned.remove(project)) { String eeId = null; IPath container = null; try { IClasspathEntry[] rawClasspath = project.getRawClasspath(); for (int j = 0; j < rawClasspath.length; j++) { IClasspathEntry entry = rawClasspath[j]; if (entry.getEntryKind() == IClasspathEntry.CPE_CONTAINER) { IPath path = entry.getPath(); if (JavaRuntime.JRE_CONTAINER.equals(path.segment(0))) { container = path; eeId = JREContainerInitializer.getExecutionEnvironmentId(path); } } } } catch (CoreException e) { LaunchingPlugin.log(e); } if (container != null && eeId != null) { IVMInstall vm = JREContainerInitializer.resolveVM(container); validateEnvironment(eeId, project, vm); } } }
/** * @see IRuntimeClasspathEntryResolver#resolveRuntimeClasspathEntry(IRuntimeClasspathEntry, IJavaProject) */ @Override public IRuntimeClasspathEntry[] resolveRuntimeClasspathEntry(IRuntimeClasspathEntry entry, IJavaProject project) throws CoreException { IVMInstall jre = null; if (entry.getType() == IRuntimeClasspathEntry.CONTAINER && entry.getPath().segmentCount() > 1) { // a specific VM jre = JREContainerInitializer.resolveVM(entry.getPath()); } else { // default VM for project jre = JavaRuntime.getVMInstall(project); } if (jre == null) { // cannot resolve JRE return new IRuntimeClasspathEntry[0]; } return resolveLibraryLocations(jre, entry.getClasspathProperty()); }
/** * @see IRuntimeClasspathEntryResolver#resolveRuntimeClasspathEntry(IRuntimeClasspathEntry, ILaunchConfiguration) */ @Override public IRuntimeClasspathEntry[] resolveRuntimeClasspathEntry(IRuntimeClasspathEntry entry, ILaunchConfiguration configuration) throws CoreException { IVMInstall jre = null; if (entry.getType() == IRuntimeClasspathEntry.CONTAINER && entry.getPath().segmentCount() > 1) { // a specific VM jre = JREContainerInitializer.resolveVM(entry.getPath()); } else { // default VM for config jre = JavaRuntime.computeVMInstall(configuration); } if (jre == null) { // cannot resolve JRE return new IRuntimeClasspathEntry[0]; } return resolveLibraryLocations(jre, entry.getClasspathProperty()); }
/** * @see IRuntimeClasspathEntryResolver#resolveRuntimeClasspathEntry(IRuntimeClasspathEntry, ILaunchConfiguration) */ @Override public IRuntimeClasspathEntry[] resolveRuntimeClasspathEntry(IRuntimeClasspathEntry entry, ILaunchConfiguration configuration) throws CoreException { IVMInstall jre = null; if (entry.getType() == IRuntimeClasspathEntry.CONTAINER && entry.getPath().segmentCount() > 1) { // a specific VM jre = JREContainerInitializer.resolveVM(entry.getPath()); } else { // default VM for config jre = JavaRuntime.computeVMInstall(configuration); } if (jre == null) { // cannot resolve JRE return new IRuntimeClasspathEntry[0]; } return resolveLibraryLocations(jre, entry.getClasspathProperty()); }
/** * @see IRuntimeClasspathEntryResolver#resolveRuntimeClasspathEntry(IRuntimeClasspathEntry, IJavaProject) */ @Override public IRuntimeClasspathEntry[] resolveRuntimeClasspathEntry(IRuntimeClasspathEntry entry, IJavaProject project) throws CoreException { IVMInstall jre = null; if (entry.getType() == IRuntimeClasspathEntry.CONTAINER && entry.getPath().segmentCount() > 1) { // a specific VM jre = JREContainerInitializer.resolveVM(entry.getPath()); } else { // default VM for project jre = JavaRuntime.getVMInstall(project); } if (jre == null) { // cannot resolve JRE return new IRuntimeClasspathEntry[0]; } return resolveLibraryLocations(jre, entry.getClasspathProperty()); }
if (containerPath.segment(0).equals(JavaRuntime.JRE_CONTAINER)) { int length = projects.length; IVMInstall vm = resolveVM(containerPath); IClasspathContainer[] containers = new JREContainer[length]; if (vm != null) {
if (size > 0) { if (containerPath.segment(0).equals(JavaRuntime.JRE_CONTAINER)) { IVMInstall vm = resolveVM(containerPath); JREContainer container = null; if (vm != null) {
if (containerPath.segment(0).equals(JavaRuntime.JRE_CONTAINER)) { int length = projects.length; IVMInstall vm = resolveVM(containerPath); IClasspathContainer[] containers = new JREContainer[length]; if (vm != null) {
if (size > 0) { if (containerPath.segment(0).equals(JavaRuntime.JRE_CONTAINER)) { IVMInstall vm = resolveVM(containerPath); JREContainer container = null; if (vm != null) {
IExecutionEnvironment environment = manager.getEnvironment(id); if (environment != null) { vm = resolveVM(environment); } else { if (LaunchingPlugin.DEBUG_JRE_CONTAINER) {
IExecutionEnvironment environment = manager.getEnvironment(id); if (environment != null) { vm = resolveVM(environment); } else { if (LaunchingPlugin.DEBUG_JRE_CONTAINER) {