My favorites | Sign in
Project Logo
                
Search
for
Updated Feb 19, 2007 by limpbizkit
Labels: Search-CommandLine
CommandLineSearch  
Search custom code repositories with CodeSearch-Plugin

CommandLineSearch

CommandLineSearch allows you to add custom search providers to the CodeSearch-Plugin easily.

Compatible commandline tools

To work with CodeSearch-Plugin, the commandline search utility must:

Example

I have a proprietary search tool for my code repository that works like this:

jessewilson$ /home/jessewilson/bin/codesearch /Repository/Projects HelloWorld
/Repository/Projects/GlazedLists/source/ca/odell/glazedlists/HelloWorld.java:12:public class HelloWorld {
/Repository/Projects/GlazedLists/source/ca/odell/glazedlists/HelloWorld.java:14:   public HelloWorld() {
/Repository/Projects/GlazedLists/source/ca/odell/glazedlists/HelloWorld.java:23:      System.out.println("HelloWorld");
/Repository/Projects/Riders/source/com/publicobject/Simulation2007.java:100:  // see this is a HelloWorld example of the API that

To configure this search tool, I use the following settings:

  • Executable /home/jessewilson/bin/codesearch
  • Arguments /Repository/Projects
  • Regular Expression ([^\:]+)\\:([^\:]+)\:(.*)
  • File Path Match 1
  • Line Number Match 2
  • Line Value Match 3
The regular expression uses Java Regex syntax. It should contain three groups (which are parts of the regular expression in round brackets), one for the file path, the line number and the line value.


Sign in to add a comment
Hosted by Google Code