Want to add to search result pane (without search page) [message #18416] |
Fri, 09 May 2003 11:09  |
Eclipse User |
|
|
|
Hi,
I want to contribute some results (from IJavaElements) to the search pane.
I am currently using:-
--------------------------------
IMarker im =
element.getResource().createMarker("org.eclipse.search.searchmarker ");
im.setAttribute(IMarker.LINE_NUMBER, detailed.getSourceLineNumber());
im.setAttribute(IMarker.MESSAGE, elem.toString());
--------------------------------
This code works if create an IMarker.TASK but not with the the search
marker. How can I contribute to this view in a simple way, without the
gumpf (sp?!) or creating a pane? Any help would be great, thanks.
Jon
|
|
|
|
Re: Want to add to search result pane (without search page) [message #19326 is a reply to message #18432] |
Sun, 11 May 2003 16:29  |
Eclipse User |
|
|
|
Thanks, I'll give it a whirl.
"Daniel Megert" <daniel.megert@gmx.net> wrote in message
news:b9ghke$scg$1@rogue.oti.com...
> Jon Hatcher wrote:
>
> >Hi,
> >I want to contribute some results (from IJavaElements) to the search
pane.
> >I am currently using:-
> >--------------------------------
> >IMarker im =
> >element.getResource().createMarker("org.eclipse.search.searchmarker ");
> >
> >im.setAttribute(IMarker.LINE_NUMBER, detailed.getSourceLineNumber());
> >
> >im.setAttribute(IMarker.MESSAGE, elem.toString());
> >
> >--------------------------------
> >
> >This code works if create an IMarker.TASK but not with the the search
> >marker. How can I contribute to this view in a simple way, without the
> >gumpf (sp?!) or creating a pane? Any help would be great, thanks.
> >
> You can't. In contrast with the Task view the Search view is generic.
> Depending on the search provider the elements are rendered different
> (e.g. resources vs. Java elements vs. help results) and also different
> actions are available on the results.
>
> You don't need to provide a search page but you have to tell the Search
> view what kind of results will come in (see ISearchResultView for more
> detail). When performing your search it is also much fast if you do it
> in a single WorkspaceModifyOperation instead of adding each result one
> by one (which causes overhead due to resource delta events).
>
> HTH
> Dani
>
|
|
|
Powered by
FUDForum. Page generated in 0.03971 seconds