Esempio n. 1
0
 /**
  * ************************************************************************* Search for a string
  * in the code ************************************************************************
  */
 public int searchString(String toSearch) {
   clearMatches();
   int count = m_search.searchString(toSearch);
   if (count > 0) {
     showMatches(m_search.getMatches());
   }
   return count;
 }
Esempio n. 2
0
 /**
  * ************************************************************************* Show previous
  * occurrence ************************************************************************
  */
 public boolean searchPrevious() {
   SearchMatch match = m_search.getPrevious();
   if (match == null) return false;
   getGrid().deselectAll();
   getGrid().select(match.lineNo - 1);
   showLine(match.lineNo > 1 ? match.lineNo - 1 : match.lineNo, false);
   return true;
 }
Esempio n. 3
0
 /**
  * ************************************************************************* Clear the highlight
  * of the given ranges ************************************************************************
  */
 public void clearMatches() {
   m_search.clear();
   getGrid().setRedraw(false);
   getGrid().deselectAll();
   for (GridItem item : getGrid().getItems()) {
     item.setData("DATA_SEARCH_MATCH", null);
   }
   getGrid().setRedraw(true);
 }
Esempio n. 4
0
 /**
  * ************************************************************************* Show next occurrence
  * ************************************************************************
  */
 public boolean hasMatches() {
   return (m_search.getMatches() != null) && (m_search.getMatches().length > 0);
 }