I recently posted asking for recommendations for Notes/Domino refactoring and analysis tools. Thanks again to all of you who responded, and also to Ryan from Ytria who emailed me directly (even though I’ve been too busy/slack to respond).
After thinking about it, I realised that really it was the Find/Search side of things which was important to me, and Andre Guirard recently posted about how to Export all code of an NSF to file system, which looks to give me access to the solution I was after - even if it is a little bit manual.
Using the Eclipse-based Domino Designer, because the Notes application corresponds to an Eclipse project, various functions are available that apply to Eclipse projects generally.
Go and read Andre’s post for the full details on how to do the export. Pay attention to the bit where he says “if you have as many databases in your outline as I have, it may take some time to populate this window. Be patient" - he’s not kidding, especially if some of your databases are on remote servers (I access a few of my client’s systems via WAN links).
So that’s the code in your file system – now what? Well, you want to search for something!Unfortunately how you do this is going to change a little bit depending on what OS you’re running. Windows 7 will only search the content of files that it knows about – you can change which files it searches inside of by running Indexing Options and setting “Index Properties and File Contents” for the relevant extensions. Of course some of the extensions it creates might not be known by Windows (you probably have .lss, but .lsdb, .lsa, .javalib, .jws, .lws you probably don’t), so open them with Notepad (or SublimeText if you’re like me) to get them in the list, or do it manually.
Right, sorted? Nope. Because you might have noticed that there’s an awful lot of files in the output directory which have no extension. While you can probably change Windows to search inside those files if you wanted, I suspect that isn’t a very clever idea.
It was at this point I turned to Powershell. You could of course use any other grep like substitute for your OS, however I didn’t want to install anything else and have been meaning to find reasons to mess about with Powershell anyway.
Here’s a variant of Powershell’s grep equivalent:
gci . * -recurse | select-string "your string here"
…and finally, we have our search results! Hardly the most integrated of searching, but hey it works and it’s free. I'm going to have a look and see if I can automate/integrate this at all, but for now it gives me what I need so I’m happy.
As a side note, I use Console2 instead of the standard Windows command prompt. This lets me run one utility and switch between tabs to access a standard command prompt, a Visual Studio Command prompt, and a PowerShell easily and quickly. It also looks slick too, and has configurable options for things like Window transparency.
Tags: Notes/Domino, IBM, Lotus, Powershell