fgTypeCacherThread= new TypeCacher(fgSizeHint, 0, null); fgTypeCacherThread.start(); }   if (fgTypeCacherThread != null) { try { while (fgTypeCache == null) fgLock.wait(); } catch (InterruptedException e) { JavaPlugin.log(e);
fgTypeCache= doSynchSearchTypes(monitor, fgSizeHint); if (fgTypeCache != null) { fgSizeHint= fgTypeCache.length; if (DEBUG) System.err.println("synch cache: " + fgSizeHint); } } else {  if (fgTypeCacherThread != null) { try { while (fgTypeCache == null) fgLock.wait(); } catch (InterruptedException e) { JavaPlugin.log(e); }
	public static TypeInfo[] getAllTypes(IProgressMonitor monitor) throws JavaModelException {				synchronized(fgLock) {						if (fgTypeCache == null) {								if (fgTypeCacherThread == null) {					fgTypeCacherThread= new TypeCacher(fgSizeHint, 0, null);					fgTypeCacherThread.start();				}								// wait for the thread to finished				if (fgTypeCacherThread != null) {					try {						while (fgTypeCache == null)							fgLock.wait();					} catch (InterruptedException e) {						JavaPlugin.log(e);					}				}				Assert.isNotNull(fgTypeCache);			}						if (monitor != null)				monitor.done();						return fgTypeCache;		}	}