Skip to content

Commit

Permalink
Change #notNil into #isNotNil in NewTools packages
Browse files Browse the repository at this point in the history
Fix #674
  • Loading branch information
astares committed Jan 29, 2024
1 parent e57705f commit 43a415d
Show file tree
Hide file tree
Showing 28 changed files with 38 additions and 38 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ CBCritiqueWorkingConfiguration class >> current [
{ #category : 'testing' }
CBCritiqueWorkingConfiguration class >> exists [

^ Current notNil
^ Current isNotNil
]

{ #category : 'instance creation' }
Expand Down
2 changes: 1 addition & 1 deletion src/NewTools-Core/StHeaderBar.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ StHeaderBar >> initializePresenters [
{ #category : 'testing' }
StHeaderBar >> isCloseable [

^ closeButton notNil
^ closeButton isNotNil
]

{ #category : 'accessing' }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1130,7 +1130,7 @@ StDebuggerActionModelTest >> testUpdateDebugSession [
exception := session exception.
session exception: nil.
debugActionModel updateDebugSession.
self assert: session exception notNil.
self assert: session exception isNotNil.
self assert: session exception identicalTo: exception
]

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ StDebuggerAssertionContextTest >> testFindFailedAssertionContextInSenderChain [

debugger := StTestDebuggerProvider new debuggerWithFailingAssertionContext.
session := debugger session.
self assert: session interruptedContext findFailedAssertionContextInSenderChain notNil.
self assert: session interruptedContext findFailedAssertionContextInSenderChain isNotNil.
session clear.
debugger close.

Expand Down
2 changes: 1 addition & 1 deletion src/NewTools-Debugger-Tests/StDebuggerTest.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -549,7 +549,7 @@ StDebuggerTest >> testDebuggerActionModel [
debugger := self debuggerOn: session.
debuggerActionModel := slot read: debugger.

self assert: debuggerActionModel notNil
self assert: debuggerActionModel isNotNil
]

{ #category : 'tests - initialization' }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ StDebuggerToolbarCommandTreeBuilderTest >> testExecutionControlShortcuts [
| commandsWithShortcuts |
commandsWithShortcuts := builder executionControlCommandClasses
select: [ :class |
class defaultShortcut notNil ].
class defaultShortcut isNotNil ].
self assert: commandsWithShortcuts notEmpty.
commandsWithShortcuts do: [ :class |
| command |
Expand Down
2 changes: 1 addition & 1 deletion src/NewTools-Debugger/StDebugger.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -873,7 +873,7 @@ StDebugger >> isInSelectedContextClass: context [

| selectedContext |
selectedContext := self selectedContext.
^ selectedContext notNil and: [
^ selectedContext isNotNil and: [
selectedContext methodClass = context methodClass ]
]

Expand Down
6 changes: 3 additions & 3 deletions src/NewTools-Debugger/StDebuggerActionModel.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ StDebuggerActionModel >> contextPredicateFor: aContext [
{ #category : 'debug - predicates' }
StDebuggerActionModel >> contextSignalsAnException: aContext [

^ aContext notNil
^ aContext isNotNil
and: [ (aContext receiver isKindOf: Exception)
and: [ aContext selector = #signal ] ]
]
Expand Down Expand Up @@ -157,12 +157,12 @@ StDebuggerActionModel >> filterStack: aStack [
contextsToReject := 0.

[
context notNil and: [ context ~~ self referenceContext ] ]
context isNotNil and: [ context ~~ self referenceContext ] ]
whileTrue: [
contextsToReject := contextsToReject + 1.
context := context sender ].
[
context notNil and: [
context isNotNil and: [
context method hasPragmaNamed: #debuggerCompleteToSender ] ]
whileTrue: [
contextsToReject := contextsToReject + 1.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ StDebuggerContextInteractionModel >> doItReceiver [

{ #category : 'testing' }
StDebuggerContextInteractionModel >> hasBindingInContextOf: aString [
^ (context lookupVar: aString) notNil
^ (context lookupVar: aString) isNotNil
]

{ #category : 'testing' }
Expand All @@ -92,7 +92,7 @@ StDebuggerContextInteractionModel >> hasBindingOf: aString [
{ #category : 'testing' }
StDebuggerContextInteractionModel >> hasUnsavedCodeChanges [

^ context notNil and: [ context sourceCode ~= owner text asString ]
^ context isNotNil and: [ context sourceCode ~= owner text asString ]
]

{ #category : 'testing' }
Expand Down
2 changes: 1 addition & 1 deletion src/NewTools-FileBrowser/StFileSystemPresenter.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ StFileSystemPresenter >> connectPresenters [

treeNavigationSystem
transmitDo: [ : selection |
(self isDisplayed and: [ selection notNil ])
(self isDisplayed and: [ selection isNotNil ])
ifTrue: [ self updateWidgetWithFileReference: selection fileReference ] ].

bookmarksTreeTable whenSelectionChangedDo: [ :selection |
Expand Down
4 changes: 2 additions & 2 deletions src/NewTools-Finder/StFinderClassResult.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ StFinderClassResult >> displayIcon [
{ #category : 'action' }
StFinderClassResult >> forFinderPreview: aSpCodePresenter [

^ (self content isClass and: [ self parent notNil and: [ self parent isPackageResult not ] ])
^ (self content isClass and: [ self parent isNotNil and: [ self parent isPackageResult not ] ])
ifTrue: [
self
displaySource: self getCompiledMethod
Expand Down Expand Up @@ -90,7 +90,7 @@ StFinderClassResult >> getCompiledMethodFrom: aStFinderSelectorResult [
{ #category : 'copying' }
StFinderClassResult >> hasSelectorParent [

^ self parent notNil and: [ self parent isSelectorResult ]
^ self parent isNotNil and: [ self parent isSelectorResult ]
]

{ #category : 'action' }
Expand Down
2 changes: 1 addition & 1 deletion src/NewTools-Finder/StFinderResult.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ StFinderResult >> isClassResult [
{ #category : 'testing' }
StFinderResult >> isExampleResult [

^ self parent notNil and: [ self parent isExampleResult ]
^ self parent isNotNil and: [ self parent isExampleResult ]
]

{ #category : 'testing' }
Expand Down
4 changes: 2 additions & 2 deletions src/NewTools-Finder/StFinderSelectorResult.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ StFinderSelectorResult >> hasBrowseAction [
{ #category : 'testing' }
StFinderSelectorResult >> hasClassParent [

^ self parent notNil and: [ self parent isClassResult ]
^ self parent isNotNil and: [ self parent isClassResult ]
]

{ #category : 'testing' }
Expand Down Expand Up @@ -97,7 +97,7 @@ StFinderSelectorResult >> hasSendersAction [
{ #category : 'testing' }
StFinderSelectorResult >> hasVersionsAction [

^ self parent notNil and: [ self parent isClassResult ]
^ self parent isNotNil and: [ self parent isClassResult ]
]

{ #category : 'action' }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -214,23 +214,23 @@ AbstractFileReference >> isFuel [
AbstractFileReference >> isImageGif [

^ self isFile
and: [ self mimeTypes notNil
and: [ self mimeTypes isNotNil
and: [ self mimeTypes first matches: ZnMimeType imageGif ] ]
]

{ #category : '*NewTools-Inspector-Extensions' }
AbstractFileReference >> isImageJpeg [

^ self isFile
and: [ self mimeTypes notNil
and: [ self mimeTypes isNotNil
and: [ self mimeTypes first matches: ZnMimeType imageJpeg ] ]
]

{ #category : '*NewTools-Inspector-Extensions' }
AbstractFileReference >> isImagePng [

^ self isFile
and: [ self mimeTypes notNil
and: [ self mimeTypes isNotNil
and: [ self mimeTypes first matches: ZnMimeType imagePng ] ]
]

Expand Down
2 changes: 1 addition & 1 deletion src/NewTools-Inspector-Tests/StInspectorTest.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ StInspectorTest >> testDefineContextInSubclass [
StInspectorTest >> testFirstPage [

inspector open.
self assert: inspector firstPage notNil.
self assert: inspector firstPage isNotNil.
self assert:
(inspector firstPage isKindOf: StObjectInspectorPresenter)
]
Expand Down
4 changes: 2 additions & 2 deletions src/NewTools-MethodBrowsers/StMessageBrowser.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@ StMessageBrowser >> handleMethodAdded: anAnnouncement [
item := anAnnouncement method.

(self shouldRefreshItem: item fromAnnouncement: anAnnouncement) ifFalse: [ ^ self ].
((item methodClass notNil) and:[item methodClass isObsolete not]) ifFalse: [ ^ self ].
((item methodClass isNotNil) and:[item methodClass isObsolete not]) ifFalse: [ ^ self ].

boolean := textPresenter hasUnacceptedEdits.
boolean ifTrue: [ text := textPresenter pendingText ].
Expand Down Expand Up @@ -320,7 +320,7 @@ StMessageBrowser >> handleMethodRemoved: anAnnouncement [

"Item is a compiled methed, where the list is populated with RGMethod"
item := anAnnouncement method.
(item methodClass notNil and: [ item methodClass isObsolete not ])
(item methodClass isNotNil and: [ item methodClass isObsolete not ])
ifFalse: [ ^ self ].
selection := messageList selectedIndex.
removeItem := self selectedMessage.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -407,7 +407,7 @@ StVersionBrowserPresenter >> showSourceWithConverter: aConverter [
self textConverter: aConverter.

newSource := self newCode.
newSource whenSubmitDo: [ :text | (self accept: text notifying: nil) notNil ].
newSource whenSubmitDo: [ :text | (self accept: text notifying: nil) isNotNil ].
newSource beForMethod: self selectedMessage.

self replaceSourceWith: newSource
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ StPlaygroundPagesPresenterTest >> testLoadPage [
| loaded |

loaded := false.
self deny: presenter window notNil.
self deny: presenter window isNotNil.
self openInstance.
self assert: presenter window isOpen.
presenter onLoadPage: [ :aPage | loaded := true ].
Expand Down
2 changes: 1 addition & 1 deletion src/NewTools-Playground-Tests/StPlaygroundTest.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ StPlaygroundTest >> testNewInspectorForWorksWhenModelIsNil [
| inspectorPanel |

inspectorPanel := presenter newInspectorFor: nil.
self assert: inspectorPanel notNil.
self assert: inspectorPanel isNotNil.
self assert: (inspectorPanel isKindOf: StObjectInspectorPresenter)
]

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ StPlaygroundBindingsPresenter >> defaultLayout [
{ #category : 'testing' }
StPlaygroundBindingsPresenter >> hasSelectedBinding [

^ self selectedBinding notNil
^ self selectedBinding isNotNil
]

{ #category : 'initialization' }
Expand All @@ -108,7 +108,7 @@ StPlaygroundBindingsPresenter >> initializeInspectorPanel [
label: 'Inspector'.

inspector := self newPresenterSelector
when: [ :aBinding | aBinding notNil ] show: [ :aBinding |
when: [ :aBinding | aBinding isNotNil ] show: [ :aBinding |
self flag: #TODO. "Temporal? This is to avoid a dependency (while making
inspector work properly)"
self class environment
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ StPlaygroundInteractionModel >> hasBindingOf: aString [
{ #category : 'private' }
StPlaygroundInteractionModel >> isGlobalVariable: aSymbol [

^ (self class environment classNamed: aSymbol) notNil
^ (self class environment classNamed: aSymbol) isNotNil
]

{ #category : 'accessing' }
Expand Down
2 changes: 1 addition & 1 deletion src/NewTools-Playground/StPlaygroundPage.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ StPlaygroundPage >> readStreamDo: aBlock [
{ #category : 'private' }
StPlaygroundPage >> spawnFlushProcess [

(flushProcess notNil
(flushProcess isNotNil
and: [ flushProcess isTerminated not ])
ifTrue: [ ^ self ].

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ StPlaygroundPagesPresenter >> initializePresenters [
number: 2;
label: 'Preview';
presenter: (pagePreview := self newPresenterSelector
when: [ :aPage | aPage notNil ] show: [ :aPage |
when: [ :aPage | aPage isNotNil ] show: [ :aPage |
self newCode
editable: false;
text: aPage contents ];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ SindarinStepToNextInstanceCreation >> execute [
depth := 0.
errorString := nil.
debugger step.
[ debugger isAboutToInstantiateClass or: [ errorString notNil ] ]
[ debugger isAboutToInstantiateClass or: [ errorString isNotNil ] ]
whileFalse: [
debugger step.
depth := depth + 1.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,10 @@ StSindarinContextInteractionModel >> context: anObject [
context := anObject
]

{ #category : 'binding' }
{ #category : 'testing' }
StSindarinContextInteractionModel >> hasBindingOf: aString [
self bindings at: aString ifAbsent: [
^ (context receiver class hasSlotNamed: aString) or: [
(context temporaryVariableNamed: aString) notNil ] ].
(context temporaryVariableNamed: aString) isNotNil ] ].
^ true
]
2 changes: 1 addition & 1 deletion src/NewTools-Spotter-Processors/StIterator.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ StIterator >> next: aQuantity [
last ifNotNil: [
stream nextPut: last.
total := total + 1 ] ]
doWhileTrue: [ total < aQuantity and: [ last notNil ] ] ]
doWhileTrue: [ total < aQuantity and: [ last isNotNil ] ] ]
]

{ #category : 'events' }
Expand Down
2 changes: 1 addition & 1 deletion src/NewTools-Spotter/StSpotter.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -640,7 +640,7 @@ StSpotter >> nextSelectablePresenter: selectedPresenter oldPresenters: oldPresen

"look for current selected presenter"
| text |
(selectedPresenter notNil and: [ selectedPresenter model notNil ]) ifTrue: [
(selectedPresenter isNotNil and: [ selectedPresenter model isNotNil ]) ifTrue: [
newPresenters
detect: [ :each | each model value = selectedPresenter model value ]
ifFound: [ :aPresenter | ^ aPresenter ] ].
Expand Down
2 changes: 1 addition & 1 deletion src/NewTools-Spotter/ToolShortcutsCategory.extension.st
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ ToolShortcutsCategory >> openSpotter [
^ KMKeymap shortcut: Character cr shift action: [ :target |
| selection |
selection := target selection.
(self tools spotter insertsSelection and: [ selection notNil ])
(self tools spotter insertsSelection and: [ selection isNotNil ])
ifTrue: [ self tools spotter openWithText: selection ]
ifFalse: [ self tools spotter open ] ]
]

0 comments on commit 43a415d

Please sign in to comment.