1 | public void resultArrived(IResultEvent event) {↵ | | 1 | public void resultArrived(IResultEvent event) {↵
|
2 | List<ISearchResult> result = event.getSearchResults();↵ | | 2 | List<ISearchResult> result = event.getSearchResults();↵
|
|
3 | buf.append("<p>" + createCriteria(event.getSearchCriteria())↵ | | 3 | buf.append("<p>" + createCriteria(event.getSearchCriteria())↵
|
4 | + "</p><br>");↵ | | 4 | + "</p><br>");↵
|
|
5 | Iterator<ISearchResult> it = result.iterator();↵ | | 5 | Iterator<ISearchResult> it = result.iterator();↵
|
6 | while (it.hasNext()) {↵ | | 6 | while (it.hasNext()) {↵
|
7 | ISearchResult r = it.next();↵ | | 7 | ISearchResult r = it.next();↵
|
8 | buf.append("<p>");↵ | | 8 | buf.append("<p>");↵
|
9 | buf.append(createTitle(r));↵ | | 9 | buf.append(createTitle(r));↵
|
10 | buf.append("</p><p>");↵ | | 10 | buf.append("</p><p>");↵
|
11 | buf.append(getDescription(r));↵ | | 11 | buf.append(getDescription(r));↵
|
12 | buf.append("</p><p><br></p>");↵ | | 12 | buf.append("</p><p><br></p>");↵
|
13 | }↵ | | 13 | }↵
|
|
14 | StringBuffer doc = new StringBuffer();↵ | | 14 | StringBuffer doc = new StringBuffer();↵
|
15 | startDocument(doc);↵ | | 15 | startDocument(doc);↵
|
16 | doc.append(buf.toString());↵ | | 16 | doc.append(buf.toString());↵
|
17 | endDocument(doc);↵ | | 17 | endDocument(doc);↵
|
|
18 | viewerPlugin.view(doc.toString()); | | 18 | viewerPlugin.view(doc.toString());
|