private static Version readWorkspaceVersion(final URL workspace){
  final File versionFile=getVersionFile(workspace,false);
  if (versionFile == null || !versionFile.exists()) {
    return null;
  }
  try {
    final Properties props=new Properties();
    final FileInputStream is=new FileInputStream(versionFile);
    try {
      props.load(is);
    }
  finally {
      is.close();
    }
    String versionString=props.getProperty(WORKSPACE_CHECK_REFERENCE_BUNDLE_NAME);
    if (versionString != null) {
      return Version.parseVersion(versionString);
    }
    versionString=props.getProperty(WORKSPACE_CHECK_REFERENCE_BUNDLE_NAME_LEGACY);
    if (versionString != null) {
      return Version.parseVersion(versionString);
    }
    return null;
  }
 catch (  final IOException e) {
    IDEWorkbenchPlugin.log("Could not read version file " + versionFile,new Status(IStatus.ERROR,IDEWorkbenchPlugin.IDE_WORKBENCH,IStatus.ERROR,e.getMessage() == null ? "" : e.getMessage(),e));
    return null;
  }
catch (  final IllegalArgumentException e) {
    IDEWorkbenchPlugin.log("Could not parse version in " + versionFile,new Status(IStatus.ERROR,IDEWorkbenchPlugin.IDE_WORKBENCH,IStatus.ERROR,e.getMessage() == null ? "" : e.getMessage(),e));
    return null;
  }
}

private static Version readWorkspaceVersion ( final URL workspace ) { final File versionFile = getVersionFile ( workspace , false ) ; if ( versionFile == null || ! versionFile . exists ( ) ) { return null ; } try { final Properties props = new Properties ( ) ; final FileInputStream is = new FileInputStream ( versionFile ) ; try { props . load ( is ) ; } finally { is . close ( ) ; } String versionString = props . getProperty ( WORKSPACE_CHECK_REFERENCE_BUNDLE_NAME ) ; if ( versionString != null ) { return Version . parseVersion ( versionString ) ; } versionString = props . getProperty ( WORKSPACE_CHECK_REFERENCE_BUNDLE_NAME_LEGACY ) ; if ( versionString != null ) { return Version . parseVersion ( versionString ) ; } return null ; } catch ( final IOException e ) { IDEWorkbenchPlugin . log ( "Could not read version file " + versionFile , new Status ( IStatus . ERROR , IDEWorkbenchPlugin . IDE_WORKBENCH , IStatus . ERROR , e . getMessage ( ) == null ? "" : e . getMessage ( ) , e ) ) ; return null ; } catch ( final IllegalArgumentException e ) { IDEWorkbenchPlugin . log ( "Could not parse version in " + versionFile , new Status ( IStatus . ERROR , IDEWorkbenchPlugin . IDE_WORKBENCH , IStatus . ERROR , e . getMessage ( ) == null ? "" : e . getMessage ( ) , e ) ) ; return null ; } }
look at the argument url for the workspace ' s version information . return that version if found and null otherwise .
