Skip to main content



      Home
Home » Eclipse Projects » Eclipse Platform » My Search Result does not show properly!!!
My Search Result does not show properly!!! [message #123806] Sun, 07 September 2003 16:16 Go to next message
Eclipse UserFriend
Originally posted by: apatil.block.spam.syndera.com

Hi NG,
I am new to eclipse. And I am trying to do a search of my own. I can get my
search page to come up.

Problem ::
I am adding th matches to the search but the list of the matches does not
show up.
Here is what I am doing
First search : nothing shows up (only the search view is activated)
Second search : nothing shows up , but the search history is suddenly
populated with both my searches (this one and previous) , the current search
is checked , but still nothing is visible in the view as such.
I switch to the results of my first search and NOW it shows up, again I
switch to my second search results and it shows up.
I do a third search, again the same thing happens, the history shows third
search as checked , but no match(s) listing. but switching around the
history brings it up.

I will paste the code of the search runnable here
{
ISearchResultView searchResultView = SearchUI.getSearchResultView();
searchResultView.searchStarted(
null,
"Singular Search #"+count+" found single match",
"Plural Search #"+count+" found {0} matches",
null,
"com.syndera.architect.ui.search.repositorysearchpage",
new MyLabelProvider(),
new MyGoToAction(),
new MyGroupByKeyComputer(),
new MyRunnableWithProgress());

count = RepositorySearchPage.count;
System.out.println("Count is "+count);
monitor.beginTask("Searching Repository",count);
IWorkspaceRoot root = ArchitectPlugin.getWorkspace().getRoot();
for (int i = 0 ; i < count+1 ; i++){
try {
monitor.subTask("Found "+i);
RepositoryDerivedResource derivedResource = new
RepositoryDerivedResource(root);
searchResultView.addMatch("some desc
" +count,derivedResource,derivedResource,derivedResource.creat eMarker(IMarker
..MARKER));
Thread.sleep(2000);
monitor.worked(1);
} catch (CoreException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
monitor.done();
searchResultView.searchFinished();
count++;
}

Second Question:
Can I drag a search match from the search view , onto a editor , similar to
how I can drag "Tasks" from the task view

Pls help,
I am at my wits end trying to get the search to work properly...

Thanks In Advance

Anand Patil
Re: My Search Result does not show properly!!! [message #127357 is a reply to message #123806] Thu, 11 September 2003 09:16 Go to previous message
Eclipse UserFriend
Originally posted by: daniel.megert.gmx.net

Make your search operation to be a WorkspaceModifyOperation (see
TextSearchOperation as an example).

HTH
Dani

Anand Patil wrote:

>Hi NG,
> I am new to eclipse. And I am trying to do a search of my own. I can get my
>search page to come up.
>
>Problem ::
>I am adding th matches to the search but the list of the matches does not
>show up.
> Here is what I am doing
> First search : nothing shows up (only the search view is activated)
> Second search : nothing shows up , but the search history is suddenly
>populated with both my searches (this one and previous) , the current search
>is checked , but still nothing is visible in the view as such.
> I switch to the results of my first search and NOW it shows up, again I
>switch to my second search results and it shows up.
> I do a third search, again the same thing happens, the history shows third
>search as checked , but no match(s) listing. but switching around the
>history brings it up.
>
>I will paste the code of the search runnable here
>{
> ISearchResultView searchResultView = SearchUI.getSearchResultView();
> searchResultView.searchStarted(
> null,
> "Singular Search #"+count+" found single match",
> "Plural Search #"+count+" found {0} matches",
> null,
> "com.syndera.architect.ui.search.repositorysearchpage",
> new MyLabelProvider(),
> new MyGoToAction(),
> new MyGroupByKeyComputer(),
> new MyRunnableWithProgress());
>
> count = RepositorySearchPage.count;
> System.out.println("Count is "+count);
> monitor.beginTask("Searching Repository",count);
> IWorkspaceRoot root = ArchitectPlugin.getWorkspace().getRoot();
> for (int i = 0 ; i < count+1 ; i++){
> try {
> monitor.subTask("Found "+i);
> RepositoryDerivedResource derivedResource = new
>RepositoryDerivedResource(root);
> searchResultView.addMatch("some desc
>" +count,derivedResource,derivedResource,derivedResource.creat eMarker(IMarker
>.MARKER));
> Thread.sleep(2000);
> monitor.worked(1);
> } catch (CoreException e) {
> // TODO Auto-generated catch block
> e.printStackTrace();
> }
> }
> monitor.done();
> searchResultView.searchFinished();
> count++;
>}
>
>Second Question:
> Can I drag a search match from the search view , onto a editor , similar to
>how I can drag "Tasks" from the task view
>
>Pls help,
> I am at my wits end trying to get the search to work properly...
>
>Thanks In Advance
>
>Anand Patil
>
>
>
>
>
>
>
Previous Topic:Warning to do string == "compare"
Next Topic:Handling of RuntimeExceptions
Goto Forum:
  


Current Time: Thu Jul 24 07:32:38 EDT 2025

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

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

Back to the top