/** * Handles a search result event for the current search result. * * @since 3.2 */ protected void handleSearchResultChanged(final SearchResultEvent e) { if (e instanceof MatchEvent) { postUpdate(((MatchEvent) e).getMatches()); } else if (e instanceof RemoveAllEvent) { postClear(); } else if (e instanceof FilterUpdateEvent) { postUpdate(((FilterUpdateEvent) e).getUpdatedMatches()); updateFilterActions(fFilterActions); } }
/** * Handles a search result event for the current search result. * @param e the event to handle * * @since 3.2 */ protected void handleSearchResultChanged(final SearchResultEvent e) { if (e instanceof MatchEvent) { postUpdate(((MatchEvent) e).getMatches()); } else if (e instanceof RemoveAllEvent) { postClear(); } else if (e instanceof FilterUpdateEvent) { postUpdate(((FilterUpdateEvent) e).getUpdatedMatches()); updateFilterActions(fFilterActions); } }
public synchronized void searchResultChanged(SearchResultEvent e) { ISearchResult searchResult= e.getSearchResult(); if (searchResult instanceof AbstractTextSearchResult) { AbstractTextSearchResult result= (AbstractTextSearchResult) searchResult; if (e instanceof MatchEvent) { MatchEvent me= (MatchEvent) e; Match[] matchesInEditor= getMatchesInEditor(me.getMatches(), result); if (matchesInEditor != null) { if (me.getKind() == MatchEvent.ADDED) { addAnnotations(matchesInEditor); } else { removeAnnotations(matchesInEditor); } } } else if (e instanceof RemoveAllEvent) { removeAnnotations(result); } else if (e instanceof FilterUpdateEvent) { Match[] matchesInEditor= getMatchesInEditor(((FilterUpdateEvent) e).getUpdatedMatches(), result); if (matchesInEditor != null) { removeAnnotations(matchesInEditor); addAnnotations(matchesInEditor); } } } }
@Override public synchronized void searchResultChanged(SearchResultEvent e) { ISearchResult searchResult= e.getSearchResult(); if (searchResult instanceof AbstractTextSearchResult) { AbstractTextSearchResult result= (AbstractTextSearchResult) searchResult; if (e instanceof MatchEvent) { MatchEvent me= (MatchEvent) e; Match[] matchesInEditor= getMatchesInEditor(me.getMatches(), result); if (matchesInEditor != null) { if (me.getKind() == MatchEvent.ADDED) { addAnnotations(matchesInEditor); } else { removeAnnotations(matchesInEditor); } } } else if (e instanceof RemoveAllEvent) { removeAnnotations(result); } else if (e instanceof FilterUpdateEvent) { Match[] matchesInEditor= getMatchesInEditor(((FilterUpdateEvent) e).getUpdatedMatches(), result); if (matchesInEditor != null) { removeAnnotations(matchesInEditor); addAnnotations(matchesInEditor); } } } }