-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Extracts inactive watches to their own class
- Loading branch information
Showing
5 changed files
with
65 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
50 changes: 50 additions & 0 deletions
50
packages/Sandblocks-Babylonian/SBInactiveExampleWatch.class.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
" | ||
Does not update its results anymore. Applying modification expressions is still possible. | ||
" | ||
Class { | ||
#name : #SBInactiveExampleWatch, | ||
#superclass : #SBExampleWatch, | ||
#category : #'Sandblocks-Babylonian' | ||
} | ||
|
||
{ #category : #'initialize-release' } | ||
SBInactiveExampleWatch class >> newFromWatch: anActiveWatch [ | ||
|
||
^ (anActiveWatch veryDeepCopy) | ||
primitiveChangeClassTo: self basicNew; | ||
expression: (SBTextBubble new contents: anActiveWatch expression sourceString); | ||
yourself | ||
] | ||
|
||
{ #category : #callbacks } | ||
SBInactiveExampleWatch >> artefactSaved: aBlock [ | ||
|
||
"As we are inactive, we have to manually apply our modifyExpression if it changes. | ||
Otherwise, we would reset by examples starting" | ||
(aBlock = self containingArtefact) ifTrue: [self applyModifyExpressionOnValues] | ||
] | ||
|
||
{ #category : #'event handling' } | ||
SBInactiveExampleWatch >> doubleClick: evt [ | ||
|
||
"Nothing" | ||
] | ||
|
||
{ #category : #'as yet unclassified' } | ||
SBInactiveExampleWatch >> expression: aBlock [ | ||
|
||
super expression: aBlock. | ||
watchedExpression selectable: false | ||
] | ||
|
||
{ #category : #accessing } | ||
SBInactiveExampleWatch >> isActive [ | ||
|
||
^ false | ||
] | ||
|
||
{ #category : #'*Sandblocks-Babylonian' } | ||
SBInactiveExampleWatch >> listensToExamples [ | ||
|
||
^ false | ||
] |
7 changes: 7 additions & 0 deletions
7
packages/Sandblocks-Babylonian/SBInactiveExampleWatch.extension.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
Extension { #name : #SBInactiveExampleWatch } | ||
|
||
{ #category : #'*Sandblocks-Babylonian' } | ||
SBInactiveExampleWatch >> listensToExamples [ | ||
|
||
^ false | ||
] |