[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [php-dev] Simple search utility

Thanks Roy!

On Sun, 25 Feb 2007 19:18:04 +0200 "Roy Ganor" <roy@xxxxxxxx> wrote:

RG> Searching for a pattern in a specified project or file is now available,
RG> with the TextSearcher utility.
RG> 
RG>  
RG> 
RG> For example - searching for variables pattern in the current file or
RG> project:
RG> 
RG> final TextSearcher searcher = TextSearcherFactory.createSearcher(project
RG> or file, "\\$[a-zA-Z_]*");
RG> 
RG> searcher.search(new NullProgressMonitor() / null);
RG> 
RG> final List results = searcher.getResults();
RG> 
RG>  
RG> 
RG> 1)     The result list elements are of type FileMatch (holds IFile,
RG> offset and length).
RG> 
RG> 2)     There are many factories that construct the search utility -
RG> available through TextSearcherFactory 
RG> 
RG> 3)     The search pattern should follow the pattern class rules:
RG> http://java.sun.com/j2se/1.4.2/docs/api/java/util/regex/Pattern.html so
RG> never let the user search directly with the utility. 
RG> 
RG> 4)     The implementation is based on org.eclipse.search plug-in.
RG> 
RG>  
RG> 
RG> Bests,
RG> 
RG> ____________
RG> 
RG> Roy Ganor
RG> 
RG> Software Engineer, R&D
RG> 
RG> tel.   +972-3-7539637
RG> 
RG> mob. +972-52-3290-754
RG> 
RG> ZEND
RG> 
RG> www.zend.com
RG> 
RG>  
RG> 

Seva Lapsha
[slapsha@xxxxxxxxxxxxxxx]
Zend Eclipse Developer