org.eclipse.core.runtime.jobs.ILock Java Examples

The following examples show how to use org.eclipse.core.runtime.jobs.ILock. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: AppEngineStandardFacet.java    From google-cloud-eclipse with Apache License 2.0 5 votes vote down vote up
/**
 * Obtain the project lock.
 */
private static ILock acquireLock(IProject project) throws CoreException {
  try {
    ILock lock = installationLocks.get(project);
    lock.acquire();
    return lock;
  } catch (ExecutionException ex) {
    throw new CoreException(
        StatusUtil.error(AppEngineStandardFacet.class, "Unable to acquire project lock", ex));
  }
}
 
Example #2
Source File: AppEngineStandardFacet.java    From google-cloud-eclipse with Apache License 2.0 4 votes vote down vote up
@Override
public ILock load(IProject project) throws Exception {
  return Job.getJobManager().newLock();
}