public final class Indexer
extends java.lang.Object
| Modifier and Type | Class and Description |
|---|---|
static interface |
Indexer.Listener |
| Modifier and Type | Field and Description |
|---|---|
static boolean |
DEBUG |
static boolean |
DEBUG_ALLOCATIONS |
static boolean |
DEBUG_INSERTIONS |
static int |
DEBUG_LOG_SIZE_MB |
static boolean |
DEBUG_SCHEDULING |
static boolean |
DEBUG_SELFTEST |
static boolean |
DEBUG_TIMING |
| Constructor and Description |
|---|
Indexer(Nd toPopulate,
IWorkspaceRoot workspaceRoot) |
| Modifier and Type | Method and Description |
|---|---|
void |
addListener(Indexer.Listener newListener)
Adds the given listener.
|
protected void |
deleteResource(NdResourceFile toDelete,
IProgressMonitor monitor)
Performs a non-atomic delete of the given resource file.
|
void |
enableAutomaticIndexing(boolean enabled)
Enables or disables the "rescanAll" method.
|
static Indexer |
getInstance() |
void |
makeDirty(IPath location)
Dirties the given filesystem location.
|
void |
makeDirty(IProject project)
Schedules a rescan of the given project.
|
void |
makeWorkspacePathDirty(IPath pathToRescan)
Schedules a rescan of the given path (which may be either a workspace path or an absolute path on the local
filesystem).
|
void |
rebuildIndex(IProgressMonitor monitor) |
void |
removeListener(Indexer.Listener oldListener) |
void |
requestRebuildIndex() |
void |
rescan(IProgressMonitor monitor) |
void |
rescanAll() |
void |
waitForIndex(int waitingPolicy,
IProgressMonitor monitor) |
void |
waitForIndex(IProgressMonitor monitor) |
public static boolean DEBUG
public static boolean DEBUG_ALLOCATIONS
public static boolean DEBUG_TIMING
public static boolean DEBUG_SCHEDULING
public static boolean DEBUG_INSERTIONS
public static boolean DEBUG_SELFTEST
public static int DEBUG_LOG_SIZE_MB
public Indexer(Nd toPopulate, IWorkspaceRoot workspaceRoot)
public static Indexer getInstance()
public void enableAutomaticIndexing(boolean enabled)
waitForIndex(IProgressMonitor).
Normally the indexer runs automatically and asynchronously when resource changes occur.
However, if this variable is set to false the indexer only runs when someone invokes
waitForIndex(IProgressMonitor). This can be used to eliminate race conditions
when running the unit tests, since indexing will not occur unless it is triggered
explicitly.
Synchronize on automaticIndexingMutex before accessing.
public void rescan(IProgressMonitor monitor)
throws CoreException
CoreExceptionprotected void deleteResource(NdResourceFile toDelete, IProgressMonitor monitor)
public void rescanAll()
public void addListener(Indexer.Listener newListener)
public void removeListener(Indexer.Listener oldListener)
public void waitForIndex(IProgressMonitor monitor)
public void waitForIndex(int waitingPolicy,
IProgressMonitor monitor)
public void rebuildIndex(IProgressMonitor monitor)
throws CoreException
CoreExceptionpublic void requestRebuildIndex()
public void makeDirty(IPath location)
location - an absolute filesystem locationpublic void makeDirty(IProject project)
public void makeWorkspacePathDirty(IPath pathToRescan)
pathToRescan -