Skip to main content



      Home
Home » Language IDEs » Java Development Tools (JDT) » Want to add to search result pane (without search page)
Want to add to search result pane (without search page) [message #18416] Fri, 09 May 2003 11:09 Go to next message
Eclipse UserFriend
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 #18432 is a reply to message #18416] Fri, 09 May 2003 11:31 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: daniel.megert.gmx.net

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
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 Go to previous message
Eclipse UserFriend
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
>
Previous Topic:[ANN] new release of metrics plugin
Next Topic:Java GUI program NoClassdefFoundError exception
Goto Forum:
  


Current Time: Mon May 12 21:35:58 EDT 2025

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

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

Back to the top