Spotting objects from GTInspector

GTInspector enables fine-grained interaction with objects, but it is less tuned to quick searching within the context of the object. At the same time, GTSpotter allows you to quickly search for objects.

It is only natural to link the two. We already have a way to get from GTSpotter to GTInspector as the default action in GTSpotter is to inspect. For example, suppose you inspect a directory.


While, the inspector already allows you to navigate through folders, it is often more convenient to dive through the file system with GTSpotter. To achieve this, you would need to jump from inspector to spotter.

In our example, as the FileReference class already offers spotter extensions, the inspector offers a magnifier glass icon on the top right. Clicking that icon triggers an instance of GTSpotter that is scoped to our FileReference object.


From here, GTSpotter works as expected with full diving and previewing possibilities.


As the default action is inspection, pressing Enter on a file or directory opens an inspector on that object.


The integration is far from perfect. For example, at the end of the interaction you end up with two windows (one for the initial Playground, and one for the Inspector) without any casual connection between the two. Nevertheless, this is a cheap extension that allows you to leverage the power of GTSpotter for any object.

Posted by Tudor Girba at 16 March 2015, 9:05 am with tags tooling, moose, pharo, analysis link