Search UI problems [message #19998] |
Mon, 12 May 2003 12:01  |
Eclipse User |
|
|
|
I am having problems adding entries to the search results view. What should
the groupByKey parameter be in the addMatch method? I use a custom string
as below, but get a nullpointer error. I have got a handle on the view from
SearchUI. I also have a valid IResource How do I get one of these keys?
-------------
IMarker im = element.getResource().createMarker(SearchUI.SEARCH_MARKER);
im.setAttribute(IMarker.LINE_NUMBER, detailed.getSourceLineNumber());
im.setAttribute(IMarker.MESSAGE, elem.toString());
view.addMatch(elem.toString(), new
String("CME_RESULT"),element.getResource(), im);
-------------
Thanks for your help
Jon
|
|
|
|
Re: Search UI problems [message #20202 is a reply to message #20192] |
Mon, 12 May 2003 14:37  |
Eclipse User |
|
|
|
Thanks! Makes more sense.
"Daniel Megert" <daniel.megert@gmx.net> wrote in message
news:b9okn6$697$1@rogue.oti.com...
> Jon Hatcher wrote:
>
> >I am having problems adding entries to the search results view. What
should
> >the groupByKey parameter be in the addMatch method? I use a custom
string
> >as below, but get a nullpointer error. I have got a handle on the view
from
> >SearchUI. I also have a valid IResource How do I get one of these keys?
> >-------------
> >IMarker im = element.getResource().createMarker(SearchUI.SEARCH_MARKER);
> >im.setAttribute(IMarker.LINE_NUMBER, detailed.getSourceLineNumber());
> >im.setAttribute(IMarker.MESSAGE, elem.toString());
> >
> >view.addMatch(elem.toString(), new
> >String("CME_RESULT"),element.getResource(), im);
> >-------------
> >Thanks for your help
> >Jon
> >
> >
> The groupBy stuff allows you to group multiple matches into one Search
> view entry. Java search for example groups by Java elements i.e. if
> there are multiple matches inside method only one entry is added to the
> Search view and the number of matches is shown in the entry's label,
> e.g.: myMethod() (2 matches). In your case the resource itself might be
> a good candidate.
>
> HTH
> Dani
>
|
|
|
Powered by
FUDForum. Page generated in 0.18386 seconds