Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion src/Album-Examples/AlbExamplesSeeClassSide.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -321,7 +321,6 @@ broken in GlamorousToolKit but what to do with that ?
cache := Dictionary new.

attribute := AlbTextAdornmentDynamicAttribute new
beSync;
"beAppend;"
stencil: [ {
BlElement new
Expand Down
33 changes: 3 additions & 30 deletions src/Album/AlbTextAdornmentAttribute.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@ Class {
#name : #AlbTextAdornmentAttribute,
#superclass : #BlTextAttribute,
#instVars : [
'shouldAppend',
'renderingStrategy'
'shouldAppend'
],
#category : #'Album-Attributes'
}
Expand All @@ -18,29 +17,19 @@ AlbTextAdornmentAttribute >> affect: aTTextEditorTextualPiece in: anEditorElemen
"Return an element that should affect (either append or replace) a provided text piece"
<return: #SequenceableCollection of: #BlElement>

^ self renderingStrategy affect: aTTextEditorTextualPiece in: anEditorElement
^ self doAffect: aTTextEditorTextualPiece in: anEditorElement
]

{ #category : #accessing }
AlbTextAdornmentAttribute >> beAppend [
shouldAppend := true
]

{ #category : #accessing }
AlbTextAdornmentAttribute >> beLazy [
self renderingStrategy: AlbTextAdornmentAttributeTaskItRenderingStrategy new.
]

{ #category : #accessing }
AlbTextAdornmentAttribute >> beReplace [
shouldAppend := false
]

{ #category : #accessing }
AlbTextAdornmentAttribute >> beSync [
self renderingStrategy: AlbTextAdornmentAttributeSyncRenderingStrategy new.
]

{ #category : #accessing }
AlbTextAdornmentAttribute >> doAffect: aTTextEditorTextualPiece in: anEditorElement [
"Return an element that should affect (either append or replace) a provided text piece"
Expand All @@ -53,8 +42,7 @@ AlbTextAdornmentAttribute >> doAffect: aTTextEditorTextualPiece in: anEditorElem
AlbTextAdornmentAttribute >> initialize [
super initialize.

shouldAppend := false.
self renderingStrategy: AlbTextAdornmentAttributeSyncRenderingStrategy new.
shouldAppend := false
]

{ #category : #initialization }
Expand Down Expand Up @@ -93,21 +81,6 @@ AlbTextAdornmentAttribute >> mayHaveExternalReferences [
^ true
]

{ #category : #accessing }
AlbTextAdornmentAttribute >> renderingStrategy [
<return: #AlbTextAdornmentAttributeRenderingStrategy>
^ renderingStrategy
]

{ #category : #accessing }
AlbTextAdornmentAttribute >> renderingStrategy: aTextAdornmentAttributeRenderingStrategy [
self
assert: [ aTextAdornmentAttributeRenderingStrategy isNotNil ]
description: [ 'Text attribute rendering strategy must be non-nil' ].
aTextAdornmentAttributeRenderingStrategy attribute: self.
renderingStrategy := aTextAdornmentAttributeRenderingStrategy
]

{ #category : #testing }
AlbTextAdornmentAttribute >> shouldAppend [
^ shouldAppend
Expand Down
31 changes: 0 additions & 31 deletions src/Album/AlbTextAdornmentAttributeRenderingStrategy.class.st

This file was deleted.

12 changes: 0 additions & 12 deletions src/Album/AlbTextAdornmentAttributeSyncRenderingStrategy.class.st

This file was deleted.

This file was deleted.

Loading