if (locker == null) throw new IOException(EclipseAdaptorMsg.fileManager_cannotLock); return locker.lock();
if (locker == null) throw new IOException(EclipseAdaptorMsg.fileManager_cannotLock); } boolean locked = locker.lock(); if (locked || !wait) return locked;  long start = System.currentTimeMillis(); while (true) { try { Thread.sleep(200); } catch (InterruptedException e) { } locked = locker.lock(); if (locked) return true;  long time = System.currentTimeMillis() - start; if (time > MAX_LOCK_WAIT) return false; }
	private boolean lock() throws IOException {		if (readOnly)			return false;		if (locker == null)			locker = BasicLocation.createLocker(lockFile, lockMode);		if (locker == null)			throw new IOException(EclipseAdaptorMsg.fileManager_cannotLock);		return locker.lock();	}