Update: Gripe publicly, and ye shall receive! One of the previously mentioned super smart people who sit by me coded up a quick action to find my file from the eclipse client! You, dear reader, can have it too. As always, it comes with no promises or guarantees, and if it blows up your computer or your person, well neither I nor the author can be held responsible. Drop this guy into your eclipse client, right-click your repository workspace, and check out your new “Find files/folders named…” option! The file name will need to be exact. Enjoy!
They say there is no silver bullet in software engineering. I say Rational Team Concert and the CLM solution come pretty darn close, enabling teams to deliver complex products on time, within budget, and with high quality. I love RTC and am a proud user, developer, and promoter of this tool. That being said, there is one thing about this product that just irks me…
Where the heck is my file? Why can I not go in the Search menu, pick my repository, type in part or all of my file name, and see what component, project, and folder my file is in? The answer to this question as I understand it comes in two parts. One, there are several open enhancements around this function that you can view on jazz.net. Two, IBM is sometimes guilty of delivering a Cadillac when all people need 90% of the time is a bicycle. What RTC does offer is a change set search, and the thought here is that maybe I’m looking for Foo.java, but Fred changed it last week to Bar.java, or even worse, he deleted it entirely. My search on Foo.java will get me nowhere. However, by searching for change sets, I will be able to see that my file has been renamed or deleted and link through to the work item that explains when and why this happened. Cool!
To try out the change set search capability in the RTC eclipse client, go to Search->Jazz Source Control->Change sets… You will then be presented with this wizard:
As you can see, this wizard is powerful. You can narrow down by component, location (a specific stream, workspace, or baseline), change creator and date, who suspended the change (if applicable), specifically which file is modified, what the file name begins with, and even what type of change occurred (add, delete, modify, etc). The result is a listing of change sets that matched your criteria:
From here, I can double-click the change set to explore the changes, or I can right-click and choose Related Artifacts->Open to see the work item(s) associated with the change. The bummer though is that if I’m just trying to find my file, I need to start popping open and combing through these change sets til I land on it.
The good news is we have some options. For starters, this highlights the importance of using components to organize your source logically in your streams. If you know roughly what your file does, you should be able to make a good guess at what component it is in. I’ve heard some mainframe users say they can’t really organize their code logically, but they can at least apply a naming convention to their components and projects to organize and locate files in some fashion. You can always load your suspect components/projects to your eclipse workspace and then do a local search to find your file. Now, if you happen to have an enterprise developer license, your options get better…
As part of our enterprise dependency build capability, we scan files for structural information, such as type (main vs include) and logical dependencies. Even if you are not using dependency build, you can still choose to scan your streams and gather this source code data. Users then have the option to run a query on the source code data to locate their file:
You can choose which streams are scanned by right-clicking Source Code Data (in the Team Artifacts view under Source Code Data) and choosing Select Streams for Scanning. You can also specify the fixed delay for stream scanning in the ccm Advanced Properties under Source Code Data Collection from the web UI.
Another option you have with an enterprise developer license is to take advantage of context-aware search. This capability allows you to locate relevant source based on natural language. You can specify your own search terms or allow the tool to select your search terms automatically from the content of your work item. You can also specify which components/projects/folders/files are indexed and how often. Although an enterprise license is required, this capability is available for repositories running on any supported platform, including Windows, Linux, etc. Check out the demo video available here.
Here is an example of the context aware search capability in action in the context of a work item.
The Context Aware Search editor opens with some terms pre-selected from the content of the work item. You can choose to select more, remove some or all, and add your own. You can then see the results that are returned, along with a metric indicating the quality of the hit.
Lastly, CAS allows you to specify synonyms for search purposes. Many synonyms are pre-configured out of the box, but you can edit these synonyms and add your own. For example, CAS knows that if you search on the term “calculate”, then “compute” should also be considered a hit. These configurations are specific to each project area.
And on a semi-related note… If you’ve read this far, chances are high that you are either (a) my mom or (b) a Rational Team Concert enthusiast who loves to be up on the latest and greatest product features, insider tips, and all that jazz. If you fall into the second category, I hope you’ve booked your flight to Orlando for June 3-7 to hang with the Jazz Development Team at Innovate 2012! I’ll be there signing autographs and spreading the good word on all things EE. If you make it to one of my tracks, be sure to come up and introduce yourself as one of my loyal readers to receive your complimentary high five. See you there!