Skip to content

Commit

Permalink
Remove dead code
Browse files Browse the repository at this point in the history
- Remove #items from DTReRunConfiguration because this is never called (I checked) and calls dead code
- Remove printing methods from KeyMapping because they call dead code, cannot work and are never called
- Fix deprecation in SpRubFindReplaceDialog

Fixes pharo-project#17606
Fixes pharo-project#17609
  • Loading branch information
jecisc committed Jan 17, 2025
1 parent 3bdc17f commit 4eb53e4
Show file tree
Hide file tree
Showing 11 changed files with 24 additions and 87 deletions.
5 changes: 0 additions & 5 deletions src/DrTests/DTReRunConfiguration.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,6 @@ DTReRunConfiguration >> configurationToRun: anObject [
configurationToRun := anObject
]

{ #category : 'accessing' }
DTReRunConfiguration >> items [
^ { self testToReRun }
]

{ #category : 'accessing' }
DTReRunConfiguration >> originalConfiguration [
^ originalConfiguration
Expand Down
5 changes: 0 additions & 5 deletions src/Keymapping-KeyCombinations/KMAltModifier.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,3 @@ KMAltModifier >> initialize [
KMAltModifier >> matchesEvent: aKeyboardEvent [
^ aKeyboardEvent altKeyPressed
]

{ #category : 'printing' }
KMAltModifier >> printingPosition [
^2
]
5 changes: 0 additions & 5 deletions src/Keymapping-KeyCombinations/KMCommandModifier.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,3 @@ KMCommandModifier >> initialize [
KMCommandModifier >> matchesEvent: aKeyboardEvent [
^ aKeyboardEvent commandKeyPressed
]

{ #category : 'printing' }
KMCommandModifier >> printingPosition [
^1
]
9 changes: 0 additions & 9 deletions src/Keymapping-KeyCombinations/KMComposedModifier.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -85,15 +85,6 @@ KMComposedModifier >> printOn: aStream [
separatedBy: [ aStream << ' + ' ]
]

{ #category : 'printing' }
KMComposedModifier >> printOsRepresentationOn: aStream [
| modifiersSorted |
modifiersSorted := modifiers asSortedCollection: [ : a : b | a printingPosition < b printingPosition ].
modifiersSorted
do: [ :modifier| modifier printOsRepresentationOn: aStream ]
separatedBy: [ aStream << $+ ]
]

{ #category : 'combining' }
KMComposedModifier >> shift [
modifiers add: KMModifier shift
Expand Down
5 changes: 0 additions & 5 deletions src/Keymapping-KeyCombinations/KMCtrlModifier.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,3 @@ KMCtrlModifier >> initialize [
KMCtrlModifier >> matchesEvent: aKeyboardEvent [
^ aKeyboardEvent controlKeyPressed
]

{ #category : 'printing' }
KMCtrlModifier >> printingPosition [
^3
]
13 changes: 0 additions & 13 deletions src/Keymapping-KeyCombinations/KMKeyCombination.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -146,19 +146,6 @@ KMKeyCombination >> prettyPrintOn: aStream [
self shortcut character name printOn: aStream
]

{ #category : 'printing' }
KMKeyCombination >> printOsRepresentation [
^String streamContents: [ : stream | self printOsRepresentationOn: stream ]
]

{ #category : 'printing' }
KMKeyCombination >> printOsRepresentationOn: aStream [
self shortcut modifier ifNotNil: [: modifier |
modifier printOsRepresentationOn: aStream.
aStream << $+].
self shortcut character printOn: aStream
]

{ #category : 'accessing' }
KMKeyCombination >> shortcut [
^self
Expand Down
10 changes: 0 additions & 10 deletions src/Keymapping-KeyCombinations/KMMetaModifier.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -50,13 +50,3 @@ KMMetaModifier >> matches: aKeyboardEvent [
KMMetaModifier >> matchesEvent: aKeyboardEvent [
^ OSPlatform current defaultModifier matchesEvent: aKeyboardEvent
]

{ #category : 'printing' }
KMMetaModifier >> printOsRepresentationOn: aStream [
aStream << Smalltalk os menuShortcutModifierString
]

{ #category : 'printing' }
KMMetaModifier >> printingPosition [
^1
]
10 changes: 0 additions & 10 deletions src/Keymapping-KeyCombinations/KMModifier.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -105,16 +105,6 @@ KMModifier >> printOn: aStream [
aStream << name
]

{ #category : 'printing' }
KMModifier >> printOsRepresentationOn: aStream [
aStream << name asLowercase
]

{ #category : 'printing' }
KMModifier >> printingPosition [
^self subclassResponsibility
]

{ #category : 'private' }
KMModifier >> species [

Expand Down
5 changes: 0 additions & 5 deletions src/Keymapping-KeyCombinations/KMShiftModifier.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,3 @@ KMShiftModifier >> initialize [
KMShiftModifier >> matchesEvent: aKeyboardEvent [
^ aKeyboardEvent shiftPressed
]

{ #category : 'printing' }
KMShiftModifier >> printingPosition [
^4
]
4 changes: 2 additions & 2 deletions src/ReleaseTests/ReleaseTest.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -540,13 +540,13 @@ ReleaseTest >> testThatThereAreNoSelectorsRemainingThatAreSentButNotImplemented
'AthensPolygon>>#paintFillsUsing:on:' 'BalloonEdgeData>>#stepToFirstScanLine' 'BalloonEdgeData>>#stepToNextScanLine'
'BalloonEngine>>#registerFills:' 'BalloonFillData>>#computeFill' 'ClyFullBrowserMorph>>#extendClassScopeForMethods:'
'ComplexBorderStyle>>#drawPolyPatchFrom:to:on:usingEnds:' 'ComplexBorderStyle>>#drawLineFrom:to:on:'
'Context>>#doPrimitive:method:receiver:args:' 'Context>>#failPrimitiveWith:' 'DTReRunConfiguration>>#items' 'DebugSession>>#shouldDisplayContext:basedOnFilters:'
'Context>>#doPrimitive:method:receiver:args:' 'Context>>#failPrimitiveWith:' 'DebugSession>>#shouldDisplayContext:basedOnFilters:'
'EDTest>>#prepareMethodVersionTest' 'ExternalDropHandler class>>#defaultHandler' 'FFICallbackArgumentReader>>#stackPointer'
'FFIFloat32>>#callbackReturnOn:for:' 'FFIFloatType>>#callbackReturnOn:for:' 'FFIIndirectFunctionResolution>>#resolveFunction:'
'OCIRReconstructor>>#fixPushNilsForTemps' 'IceTipHiedraAltComponentHistoryBrowser>>#newCommitRow:commit:'
'IceTipHiedraAltHistoryBrowser>>#newCommitRow:commit:' 'IceTipHiedraAltHistoryBrowser>>#initializeCommitList'
'InstructionStream>>#interpretNext3ByteSistaV1Instruction:for:extA:extB:startPC:'
'KMMetaModifier>>#printOsRepresentationOn:' 'LazyListMorph>>#drawOnAthensCanvas:' 'MCFileTreeAbstractReader>>#packageProperties'
'LazyListMorph>>#drawOnAthensCanvas:' 'MCFileTreeAbstractReader>>#packageProperties'
'MicrodownSpecComponentForTest class>>#open' 'MorphTreeMorph>>#nodeExpandRequest:' 'MorphTreeMorph>>#selectItemsRequest:'
'PSMCClassChangeWrapper>>#remoteChosen' 'PolygonMorph>>#intersects:' 'RBBasicDummyLintRuleTest class>>#createMatcherFor:method:'
'RBBasicDummyLintRuleTest class>>#usesAdd' 'RBBasicDummyLintRuleTest class>>#unreferencedVariables'
Expand Down
40 changes: 22 additions & 18 deletions src/Rubric-SpecFindReplaceDialog/SpRubFindReplaceDialog.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -25,32 +25,36 @@ Class {

{ #category : 'layout' }
SpRubFindReplaceDialog class >> defaultLayout [

<spec>
^ SpBoxLayout newVertical
add: #findInput expand: false;
add: (SpGridLayout new
beColumnHomogeneous;
beRowHomogeneous;
add: #regExpCheckBox at: 1@1;
add: #backwardsCheckBox at: 2@1;
add: #caseCheckBox at: 1@2;
add: #wrapCheckBox at: 2@2;
add: #entireCheckBox at: 1@3;
yourself);
addLast: (SpBoxLayout newHorizontal
borderWidth: 5;
spacing: 5;
add: #replaceLabel expand: false fill: false padding: 0;
add: #replaceTextInput;
yourself);
"addLast: (SpBoxLayout newHorizontal
add: #findInput expand: false;
add: (SpGridLayout new
beColumnHomogeneous;
beRowHomogeneous;
add: #regExpCheckBox atPoint: 1 @ 1;
add: #backwardsCheckBox at: 2 @ 1;
add: #caseCheckBox at: 1 @ 2;
add: #wrapCheckBox at: 2 @ 2;
add: #entireCheckBox at: 1 @ 3;
yourself);
addLast: (SpBoxLayout newHorizontal
borderWidth: 5;
spacing: 5;
add: #replaceLabel
expand: false
fill: false
padding: 0;
add: #replaceTextInput;
yourself);
"addLast: (SpBoxLayout newHorizontal
borderWidth: 3;
spacing: 5;
add: #findButton;
add: #replaceButton;
add: #replaceAllButton;
add: #cancelButton);"
yourself
yourself
]

{ #category : 'morphic dependencies' }
Expand Down

0 comments on commit 4eb53e4

Please sign in to comment.