fgInitialized= true;
	public static TypeInfo[] getAllTypes(IProgressMonitor monitor) throws JavaModelException {				forceDeltaComplete();				synchronized(fgLock) {						fgInitialized= true;						if (fgTypeCache == null) {				// cache is empty								if (fgTypeCacherThread == null) {					// cache synchroneously					ArrayList searchResult= new ArrayList(fgSizeHint);					if (search(new TypeInfoRequestor(searchResult), IJavaSearchConstants.WAIT_UNTIL_READY_TO_SEARCH, monitor)) {						TypeInfo[] result= (TypeInfo[]) searchResult.toArray(new TypeInfo[searchResult.size()]);						Arrays.sort(result, fgTypeNameComparator);						fgTypeCache= result;						fgSizeHint= result.length;					}				} else {					// wait for the thread to finished					try {						while (fgTypeCache == null)							fgLock.wait();					} catch (InterruptedException e) {						JavaPlugin.log(e);					}				}			}						if (monitor != null)				monitor.done();						return fgTypeCache;		}	}