Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » ISearchQuery.run(IProcessMonitor) ,how is it get called??
ISearchQuery.run(IProcessMonitor) ,how is it get called?? [message #332119] Mon, 06 October 2008 09:38 Go to next message
Rahul Yadav is currently offline Rahul YadavFriend
Messages: 65
Registered: July 2009
Member
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.

thanks,
Rahul.
Re: ISearchQuery.run(IProcessMonitor) ,how is it get called?? [message #332124 is a reply to message #332119] Mon, 06 October 2008 10:56 Go to previous messageGo to next message
Dani Megert is currently offline Dani MegertFriend
Messages: 3802
Registered: July 2009
Senior Member
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 Go to previous messageGo to next message
Rahul Yadav is currently offline Rahul YadavFriend
Messages: 65
Registered: July 2009
Member
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 Go to previous messageGo to next message
Rahul Yadav is currently offline Rahul YadavFriend
Messages: 65
Registered: July 2009
Member
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 Go to previous messageGo to next message
Dani Megert is currently offline Dani MegertFriend
Messages: 3802
Registered: July 2009
Senior Member
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 #332150 is a reply to message #332148] Tue, 07 October 2008 12:29 Go to previous messageGo to next message
Rahul Yadav is currently offline Rahul YadavFriend
Messages: 65
Registered: July 2009
Member
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.

Thanks.
Re: ISearchQuery.run(IProcessMonitor) ,how is it get called?? [message #332192 is a reply to message #332150] Thu, 09 October 2008 08:30 Go to previous message
Dani Megert is currently offline Dani MegertFriend
Messages: 3802
Registered: July 2009
Senior Member
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.
>
Previous Topic:Duplicate template proposals prevent automatic insertion
Next Topic:SelectionChanged(IAction.., ISelection..)
Goto Forum:
  


Current Time: Wed Jul 17 19:35:15 GMT 2024

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

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

Back to the top