static List<IRuntimeClasspathEntry> computeClasspath(IJavaProject javaProject) throws CoreException {
  IRuntimeClasspathEntry[] unresolvedRuntimeClasspath=JavaRuntime.computeUnresolvedRuntimeClasspath(javaProject);
  List<IRuntimeClasspathEntry> resolvedRuntimeClasspath=new ArrayList<IRuntimeClasspathEntry>();
  for (  IRuntimeClasspathEntry unresolvedClasspathEntry : unresolvedRuntimeClasspath) {
    if (JavaRuntime.isVMInstallReference(unresolvedClasspathEntry)) {
      continue;
    }
    resolvedRuntimeClasspath.addAll(Arrays.asList(JavaRuntime.resolveRuntimeClasspathEntry(unresolvedClasspathEntry,javaProject)));
  }
  try {
    resolvedRuntimeClasspath.addAll(0,GWTProjectUtilities.getGWTSourceFolderPathsFromProjectAndDependencies(javaProject,false));
  }
 catch (  SdkException e) {
    throw new CoreException(new Status(IStatus.ERROR,GWTPlugin.PLUGIN_ID,e.getLocalizedMessage(),e));
  }
  GwtSdk gwtRuntime=GwtSdk.findSdkFor(javaProject);
  if (gwtRuntime == null) {
    GWTPluginLog.logWarning("Unable to find GWT runtime for project " + javaProject.getElementName() + ", will try to continue GWT compilation..");
    return resolvedRuntimeClasspath;
  }
  IStatus validationStatus=gwtRuntime.validate();
  if (!validationStatus.isOK()) {
    GWTPluginLog.logWarning("GWT runtime for project " + javaProject.getElementName() + " is not valid: "+ validationStatus.getMessage()+ ". Will attempt to proceed with GWT compilation anyway.");
    return resolvedRuntimeClasspath;
  }
  try {
    File gwtDevJar=gwtRuntime.getDevJar();
    resolvedRuntimeClasspath.add(JavaRuntime.newArchiveRuntimeClasspathEntry(Path.fromOSString(gwtDevJar.getAbsolutePath())));
  }
 catch (  SdkException e) {
    GWTPluginLog.logWarning(e,"Unable to add gwt-dev.jar to the compiler's classpath; will attempt GWT compilation anyway.");
  }
  return resolvedRuntimeClasspath;
}

static List < IRuntimeClasspathEntry > computeClasspath ( IJavaProject javaProject ) throws CoreException { IRuntimeClasspathEntry [ ] unresolvedRuntimeClasspath = JavaRuntime . computeUnresolvedRuntimeClasspath ( javaProject ) ; List < IRuntimeClasspathEntry > resolvedRuntimeClasspath = new ArrayList < IRuntimeClasspathEntry > ( ) ; for ( IRuntimeClasspathEntry unresolvedClasspathEntry : unresolvedRuntimeClasspath ) { if ( JavaRuntime . isVMInstallReference ( unresolvedClasspathEntry ) ) { continue ; } resolvedRuntimeClasspath . addAll ( Arrays . asList ( JavaRuntime . resolveRuntimeClasspathEntry ( unresolvedClasspathEntry , javaProject ) ) ) ; } try { resolvedRuntimeClasspath . addAll ( 0 , GWTProjectUtilities . getGWTSourceFolderPathsFromProjectAndDependencies ( javaProject , false ) ) ; } catch ( SdkException e ) { throw new CoreException ( new Status ( IStatus . ERROR , GWTPlugin . PLUGIN_ID , e . getLocalizedMessage ( ) , e ) ) ; } GwtSdk gwtRuntime = GwtSdk . findSdkFor ( javaProject ) ; if ( gwtRuntime == null ) { GWTPluginLog . logWarning ( "Unable to find GWT runtime for project " + javaProject . getElementName ( ) + ", will try to continue GWT compilation.." ) ; return resolvedRuntimeClasspath ; } IStatus validationStatus = gwtRuntime . validate ( ) ; if ( ! validationStatus . isOK ( ) ) { GWTPluginLog . logWarning ( "GWT runtime for project " + javaProject . getElementName ( ) + " is not valid: " + validationStatus . getMessage ( ) + ". Will attempt to proceed with GWT compilation anyway." ) ; return resolvedRuntimeClasspath ; } try { File gwtDevJar = gwtRuntime . getDevJar ( ) ; resolvedRuntimeClasspath . add ( JavaRuntime . newArchiveRuntimeClasspathEntry ( Path . fromOSString ( gwtDevJar . getAbsolutePath ( ) ) ) ) ; } catch ( SdkException e ) { GWTPluginLog . logWarning ( e , "Unable to add gwt-dev.jar to the compiler's classpath; will attempt GWT compilation anyway." ) ; } return resolvedRuntimeClasspath ; }
computes a gwt compiler - tailored list of classpath entries for the given java project .
