public interface IIndexManager extends IPDOMManager
CCorePlugin.getIndexManager()
.Modifier and Type | Field and Description |
---|---|
static int |
ADD_DEPENDENCIES
Constant for passing to getIndex methods.
|
static int |
ADD_DEPENDENT
Constant for passing to getIndex methods.
|
static int |
ADD_EXTENSION_FRAGMENTS_ADD_IMPORT
Constant for passing to getIndex methods.
|
static int |
ADD_EXTENSION_FRAGMENTS_CALL_HIERARCHY
Constant for passing to getIndex methods.
|
static int |
ADD_EXTENSION_FRAGMENTS_CONTENT_ASSIST
Constant for passing to getIndex methods.
|
static int |
ADD_EXTENSION_FRAGMENTS_EDITOR
Constant for passing to getIndex methods.
|
static int |
ADD_EXTENSION_FRAGMENTS_INCLUDE_BROWSER
Constant for passing to getIndex methods.
|
static int |
ADD_EXTENSION_FRAGMENTS_NAVIGATION
Constant for passing to getIndex methods.
|
static int |
ADD_EXTENSION_FRAGMENTS_SEARCH
Constant for passing to getIndex methods.
|
static int |
ADD_EXTENSION_FRAGMENTS_TYPE_HIERARCHY
Constant for passing to getIndex methods.
|
static int |
FORCE_INDEX_INCLUSION
Include files that are otherwise would be excluded from the index.
|
static int |
FOREVER
Constant for indicating that there is no time out period for joining the indexer job.
|
static int |
RESET_INDEX_INCLUSION
Causes files previously included in the index due to FORCE_INDEX_INCLUSION to loose
their index inclusion privilege.
|
static int |
SKIP_PROVIDED
Deprecated.
Extension fragments are now used depending on their configuration.
Use one of the ADD_EXTENSION_XX flags instead.
|
static int |
UPDATE_ALL
Constant for requesting an update of all translation units.
|
static int |
UPDATE_CHECK_CONFIGURATION
Constant for requesting an update of translation units if their configurations
have changed.
|
static int |
UPDATE_CHECK_CONTENTS_HASH
This flag modifies behavior of UPDATE_CHECK_TIMESTAMPS.
|
static int |
UPDATE_CHECK_TIMESTAMPS
Constant for requesting an update of translation units if their timestamps have changed.
|
static int |
UPDATE_EXTERNAL_FILES_FOR_PROJECT
Constant for requesting to update the external files for a project, also.
|
static int |
UPDATE_UNRESOLVED_INCLUDES
Constant for requesting an update of translation units that had unresolved includes.
|
ID_FAST_INDEXER, ID_FULL_INDEXER, ID_NO_INDEXER
Modifier and Type | Method and Description |
---|---|
void |
addIndexChangeListener(IIndexChangeListener listener)
Registers a listener that will be notified whenever the indexer go idle.
|
void |
addIndexerSetupParticipant(IndexerSetupParticipant participant)
Adds a participant for the indexer-setup
|
void |
addIndexerStateListener(IIndexerStateListener listener)
Registers a listener that will be notified whenever the indexer changes its state.
|
void |
export(ICProject project,
String location,
int options,
org.eclipse.core.runtime.IProgressMonitor monitor)
Exports index for usage within a team.
|
IIndex |
getIndex(ICProject project)
Returns the index for the given project.
|
IIndex |
getIndex(ICProject[] projects)
Returns the index for the given projects.
|
IIndex |
getIndex(ICProject[] projects,
int options)
Returns the index for the given projects.
|
IIndex |
getIndex(ICProject project,
int options)
Returns the index for the given project.
|
String |
getIndexerId(ICProject project)
Returns the id of the indexer working on the project.
|
boolean |
isIndexerIdle()
Checks whether the indexer is currently idle.
|
boolean |
isIndexerSetupPostponed(ICProject proj)
Returns whether the indexer-setup for a project is currently postponed.
|
boolean |
isProjectContentSynced(ICProject cproject) |
boolean |
isProjectIndexed(ICProject proj)
Returns whether an indexer is selected for the project.
|
boolean |
joinIndexer(int waitMaxMillis,
org.eclipse.core.runtime.IProgressMonitor monitor)
Joins the indexer and reports progress.
|
void |
reindex(ICProject project)
Clears the entire index of the project and schedules the indexer.
|
void |
removeIndexChangeListener(IIndexChangeListener listener)
Removes a previously registered index change listener.
|
void |
removeIndexerSetupParticipant(IndexerSetupParticipant participant)
Removes a participant for the indexer-setup
|
void |
removeIndexerStateListener(IIndexerStateListener listener)
Removes a previously registered indexer state listener.
|
void |
setIndexerId(ICProject project,
String indexerId)
Changes the indexer working on the project.
|
void |
update(ICElement[] tuSelection,
int options)
Updates the index for the given selection of translation units considering the options
supplied.
|
getDefaultIndexerId, setDefaultIndexerId
static final int ADD_DEPENDENCIES
static final int ADD_DEPENDENT
@Deprecated static final int SKIP_PROVIDED
static final int ADD_EXTENSION_FRAGMENTS_NAVIGATION
static final int ADD_EXTENSION_FRAGMENTS_CONTENT_ASSIST
static final int ADD_EXTENSION_FRAGMENTS_ADD_IMPORT
static final int ADD_EXTENSION_FRAGMENTS_CALL_HIERARCHY
static final int ADD_EXTENSION_FRAGMENTS_TYPE_HIERARCHY
static final int ADD_EXTENSION_FRAGMENTS_INCLUDE_BROWSER
static final int ADD_EXTENSION_FRAGMENTS_SEARCH
static final int ADD_EXTENSION_FRAGMENTS_EDITOR
static final int FOREVER
static final int UPDATE_ALL
static final int UPDATE_CHECK_TIMESTAMPS
static final int UPDATE_CHECK_CONFIGURATION
static final int UPDATE_EXTERNAL_FILES_FOR_PROJECT
UPDATE_ALL
or UPDATE_CHECK_TIMESTAMPS
.static final int UPDATE_CHECK_CONTENTS_HASH
static final int FORCE_INDEX_INCLUSION
static final int RESET_INDEX_INCLUSION
static final int UPDATE_UNRESOLVED_INCLUDES
IIndex getIndex(ICProject project) throws org.eclipse.core.runtime.CoreException
project
- the project to get the index fororg.eclipse.core.runtime.CoreException
IIndex getIndex(ICProject[] projects) throws org.eclipse.core.runtime.CoreException
projects
- the projects to get the index fororg.eclipse.core.runtime.CoreException
IIndex getIndex(ICProject project, int options) throws org.eclipse.core.runtime.CoreException
project
- the project to get the index foroptions
- 0
or a combination of ADD_DEPENDENCIES
and
ADD_DEPENDENT
.org.eclipse.core.runtime.CoreException
IIndex getIndex(ICProject[] projects, int options) throws org.eclipse.core.runtime.CoreException
projects
- the projects to get the index foroptions
- 0
or a combination of ADD_DEPENDENCIES
and
ADD_DEPENDENT
.org.eclipse.core.runtime.CoreException
void addIndexChangeListener(IIndexChangeListener listener)
listener
- the listener to register.void removeIndexChangeListener(IIndexChangeListener listener)
listener
- the listener to unregister.void addIndexerStateListener(IIndexerStateListener listener)
listener
- the listener to register.void removeIndexerStateListener(IIndexerStateListener listener)
listener
- the listener to unregister.boolean joinIndexer(int waitMaxMillis, org.eclipse.core.runtime.IProgressMonitor monitor)
waitMaxMillis
- time limit in milliseconds after which the method returns with
false
, or FOREVER
.monitor
- a monitor to report progress.true
, if the indexer went idle in the given time.boolean isIndexerIdle()
isIndexerSetupPostponed(ICProject)
).boolean isProjectIndexed(ICProject proj)
boolean isProjectContentSynced(ICProject cproject) throws org.eclipse.core.runtime.CoreException
cproject
- the project to checkorg.eclipse.core.runtime.CoreException
boolean isIndexerSetupPostponed(ICProject proj)
isIndexerIdle()
.
The fact that the indexer-setup for a project is no longer postponed, will be
reported using IndexerSetupParticipant.onIndexerSetup(ICProject)
.
String getIndexerId(ICProject project)
getIndexerId
in interface IPDOMManager
void setIndexerId(ICProject project, String indexerId)
setIndexerId
in interface IPDOMManager
void reindex(ICProject project)
void update(ICElement[] tuSelection, int options) throws org.eclipse.core.runtime.CoreException
tuSelection
- the translation units to update.options
- one of UPDATE_ALL
or UPDATE_CHECK_TIMESTAMPS
optionally
combined with UPDATE_EXTERNAL_FILES_FOR_PROJECT
and
UPDATE_CHECK_CONTENTS_HASH
.org.eclipse.core.runtime.CoreException
void export(ICProject project, String location, int options, org.eclipse.core.runtime.IProgressMonitor monitor) throws org.eclipse.core.runtime.CoreException
project
- a project for which the PDOM is to be exported.location
- the target location for the database.options
- currently none are supported.org.eclipse.core.runtime.CoreException
void addIndexerSetupParticipant(IndexerSetupParticipant participant)
void removeIndexerSetupParticipant(IndexerSetupParticipant participant)
Copyright (c) IBM Corp. and others 2004, 2020. All Rights Reserved.