About JDT search
0 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Ahmet_Akdag
Posted On:   Friday, July 7, 2006 02:23 AM

Hi, I'm using the jdt search engine for a custom search in my entire workspace. As I run the following code, SearchPattern pattern = SearchPattern.createPattern("Adres", IJavaSearchConstants.TYPE, IJavaSearchConstants.DECLARATIONS, SearchPattern.R_PATTERN_MATCH | SearchPattern.R_CASE_SENSITIVE); //IType type = SearchEngine searchEngine = new SearchEngine(); //JavaWorkspaceScope myScope = new JavaWorkspaceScope(); IJavaSearchScope scope = SearchEngine.createWorkspaceScope(); searchEngine.search(pattern, new SearchParticipant[] {SearchEngine.getDefaultSearchParticipant()}, scope, this, null); I got java.lang.ExceptionInInitializerError at org.e   More>>

Hi,
I'm using the jdt search engine for a custom search in my entire workspace. As I run the following code,

SearchPattern pattern = SearchPattern.createPattern("Adres", IJavaSearchConstants.TYPE, IJavaSearchConstants.DECLARATIONS, SearchPattern.R_PATTERN_MATCH | SearchPattern.R_CASE_SENSITIVE);

//IType type =
SearchEngine searchEngine = new SearchEngine();

//JavaWorkspaceScope myScope = new JavaWorkspaceScope();
IJavaSearchScope scope = SearchEngine.createWorkspaceScope();

searchEngine.search(pattern, new SearchParticipant[] {SearchEngine.getDefaultSearchParticipant()}, scope, this, null);


I got

java.lang.ExceptionInInitializerError
at org.eclipse.jdt.internal.core.search.JavaWorkspaceScope.initialize(JavaWorkspaceScope.java:77)
at org.eclipse.jdt.internal.core.search.JavaSearchScope. (JavaSearchScope.java:52)
at org.eclipse.jdt.internal.core.search.JavaWorkspaceScope. (JavaWorkspaceScope.java:31)
at org.eclipse.jdt.core.search.SearchEngine.createWorkspaceScope(SearchEngine.java:423)
at tr.com.anadolusigorta.search.search.util.Searcher.search(Searcher.java:46)
at tr.com.anadolusigorta.search.search.util.Test.main(Test.java:23)
Caused by: java.lang.NullPointerException
at org.eclipse.jdt.internal.core.search.indexing.IndexManager.getJavaPluginWorkingLocation(IndexManager.java:279)
at org.eclipse.jdt.internal.core.search.indexing.IndexManager. (IndexManager.java:49)
at org.eclipse.jdt.internal.core.JavaModelManager. (JavaModelManager.java:511)
at org.eclipse.jdt.internal.core.JavaModelManager. (JavaModelManager.java:489)
... 6 more
Exception in thread "main"

Can you help me about this?

regards

   <<Less
About | Sitemap | Contact