public static void FindReferencesByGrep() { if (!LoadSettings()) { return; } Result result = ReferenceViewerProcessor.FindReferencesByCommand(Result.SearchType.OSX_Grep, settings.GetExcludeExtentions()); if (result != null) { ReferenceViewerWindow.CreateWindow(result); } }
public static void FindReferencesBySpotlight() { if (!LoadSettings()) { return; } string command = "mdfind -onlyin {0} {1}"; Result result = ReferenceViewerProcessor.FindReferencesByCommand(command, settings.GetExcludeExtentions()); if (result != null) { result.Type = Result.SearchType.OSX_Spotlight; ReferenceViewerWindow.CreateWindow(result); } }
public static void FindReferencesByFindStr() { if (!LoadSettings()) { return; } string command = "/S {1} {0}\\*"; Result result = ReferenceViewerProcessor.FindReferencesByCommand(command, settings.GetExcludeExtentions()); if (result != null) { result.Type = Result.SearchType.WIN_FindStr; ReferenceViewerWindow.CreateWindow(result); } }
public static void FindReferencesByGitGrep() { if (!LoadSettings()) { return; } string command = "cd {0} && git grep -l {1} | xargs -ITEXT echo {0}/TEXT"; Result result = ReferenceViewerProcessor.FindReferencesByCommand(command, settings.GetExcludeExtentions()); if (result != null) { result.Type = Result.SearchType.OSX_GitGrep; ReferenceViewerWindow.CreateWindow(result); } }
public static void FindReferencesByGrep() { if (!LoadSettings()) { return; } string command = "grep {1} -rl {0} "; string[] excludes = settings.GetExcludeFiles(); for (int i = 0; i < excludes.Length; ++i) { command += string.Format("--exclude='{0}' ", excludes[i]); } Result result = ReferenceViewerProcessor.FindReferencesByCommand(command); if (result != null) { result.Type = Result.SearchType.OSX_Grep; ReferenceViewerWindow.CreateWindow(result); } }