1 11 package org.eclipse.jdt.internal.launching.environments; 12 13 import org.eclipse.core.runtime.CoreException; 14 import org.eclipse.core.runtime.IConfigurationElement; 15 import org.eclipse.core.runtime.IProgressMonitor; 16 import org.eclipse.jdt.launching.IVMInstall; 17 import org.eclipse.jdt.launching.environments.CompatibleEnvironment; 18 import org.eclipse.jdt.launching.environments.IExecutionEnvironmentAnalyzerDelegate; 19 20 26 class Analyzer implements IExecutionEnvironmentAnalyzerDelegate { 27 28 private IConfigurationElement fElement; 29 30 private IExecutionEnvironmentAnalyzerDelegate fDelegate; 31 32 Analyzer(IConfigurationElement element) { 33 fElement = element; 34 } 35 36 39 public CompatibleEnvironment[] analyze(IVMInstall vm, IProgressMonitor monitor) throws CoreException { 40 return getDelegate().analyze(vm, monitor); 41 } 42 43 49 private IExecutionEnvironmentAnalyzerDelegate getDelegate() throws CoreException { 50 if (fDelegate == null) { 51 fDelegate = (IExecutionEnvironmentAnalyzerDelegate) fElement.createExecutableExtension("class"); } 53 return fDelegate; 54 } 55 56 60 public String getId() { 61 return fElement.getAttribute("id"); } 63 64 } 65 | Popular Tags |