Skip to main content



      Home
Home » Language IDEs » Java Development Tools (JDT) » Search UI problems
Search UI problems [message #19998] Mon, 12 May 2003 12:01 Go to next message
Eclipse UserFriend
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 #20192 is a reply to message #19998] Mon, 12 May 2003 13:13 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: daniel.megert.gmx.net

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
Re: Search UI problems [message #20202 is a reply to message #20192] Mon, 12 May 2003 14:37 Go to previous message
Eclipse UserFriend
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
>
Previous Topic:error=193: org.eclipse.core.runtime.CoreException[120]: java.io.IOException: CreateProcess: D:\j2sd1
Next Topic:how to change font
Goto Forum:
  


Current Time: Tue Apr 29 05:14:02 EDT 2025

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

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

Back to the top