Skip to content

Commit

Permalink
Removing dead code
Browse files Browse the repository at this point in the history
Cleaning IceTipCritiquesBeforeCommitBrowser logic.
  • Loading branch information
Ducasse committed Jan 28, 2025
1 parent a38b9e6 commit f83b6a3
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 13 deletions.
3 changes: 1 addition & 2 deletions Iceberg-TipUI/IceTipCommitBrowser.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -118,8 +118,7 @@ IceTipCommitBrowser >> doCommit [
pushing: isPushing
saving: isSaving ].

(IceTipCritiquesBeforeCommitBrowser newApplication: self application model: selectedItems)
commitModel: self model;
(IceTipCritiquesBeforeCommitBrowser newApplication: self application model: selectedItems -> self model)
onAccept: commitBlock ;
openIfCritiques
]
Expand Down
25 changes: 20 additions & 5 deletions Iceberg-TipUI/IceTipCritiquesBeforeCommitBrowser.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,12 @@ IceTipCritiquesBeforeCommitBrowser >> accept [
onAcceptAction value
]

{ #category : 'initialization' }
IceTipCritiquesBeforeCommitBrowser >> branch [

^ commitModel ifNotNil: [:c | c repositoryModel branchName ] ifNil: [ 'missing branch info' ]
]

{ #category : 'private' }
IceTipCritiquesBeforeCommitBrowser >> calculateCritics [
| visitor calculatedCritics |
Expand Down Expand Up @@ -192,7 +198,7 @@ IceTipCritiquesBeforeCommitBrowser >> initializePresenters [
browseButton := self newButton.
browseButton label: 'Browse Entity'.
browseButton action: (MessageSend receiver: self selector: #doBrowse).
browseButton icon: (self iconNamed: #glamorousBrowse).
browseButton icon: (self iconNamed: #browse).

autofixButton := self newButton.
autofixButton label: 'Autofix'.
Expand Down Expand Up @@ -242,10 +248,19 @@ IceTipCritiquesBeforeCommitBrowser >> openIfCritiques [

]

{ #category : 'initialization' }
IceTipCritiquesBeforeCommitBrowser >> repositoryName [

^ commitModel ifNotNil: [:c | c repositoryModel name] ifNil: [ 'repository' ]


]

{ #category : 'accessing - model' }
IceTipCritiquesBeforeCommitBrowser >> setModelBeforeInitialization: someNodes [

model := someNodes

model := someNodes key.
commitModel := someNodes value
]

{ #category : 'initialization' }
Expand Down Expand Up @@ -281,6 +296,6 @@ IceTipCritiquesBeforeCommitBrowser >> updateSelectedCritique [
IceTipCritiquesBeforeCommitBrowser >> windowTitle [

^ 'Critiques for Commit on {1} branch {2}' format: {
commitModel repositoryModel name.
commitModel repositoryModel branchName }
self repositoryName .
self branch }
]
6 changes: 0 additions & 6 deletions Iceberg-TipUI/IceTipPresenter.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -44,12 +44,6 @@ IceTipPresenter >> decorations [
^ decorations ifNil: [ decorations := self class buildDecorations ]
]

{ #category : 'initialization' }
IceTipPresenter >> setInitialExtentTo: aSpWindowPresenter [

aSpWindowPresenter initialExtent: self initialExtentForWindow
]

{ #category : 'extensions' }
IceTipPresenter >> updateTitle [

Expand Down

0 comments on commit f83b6a3

Please sign in to comment.