@Override public void endIdleState(Map<ICompilerProject, Set<ICompilationUnit>> cusToUpdate) { buildSync.startAllowingFileScopeRequests(); try { for (Entry<ICompilerProject, Set<ICompilationUnit>> e : cusToUpdate.entrySet()) { ((CompilerProject) e.getKey()).updatePublicAndInternalDefinitions(e.getValue()); } } catch (InterruptedException e1) { assert false : "unlockAndUpdateCompilationUnits() should not be interrupted"; } finally { buildSync.endAllowingFileScopeRequests(); buildSync.endIdleState(); } }
/** * Determines if there is any currently running build activity in the workspace. This method * should only be called from assert statements, it is meant only for debugging. * * @return true if there is any build activity, false otherwise. */ public boolean isBuilding() { return buildSync.isBuilding(); }
/** Called by code in {@link RequestMaker} when a request has completed execution. */ public void endRequest() { buildSync.endRequest(); }
/** * Called by code in {@link RequestMaker} when a request is about to be submitted for execution. * Blocks until the workspace has left the idle state. * * @param requestNeededForFileScope true if the request that is about to be submitted for * execution is needed to build an {@link IFileScope}. */ public void startRequest(boolean requestNeededForFileScope) { buildSync.startRequest(requestNeededForFileScope); }
@Override public void doneBuilding() { buildSync.endRequest(); }
@Override public void startBuilding() { buildSync.startRequest(false); }
@Override public void startIdleState() { buildSync.startIdleState(); }