PrimalScript 2012: What’s new? (Part 9)

The last installment went through all the other tabs on PrimalScript 2012’s new ribbon interface. Today we explore some really small new feature. But sometimes it is the small things that make a difference. Many versions ago we added a “Go to Declaration” to the editor’s context menu. Right click on any function or variable and select that and PrimalScript will take you there.

So this time around we added the corresponding function going the other way: “Find all references”.


This will search your current file for all occurrences and list them in the search results window. Unless your script is part of a project, in which case PrimalScript will search all files in the currently open project and list the hits.

The resulting list has a few tricks of its own up the sleeve:


You notice the little icons in front of each individual hit? If you have only three hits it is pretty easy to keep track of which location you have visited and checked out. If you had a hundred and some hits across a dozen files this looks a bit different.


So here we search a rather large web project for a pretty common variable name. Just imagine you did that because you have to make sure that each use of MySQL follows certain new conventions in a new database version. So now you have to keep track of 5483 locations and remember which ones you clicked on and which ones not yet. Yes, exactly, not something you want to spend your afternoon with.
But PrimalScript will help you.  Each time you double click an entry to go to that location, the icon changes.


So a change from an arrow to the green square indicates you have visited that location. But there is one more helper. Look at the document icons in the two pictures above.
In the first one they are just regular document icons. That indicates that no location from its hits have been visited.

Look at the same icons in the second picture. A green document icon means all hits in that file have been visited and a half blue icon indicates that some but not all locations were clicked on.

So the next time you have to cruise through source files to do some major remodeling, try “Find all references”.