Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Web Tools Project (WTP) » JavaScript project reindexing
JavaScript project reindexing [message #1017117] Sat, 09 March 2013 14:03 Go to next message
Dawid Pakula is currently offline Dawid PakulaFriend
Messages: 56
Registered: March 2013
Member
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 14:03]

Report message to a moderator

Re: JavaScript project reindexing [message #1017155 is a reply to message #1017117] Sun, 10 March 2013 03:46 Go to previous messageGo to next message
Nitin Dahyabhai is currently offline Nitin DahyabhaiFriend
Messages: 2337
Registered: July 2009
Senior Member
Why do you need to reindex it?

---
Nitin Dahyabhai
Eclipse WTP, IBM
Re: JavaScript project reindexing [message #1017169 is a reply to message #1017117] Sun, 10 March 2013 12:15 Go to previous messageGo to next message
Dawid Pakula is currently offline Dawid PakulaFriend
Messages: 56
Registered: March 2013
Member
I'm working on ExtJS JSDT inferer provider, which should by enabled only if ExtJS facet is installed.

After enable (or disable), I have to reindex whole JavaScript project.

If is better method for enable/disable inferer provider, it would be nice to know Wink


Re: JavaScript project reindexing [message #1017588 is a reply to message #1017169] Tue, 12 March 2013 06:38 Go to previous message
Nitin Dahyabhai is currently offline Nitin DahyabhaiFriend
Messages: 2337
Registered: July 2009
Senior Member
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.


---
Nitin Dahyabhai
Eclipse WTP, IBM
Previous Topic:JBoss Server jboss-4.2.2.GA taking too long to start from Indigo
Next Topic:How to use axis2 commandline options in Eclipse
Goto Forum:
  


Current Time: Thu Nov 27 22:25:53 GMT 2014

Powered by FUDForum. Page generated in 0.01765 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software