}
@Override
public boolean clean(Map<ICompilerProject, Set<File>> invalidatedSWCFiles, Map<ICompilerProject, Set<ICompilationUnit>> cusToUpdate, final boolean clearFileScope)
{
IWorkspaceProfilingDelegate profilingDelegate = project.getWorkspace().getProfilingDelegate();
if (profilingDelegate != null)
profilingDelegate.operationStarted(this, Operation.INVALIDATE_CU);
project.removeDependencies(Collections.<ICompilationUnit>singletonList(this));
if (clearFileScope)
{
clearIncludedFilesFromWorkspace();
// If this compilation unit is invisible don't try to
// remove definitions from the project scope.
if (!isInvisible())
project.getScope().removeCompilationUnits(Collections.<ICompilationUnit>singletonList(this));
fileScopeRequest.set(null);
// If we are are invalidating the file scope,
// we should also invalidate the ast.
syntaxTreeRequest.set(null);
project.removeAnyUnfoundDependencies(this);
}
abc.set(null);
tags.set(null);
problems.set(null);
embedCompilationUnits.clear();
project.resetScopeCacheForCompilationUnit(this);
if (clearFileScope)
updateDefinitions(cusToUpdate);
// delegate to a virtual method that sub-classes can override to
// do additional cleaning.
handleClean(clearFileScope, invalidatedSWCFiles);
if (profilingDelegate != null)
profilingDelegate.operationCompleted(this, Operation.INVALIDATE_CU);
return true;
}