diff --git a/src/Album-Examples/AlbExamplesSeeClassSide.class.st b/src/Album-Examples/AlbExamplesSeeClassSide.class.st index c610ad0..68c4451 100644 --- a/src/Album-Examples/AlbExamplesSeeClassSide.class.st +++ b/src/Album-Examples/AlbExamplesSeeClassSide.class.st @@ -321,7 +321,6 @@ broken in GlamorousToolKit but what to do with that ? cache := Dictionary new. attribute := AlbTextAdornmentDynamicAttribute new - beSync; "beAppend;" stencil: [ { BlElement new diff --git a/src/Album/AlbTextAdornmentAttribute.class.st b/src/Album/AlbTextAdornmentAttribute.class.st index e31d7e3..bf366fa 100644 --- a/src/Album/AlbTextAdornmentAttribute.class.st +++ b/src/Album/AlbTextAdornmentAttribute.class.st @@ -7,8 +7,7 @@ Class { #name : #AlbTextAdornmentAttribute, #superclass : #BlTextAttribute, #instVars : [ - 'shouldAppend', - 'renderingStrategy' + 'shouldAppend' ], #category : #'Album-Attributes' } @@ -18,7 +17,7 @@ AlbTextAdornmentAttribute >> affect: aTTextEditorTextualPiece in: anEditorElemen "Return an element that should affect (either append or replace) a provided text piece" - ^ self renderingStrategy affect: aTTextEditorTextualPiece in: anEditorElement + ^ self doAffect: aTTextEditorTextualPiece in: anEditorElement ] { #category : #accessing } @@ -26,21 +25,11 @@ 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" @@ -53,8 +42,7 @@ AlbTextAdornmentAttribute >> doAffect: aTTextEditorTextualPiece in: anEditorElem AlbTextAdornmentAttribute >> initialize [ super initialize. - shouldAppend := false. - self renderingStrategy: AlbTextAdornmentAttributeSyncRenderingStrategy new. + shouldAppend := false ] { #category : #initialization } @@ -93,21 +81,6 @@ AlbTextAdornmentAttribute >> mayHaveExternalReferences [ ^ true ] -{ #category : #accessing } -AlbTextAdornmentAttribute >> renderingStrategy [ - - ^ 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 diff --git a/src/Album/AlbTextAdornmentAttributeRenderingStrategy.class.st b/src/Album/AlbTextAdornmentAttributeRenderingStrategy.class.st deleted file mode 100644 index 00d40b4..0000000 --- a/src/Album/AlbTextAdornmentAttributeRenderingStrategy.class.st +++ /dev/null @@ -1,31 +0,0 @@ -Class { - #name : #AlbTextAdornmentAttributeRenderingStrategy, - #superclass : #Object, - #traits : 'TBlDebug', - #classTraits : 'TBlDebug classTrait', - #instVars : [ - 'attribute' - ], - #category : #'Album-Attributes - Support' -} - -{ #category : #accessing } -AlbTextAdornmentAttributeRenderingStrategy >> affect: aTTextEditorTextualPiece in: anEditorElement [ - "Return an element that should affect (either append or replace) a provided text piece" - - ^ self subclassResponsibility -] - -{ #category : #accessing } -AlbTextAdornmentAttributeRenderingStrategy >> attribute [ - - ^ attribute -] - -{ #category : #accessing } -AlbTextAdornmentAttributeRenderingStrategy >> attribute: aTextAdornmentAttribute [ - self - assert: [ aTextAdornmentAttribute isNotNil ] - description: [ 'Attribute must be non-nil' ]. - attribute := aTextAdornmentAttribute -] diff --git a/src/Album/AlbTextAdornmentAttributeSyncRenderingStrategy.class.st b/src/Album/AlbTextAdornmentAttributeSyncRenderingStrategy.class.st deleted file mode 100644 index 75e41ad..0000000 --- a/src/Album/AlbTextAdornmentAttributeSyncRenderingStrategy.class.st +++ /dev/null @@ -1,12 +0,0 @@ -Class { - #name : #AlbTextAdornmentAttributeSyncRenderingStrategy, - #superclass : #AlbTextAdornmentAttributeRenderingStrategy, - #category : #'Album-Attributes - Support' -} - -{ #category : #accessing } -AlbTextAdornmentAttributeSyncRenderingStrategy >> affect: aTTextEditorTextualPiece in: anEditorElement [ - "Return an element that should affect (either append or replace) a provided text piece" - - ^ self attribute doAffect: aTTextEditorTextualPiece in: anEditorElement -] diff --git a/src/Album/AlbTextAdornmentAttributeTaskItRenderingStrategy.class.st b/src/Album/AlbTextAdornmentAttributeTaskItRenderingStrategy.class.st deleted file mode 100644 index c2a245c..0000000 --- a/src/Album/AlbTextAdornmentAttributeTaskItRenderingStrategy.class.st +++ /dev/null @@ -1,17 +0,0 @@ -Class { - #name : #AlbTextAdornmentAttributeTaskItRenderingStrategy, - #superclass : #AlbTextAdornmentAttributeRenderingStrategy, - #category : #'Album-Attributes - Support' -} - -{ #category : #accessing } -AlbTextAdornmentAttributeTaskItRenderingStrategy >> affect: aTTextEditorTextualPiece in: anEditorElement [ - "Return an element that should affect (either append or replace) a provided text piece" - - -self flag: 'TODO: understand withGlamorousPreview.'. - ^ BlLazyElement new - "withGlamorousPreview;" - in: [ :theElement | self attribute initializeLazyElement: theElement ]; - elementBuilder: [ self attribute doAffect: aTTextEditorTextualPiece in: anEditorElement ] -]