Coder is a set of components for creating and manipulating code.
The smallest unit is the
GtPharoSourceCoder subclass: #GtPharoMethodCoder
instanceVariableNames: 'methodBehavior selector'
which, as the name says, focuses on editing one single method.
The method coder can mold dynamically to fit the context of the current method. For example, when the method is annotated with
<gtExample>, the coder is embellished with the possibility to run the method as an example, and see the result as a label. This happens dynamically. Give it a try below.
Method coders can be combined in different ways for different purposes. One of these purposes is searching. This is achieved by means of
GtSearchTypedEntitiesFilter subclass: #GtSearchMethodsFilter
For example, below you see the result of a code query. Expanding the resulting method coders highlights the specific nodes that matched the query.
gtExamplePragmas <gtExample> | filter | filter := #gtExample gtPragmas. self assert: filter notEmpty. self assert: (filter matches: thisContext method). ^ filter
Object subclass: #GtSearchMethodFilterExamples
for more details.