Searching the contents of Notes/Domino design elements

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.

I had a request recently to export all the code in a project to disk so that an automated code-checker tool could be run against it. My initial thought was to use DXL, but the DXL representation of some design elements doesn't make it easy to extract the code. JavaScript libraries, in particular, are hard to decode.* So I looked for an alternative. Here's what I found.

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: , ,

 Print | Posted on Wednesday, January 20, 2010 6:37 PM | Filed Under [ Notes/Domino ]


Feedback

Gravatar

# re: Searching the contents of Notes/Domino design elements

We solved the issue in a different way:
1. Export using DXL
2. reimport into a special Domino database

Reasons for this:
- the fulltext search of Windows didn't work reliable for us
- we wanted to show some attributes in the research results

Greetings from Germany

1/21/2010 6:35 AM | Ruediger Weitz

Gravatar

# re: Searching the contents of Notes/Domino design elements

Hi Ruediger,

I've been meaning to try the DXL approach too for comparison. If you're having issues with Windows searching you might want to experiment with Powershell like I did, it's a lot more flexible and the grep implementation above seems to work very well.

1/21/2010 7:42 AM | Ross Hawkins

Post Comment

Title  
Name  
Email
Website / Url
 

Your comment

   
Please add 1 and 8 and type the answer here:

About me

My name is Ross Hawkins and I'm a Developer, Consultant and Writer based in Auckland, New Zealand (pictured below!). My current work revolves around ASP.NET, C#, jQuery, Ajax, SQL Server, and a mix of other Microsoft development technologies.

I also have about 14 years of experience with IBM Lotus Notes/Domino and associated technologies. While Notes/Domino is no longer my primary focus I still like to dabble and keep my skills up to date.

I own and run 2 businesses - Hawkins Consulting Services, and Ignition Development.

Bethells Beach, located in sunny West Auckland, New Zealand


Subscribe

Subscribe to this feed


Search


Popular Content

Troubleshooting WebResource.axd

The .NET 2.0 framework changed the way clientside JavaScript is delivered to the browser. Previously, ASP.NET 1.1 used the aspnet_client directory whereas now 2.0 uses WebResource.axd.

Published on October 8, 2006

Microsoft AJAX Extensions: Sys.Debug is null or not an object

One of the breaking changes which was made with the 1.0 release of the Microsoft Ajax Extensions was the renaming of the 'Debug' class to 'Sys.Debug' for reasons of compatiability with other frameworks. Breaking changes like this can often be a source of frustration..

Published on May 22, 2007

Simple ASP.NET Character Counter

A textbox character counter is a pretty simple piece of functionality, and there's a lot of different ways to apply one to your application. The following method is nice and simple, and can be done using only clientside JavaScript if required, or combined with server side code in order to create a more dynamic effect

Published on December 4, 2006

Simple ASP.NET Character Counter - with Master Page Support

A quick update to my previous character counter article adding some changes for those using it with Master Pages.

Published on February 7th, 2009

Adding Tooltips to Gridview Headers

As the title says, this is a very simple but dynamic way of achieving tooltip text on a header column. It's not overly flash, but it's lightweight and quick to implement.

Published on April 15, 2007

SQL Server Web Report Viewer Issues on Windows 2008 Server/IIS7

A fix for another AXD related issue, this time with the SQL Server Web Report Viewer Control which was being served up via IIS7 on a Windows 2008 server.

Published on June 2, 2007
Updated on April 10, 2008


Archives

March, 2010 (2)
February, 2010 (6)
January, 2010 (12)
December, 2009 (13)
November, 2009 (11)
October, 2009 (12)
September, 2009 (12)
August, 2009 (2)
July, 2009 (7)
June, 2009 (12)
May, 2009 (9)
April, 2009 (9)
March, 2009 (9)
February, 2009 (8)
January, 2009 (7)
December, 2008 (6)
November, 2008 (7)
October, 2008 (9)
September, 2008 (12)
August, 2008 (9)
July, 2008 (6)
June, 2008 (24)
May, 2008 (13)
April, 2008 (16)
March, 2008 (8)
February, 2008 (10)
January, 2008 (1)
December, 2007 (14)
November, 2007 (11)
October, 2007 (11)
September, 2007 (13)
August, 2007 (11)
July, 2007 (5)
June, 2007 (15)
May, 2007 (11)
April, 2007 (9)
March, 2007 (9)
February, 2007 (10)
January, 2007 (8)
December, 2006 (18)
November, 2006 (11)
October, 2006 (14)
September, 2006 (9)
August, 2006 (10)
July, 2006 (4)
June, 2006 (4)
May, 2006 (6)
April, 2006 (3)
February, 2006 (6)
January, 2006 (10)
September, 2005 (2)
August, 2005 (4)

Post Categories

ASP.NET
AJAX
Amusing
NZ
NZ Trains
Notes/Domino
Visual Studio
Web Development
Miscellaneous
Me
Rugby
C#
SQL


Twitter