JavaScript project reindexing [message #1017117] |
Sat, 09 March 2013 09:03  |
Eclipse User |
|
|
|
Hi,
I'm looking for method to fully reindexing javascript project (like while workbench startup, or while reconcile)?
project->clean not work :/ this method too:
JavaModelManager.getJavaModelManager().getIndexManager().reset();
project.build(IncrementalProjectBuilder.FULL_BUILD, JavaScriptCore.BUILDER_ID, null, monitor);
[Updated on: Sat, 09 March 2013 09:03] by Moderator
|
|
|
|
|
Re: JavaScript project reindexing [message #1017588 is a reply to message #1017169] |
Tue, 12 March 2013 02:38  |
Eclipse User |
|
|
|
The provider itself can say whether or not it applies to a particular file, but org.eclipse.wst.jsdt.internal.core.search.indexing.IndexManager#indexAll(IProject) looks like it might be what you're looking for--beware that it's internal, although unlikely to be changed. The reset() method you were looking at may only remove the in-memory representations without invalidating the indexed already on disk, and the build() method will only invoke the builders. JSDT (like JDT) is foremost a source model; the builder only serves to perform validation.
As an aside, you should only mark the files as needing rebuilding with IResource#touch() rather than forcing a rebuild immediately. Users who have automatic builds disabled shouldn't have to endure a build until they ask for it.
|
|
|
Powered by
FUDForum. Page generated in 0.03412 seconds