<commit_before>Class {
	#name : #GLMRoassal2Action,
	#superclass : #RTObject,
	#instVars : [
		'roassalPresentation'
	],
	#category : #'Roassal2GT-Glamour-Actions'
}

{ #category : #initialization }
GLMRoassal2Action class >> allLeafSubclasses [
	^ self allSubclasses select: #isLeaf
]

{ #category : #initialization }
GLMRoassal2Action class >> initializePresentation: aRoassal2Presentation [
	| instances orderedInstances |
	instances := self allLeafSubclasses collect: #new.
	orderedInstances := instances sortedAs: #order.
	orderedInstances
		do:
			[ :inst | 
			inst roassalPresentation: aRoassal2Presentation.
			inst icon notNil
				ifTrue:
					[ aRoassal2Presentation
						act: [ :r | inst execute ]
						icon: inst icon
						entitled: inst title ]
				ifFalse:
					[ aRoassal2Presentation
						act: [ :r | inst execute ]
						entitled: inst title ] ]
]

{ #category : #testing }
GLMRoassal2Action class >> isLeaf [
	^ self subclasses size = 0
]

{ #category : #hooks }
GLMRoassal2Action >> execute [
	"Override please"
	self subclassReponsibility
]

{ #category : #hooks }
GLMRoassal2Action >> icon [
	"Override please"<commit_msg>properly install actions to deal with the presentation that is passed as argument in the act: block. The reason is that Glamour has a prototype based design, and the object that is avaialable at creation time is not the same as the object present at runtime.<commit_after>Class {
	#name : #GLMRoassal2Action,
	#superclass : #RTObject,
	#instVars : [
		'roassalPresentation'
	],
	#category : #'Roassal2GT-Glamour-Actions'
}

{ #category : #initialization }
GLMRoassal2Action class >> allLeafSubclasses [
	^ self allSubclasses select: #isLeaf
]

{ #category : #initialization }
GLMRoassal2Action class >> initializePresentation: aRoassal2Presentation [
	| instances orderedInstances |
	instances := self allLeafSubclasses collect: #new.
	orderedInstances := instances sortedAs: #order.
	orderedInstances
		do: [ :inst | 
			inst icon notNil
				ifTrue: [ aRoassal2Presentation
						act: [ :r | inst executeOn: r ]
						icon: inst icon
						entitled: inst title ]
				ifFalse: [ aRoassal2Presentation
						act: [ :r | inst executeOn: r ]
						entitled: inst title ] ]
]

{ #category : #testing }
GLMRoassal2Action class >> isLeaf [
	^ self subclasses size = 0
]

{ #category : #hooks }
GLMRoassal2Action >> execute [
	"Override please"
	self subclassResponsibility
]

{ #category : #hooks }
GLMRoassal2Action >> executeOn: aPresentation [
	self roassalPresentation: aPresentation.
	self execute
]

{ #category : #hooks }
GLMRoassal2Action >> icon [
	"Override please"
{'fraction_non_alphanumeric': 0.09705769965609476, 'fraction_numerical': 0.009170806266717615, 'mean_word_length': 4.133333333333334, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 25, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3941899', 'n_tokens_mistral': 959, 'n_tokens_neox': 878, 'n_words': 229}