From 264b4aeb75d4d0805df4b7d73323cd6656becee4 Mon Sep 17 00:00:00 2001 From: Martin Dias Date: Sat, 18 Jan 2025 00:19:14 -0300 Subject: [PATCH] Delete unused 'View-Repository-HiedraAlt' tag --- ...pHiedraAltComponentHistoryBrowser.class.st | 151 ---------------- .../IceTipHiedraAltHistoryBrowser.class.st | 165 ------------------ ...ceTipHiedraAltHistoryRowPresenter.class.st | 60 ------- 3 files changed, 376 deletions(-) delete mode 100644 Iceberg-TipUI/IceTipHiedraAltComponentHistoryBrowser.class.st delete mode 100644 Iceberg-TipUI/IceTipHiedraAltHistoryBrowser.class.st delete mode 100644 Iceberg-TipUI/IceTipHiedraAltHistoryRowPresenter.class.st diff --git a/Iceberg-TipUI/IceTipHiedraAltComponentHistoryBrowser.class.st b/Iceberg-TipUI/IceTipHiedraAltComponentHistoryBrowser.class.st deleted file mode 100644 index b3a20d5b0c..0000000000 --- a/Iceberg-TipUI/IceTipHiedraAltComponentHistoryBrowser.class.st +++ /dev/null @@ -1,151 +0,0 @@ -Class { - #name : 'IceTipHiedraAltComponentHistoryBrowser', - #superclass : 'IceTipHistoryBrowser', - #instVars : [ - 'hiedraColumnController' - ], - #category : 'Iceberg-TipUI-View-Repository-HiedraAlt', - #package : 'Iceberg-TipUI', - #tag : 'View-Repository-HiedraAlt' -} - -{ #category : 'commands' } -IceTipHiedraAltComponentHistoryBrowser >> availableCommands [ - - ^ self cleanRootsCommandGroup -] - -{ #category : 'commands' } -IceTipHiedraAltComponentHistoryBrowser >> contextMenuCommands [ - - self availableCommands - commandOrGroupNamed: self class selectionCommandGroupName - ifFound: [ :subgroup | - ^ subgroup beRoot ]. - - self error: 'Should not arrive here' -] - -{ #category : 'initialization' } -IceTipHiedraAltComponentHistoryBrowser >> initializeCommitList [ - - self error: 'Should not arrive here' -] - -{ #category : 'initialization' } -IceTipHiedraAltComponentHistoryBrowser >> initializeHiedraColumn [ - | ancestorIds | - - hiedraColumnController := HiColumnController new. - hiedraColumnController renderer - linkWidth: 3.5; - nodeRadius: 1.5; - nodeBorderWidth: 3.0; - arrowSize: 0; - nodeConnectionOffset: 3; - cellWidth: 7"; - useUniformColorStrategy". - - ancestorIds := Dictionary new. - self model commitModels do: [ :aCommit | - "Note: Hiedra expects each ancestor id corresponds to a commit in elements." - ancestorIds - at: aCommit id - put: aCommit entity ancestorIds ]. - - hiedraColumnController ruler: (HiRulerBuilder - "Note: ids should keep the original order." - newRulerValues: (self model commitModels collect: #id) - linksBlock: [ :id | ancestorIds at: id ]). - - hiedraColumnController renderer rowHeight: 20 -] - -{ #category : 'initialization' } -IceTipHiedraAltComponentHistoryBrowser >> initializePresenters [ - - commitList := self newComponentList. - commitList actions: self contextMenuCommands. - - commitInfoTabs := self instantiate: IceTipCommitInfoPresenter. - - self initializeHiedraColumn -] - -{ #category : 'initialization' } -IceTipHiedraAltComponentHistoryBrowser >> initializeWindow: aWindowPresenter [ - - super initializeWindow: aWindowPresenter. -] - -{ #category : 'initialization' } -IceTipHiedraAltComponentHistoryBrowser >> newCommitRow: index commit: item [ - - ^ self - instantiate: IceTipHiedraAltHistoryRowPresenter - on: { (hiedraColumnController formAtRow: index). item } -] - -{ #category : 'accessing' } -IceTipHiedraAltComponentHistoryBrowser >> refresh [ - - self refreshHiedraColumn. - super refresh -] - -{ #category : 'commands' } -IceTipHiedraAltComponentHistoryBrowser >> refreshCommands [ - - self refreshToolbarWith: self availableCommands -] - -{ #category : 'accessing' } -IceTipHiedraAltComponentHistoryBrowser >> refreshCommitList [ - | commitModels | - - commitModels := self model commitModels. - commitList model: (SpGeneratorListModel on: [ :generator | - commitModels withIndexDo: [ :each :index | - generator yield: (self newCommitRow: index commit: each) ] ]). - commitInfoTabs selectedModel: (commitModels ifNotEmpty: #first ifEmpty: [ nil ]) -] - -{ #category : 'accessing' } -IceTipHiedraAltComponentHistoryBrowser >> refreshHiedraColumn [ - | ancestorIds walk | - - self flag: #TODO. "Move this to a model" - ancestorIds := OrderedDictionary new. - walk := self model entity newCommitWalk. - walk revwalk - beSortedByCommitTime; - beSortedParentsBeforeChildren. - walk commitsDo: [ :aCommit | - ancestorIds - at: aCommit id - put: aCommit ancestorIds ]. - hiedraColumnController reset. - - "Note: ids should keep the original order to generate the ruler correctly." - hiedraColumnController ruler: (HiRulerBuilder - newRulerValues: ancestorIds keys - linksBlock: [ :id | ancestorIds at: id ]) -] - -{ #category : 'accessing' } -IceTipHiedraAltComponentHistoryBrowser >> selectedCommit [ - - ^ commitList selection selectedItem ifNotNil: #item -] - -{ #category : 'accessing' } -IceTipHiedraAltComponentHistoryBrowser >> selectedItem [ - - ^ self selectedCommit -] - -{ #category : 'initialization' } -IceTipHiedraAltComponentHistoryBrowser >> updatePresenter [ - - "self refresh" -] diff --git a/Iceberg-TipUI/IceTipHiedraAltHistoryBrowser.class.st b/Iceberg-TipUI/IceTipHiedraAltHistoryBrowser.class.st deleted file mode 100644 index 2dfc54cab8..0000000000 --- a/Iceberg-TipUI/IceTipHiedraAltHistoryBrowser.class.st +++ /dev/null @@ -1,165 +0,0 @@ -Class { - #name : 'IceTipHiedraAltHistoryBrowser', - #superclass : 'IceTipHistoryBrowser', - #instVars : [ - 'hiedraColumnController' - ], - #category : 'Iceberg-TipUI-View-Repository-HiedraAlt', - #package : 'Iceberg-TipUI', - #tag : 'View-Repository-HiedraAlt' -} - -{ #category : 'commands' } -IceTipHiedraAltHistoryBrowser >> availableCommands [ - - ^ self cleanRootsCommandGroup -] - -{ #category : 'commands' } -IceTipHiedraAltHistoryBrowser >> contextMenuCommands [ - - self availableCommands - commandOrGroupNamed: self class selectionCommandGroupName - ifFound: [ :subgroup | - ^ subgroup beRoot ]. - - self error: 'Should not arrive here' -] - -{ #category : 'initialization' } -IceTipHiedraAltHistoryBrowser >> initializeCommitList [ - - commitList - beResizable; - addColumn: (SpCompositeTableColumn new - title: 'Commit'; - addColumn: (SpImageTableColumn new - evaluated: [ :each | - (hiedraColumnController formAtRow: (commitList items indexOf: each) ) ]; - "beNotExpandable;" - yourself); - addColumn: (SpStringTableColumn new - evaluated: [ :each | each tagsDescription ]; - displayColor: [ :each | each tagDecorator color ]; - displayBold: [ :each | each tagDecorator isBold ]; - displayItalic: [ :each | each tagDecorator isItalic ]; - yourself); - addColumn: (SpStringTableColumn new - evaluated: #shortDescription; - yourself); - yourself); - addColumn: (SpStringTableColumn new - title: 'Author'; - evaluated: #author; - width: 180; - yourself); - addColumn: ((SpStringTableColumn - evaluated: [ :each | each timeStamp asLocalStringYMDHM ]) - title: 'Timestamp'; - width: 120; - yourself); - whenSelectionChangedDo: [ :aSelection | - self selectionChanged: aSelection selectedItem ] -] - -{ #category : 'initialization' } -IceTipHiedraAltHistoryBrowser >> initializeHiedraColumn [ - | ancestorIds | - - hiedraColumnController := HiColumnController new. - hiedraColumnController renderer - linkWidth: 3.5; - nodeRadius: 1.5; - nodeBorderWidth: 3.0; - arrowSize: 0; - nodeConnectionOffset: 3; - cellWidth: 7"; - useUniformColorStrategy". - - ancestorIds := Dictionary new. - self model commitModels do: [ :aCommit | - "Note: Hiedra expects each ancestor id corresponds to a commit in elements." - ancestorIds - at: aCommit id - put: aCommit entity ancestorIds ]. - - hiedraColumnController ruler: (HiRulerBuilder - "Note: ids should keep the original order." - newRulerValues: (self model commitModels collect: #id) - linksBlock: [ :id | ancestorIds at: id ]). - - hiedraColumnController renderer rowHeight: 20 -] - -{ #category : 'initialization' } -IceTipHiedraAltHistoryBrowser >> initializePresenters [ - - commitList := self newTable. - commitList actions: self contextMenuCommands. - - commitInfoTabs := self instantiate: IceTipCommitInfoPresenter. - - self initializeHiedraColumn. - self initializeCommitList -] - -{ #category : 'initialization' } -IceTipHiedraAltHistoryBrowser >> initializeWindow: aWindowPresenter [ - - super initializeWindow: aWindowPresenter. -] - -{ #category : 'initialization' } -IceTipHiedraAltHistoryBrowser >> newCommitRow: index commit: item [ - - ^ self - instantiate: IceTipHiedraAltHistoryRowPresenter - on: { (hiedraColumnController formAtRow: index). item } -] - -{ #category : 'accessing' } -IceTipHiedraAltHistoryBrowser >> refresh [ - - self refreshHiedraColumn. - super refresh -] - -{ #category : 'commands' } -IceTipHiedraAltHistoryBrowser >> refreshCommands [ - - self refreshToolbarWith: self availableCommands -] - -{ #category : 'accessing' } -IceTipHiedraAltHistoryBrowser >> refreshHiedraColumn [ - | ancestorIds walk | - - self flag: #TODO. "Move this to a model" - ancestorIds := OrderedDictionary new. - walk := self model entity newCommitWalk. - walk revwalk - beSortedByCommitTime; - beSortedParentsBeforeChildren. - walk commitsDo: [ :aCommit | - ancestorIds - at: aCommit id - put: aCommit ancestorIds ]. - hiedraColumnController reset. - - "Note: ids should keep the original order to generate the ruler correctly." - hiedraColumnController ruler: (HiRulerBuilder - newRulerValues: ancestorIds keys - linksBlock: [ :id | ancestorIds at: id ]) -] - -{ #category : 'accessing' } -IceTipHiedraAltHistoryBrowser >> selectedItem [ - - ^ self selectedCommit -] - -{ #category : 'initialization' } -IceTipHiedraAltHistoryBrowser >> updatePresenter [ - - "self refresh" -] diff --git a/Iceberg-TipUI/IceTipHiedraAltHistoryRowPresenter.class.st b/Iceberg-TipUI/IceTipHiedraAltHistoryRowPresenter.class.st deleted file mode 100644 index e2b6ea1bc2..0000000000 --- a/Iceberg-TipUI/IceTipHiedraAltHistoryRowPresenter.class.st +++ /dev/null @@ -1,60 +0,0 @@ -Class { - #name : 'IceTipHiedraAltHistoryRowPresenter', - #superclass : 'SpPresenter', - #traits : 'SpTModel', - #classTraits : 'SpTModel classTrait', - #category : 'Iceberg-TipUI-View-Repository-HiedraAlt', - #package : 'Iceberg-TipUI', - #tag : 'View-Repository-HiedraAlt' -} - -{ #category : 'initialization' } -IceTipHiedraAltHistoryRowPresenter >> addTagsTo: aLayout [ - | tagNames tagLayout | - - tagNames := self item tagNames. - tagNames ifEmpty: [ ^ self ]. - - tagLayout := SpBoxLayout newLeftToRight - spacing: 5; - yourself. - tagNames do: [ :each | - tagLayout - add: (self newLabel - addStyle: 'iceTag'; - label: each; - displayColor: [ self item tagDecorator color ]; - displayBold: [ self item tagDecorator isBold ]; - displayItalic: [ self item tagDecorator isItalic ]; - yourself) - expand: false ]. - - aLayout add: tagLayout expand: false -] - -{ #category : 'accessing' } -IceTipHiedraAltHistoryRowPresenter >> form [ - - ^ self model first -] - -{ #category : 'initialization' } -IceTipHiedraAltHistoryRowPresenter >> initializePresenters [ - - self layout: (SpBoxLayout newLeftToRight - spacing: 5; - add: (SpBoxLayout newLeftToRight - add: (self newImage image: self form) expand: false; - in: [ :this | self addTagsTo: this ]; - add: self item shortDescription; - yourself); - add: self item author width: 160; - add: self item timeStamp asLocalStringYMDHM width: 120; - yourself). -] - -{ #category : 'accessing' } -IceTipHiedraAltHistoryRowPresenter >> item [ - - ^ self model second -]