|
Re: ISearchQuery.run(IProcessMonitor) ,how is it get called?? [message #332124 is a reply to message #332119] |
Mon, 06 October 2008 10:56   |
Eclipse User |
|
|
|
Rahul Yadav wrote:
> Hi ,
> I am working on a specialized search plug-in in eclipse.Can somebody
> here tell me when is the run() method from ISearchQuery is called.I
> have implemented ISearchQuery but my system is unable to invoke run()
> in it.
Normally you also provide a corresponding search dialog page. In the
performAction() method of that page you would call something like:
NewSearchUI.runQueryInBackground(yourQuery);
Dani
>
> thanks,
> Rahul.
>
|
|
|
Re: ISearchQuery.run(IProcessMonitor) ,how is it get called?? [message #332134 is a reply to message #332124] |
Mon, 06 October 2008 16:22   |
Eclipse User |
|
|
|
that is true...i am calling it with ISearchQuery.Here is the snippet...
NewSearchUI.runQueryInBackground(newQuery1());
private ISearchQuery newQuery1() throws CoreException {
ISearchQuery query;
NewSearchData searchRelatedData=new NewSearchData(fContainer);
query=new NewICSearchQuery(searchRelatedData);
return query;
}
NewICSearchQuery.java
public IStatus run(IProgressMonitor monitor)
throws OperationCanceledException {
IRunnableWithProgress query=new NewType(searchData);
try{
searchData.getFContainer().getRunnableContext().run(true, true,
query);
}catch(Exception e){}
return null;
}
Thanks.
|
|
|
Re: ISearchQuery.run(IProcessMonitor) ,how is it get called?? [message #332135 is a reply to message #332134] |
Mon, 06 October 2008 16:27   |
Eclipse User |
|
|
|
Rahul Yadav wrote:
> that is true...i am calling it with ISearchQuery.Here is the snippet...
> NewSearchUI.runQueryInBackground(newQuery1());
> private ISearchQuery newQuery1() throws CoreException {
> ISearchQuery query;
> NewSearchData searchRelatedData=new NewSearchData(fContainer);
> query=new NewICSearchQuery(searchRelatedData);
> return query;
> }
> NewICSearchQuery.java
> public IStatus run(IProgressMonitor monitor)
> throws OperationCanceledException {
> IRunnableWithProgress query=new NewType(searchData);
> try{
> searchData.getFContainer().getRunnableContext().run(true, true,
> query);
> }catch(Exception e){}
> return null;
> }
> Thanks.just to add some more info....
ISearchQuery.getSearchResult() is repeatedly getting called infinitely
until i close the search dialog.
I don't know how are they related !!!!
Thanks.
|
|
|
Re: ISearchQuery.run(IProcessMonitor) ,how is it get called?? [message #332148 is a reply to message #332135] |
Tue, 07 October 2008 07:15   |
Eclipse User |
|
|
|
Rahul Yadav wrote:
> Rahul Yadav wrote:
>
>> that is true...i am calling it with ISearchQuery.Here is the snippet...
>
>
>
>> NewSearchUI.runQueryInBackground(newQuery1());
>
>> private ISearchQuery newQuery1() throws CoreException {
>> ISearchQuery query;
>> NewSearchData searchRelatedData=new NewSearchData(fContainer);
>> query=new NewICSearchQuery(searchRelatedData);
>> return query;
>> }
>
>> NewICSearchQuery.java
>
>> public IStatus run(IProgressMonitor monitor)
>> throws OperationCanceledException {
>
>> IRunnableWithProgress query=new NewType(searchData);
>> try{
>> searchData.getFContainer().getRunnableContext().run(true,
>> true, query);
>> }catch(Exception e){}
>> return null;
>> }
>
>> Thanks.just to add some more info....
>
> ISearchQuery.getSearchResult() is repeatedly getting called
> infinitely until i close the search dialog.
It looks like yo also start it in your code:
searchData.getFContainer().getRunnableContext().run(true, true,
query);
This is wrong as NewSearchUI.runQueryInBackground(...) already does this.
Dani
>
> I don't know how are they related !!!!
>
> Thanks.
>
|
|
|
|
Re: ISearchQuery.run(IProcessMonitor) ,how is it get called?? [message #332192 is a reply to message #332150] |
Thu, 09 October 2008 08:30  |
Eclipse User |
|
|
|
Rahul Yadav wrote:
> That was for different purpose, i can remove it.They are written in
> implemented run method,those statement will execute only if run method
> gets called...but the real problem is
> ISearchQuery.run(IProcessMonitor) this is not getting invoked.
If you call NewSearchUI.runQueryInBackground(yourQuery) as advised
before then this will trigger ISearchQuery.run(...) or something is
completely broken in your code or setup. If it still doesn't work I
suggest to debug into
org.eclipse.search2.internal.ui.InternalSearchUI.runSearchIn Background(ISearchQuery,
ISearchResultViewPart).
Dani
>
> Thanks.
>
|
|
|
Powered by
FUDForum. Page generated in 0.02881 seconds