Skip to content

Commit

Permalink
check for nils
Browse files Browse the repository at this point in the history
  • Loading branch information
estebanlm committed May 13, 2020
1 parent 8e3140e commit 88fb30d
Showing 1 changed file with 17 additions and 17 deletions.
34 changes: 17 additions & 17 deletions src/EnlumineurFormatterUI/EFSettingPreviewer2.class.st
Expand Up @@ -287,32 +287,32 @@ EFSettingPreviewer2 >> actionChooseMethodUI [
EFSettingPreviewer2 >> actionMethodDropList [
methodDropList
transmitTo: notFormatedTextPresenter
transform: [ :method | method sourceCode ].
transform: [ :method | method ifNotNil: [ method sourceCode ] ].
methodDropList
transmitTo: formatedTextPresenter
transform: [ :item | self formatPrettyPrint ]
]

{ #category : #'initialization-actions' }
EFSettingPreviewer2 >> actionRemoveMethodButton [
removeMethodButton
action: [ methodDropList selectedItem removeFromSystem ]

removeMethodButton action: [
methodDropList selectedItem removeFromSystem ]
]

{ #category : #'initialization-actions' }
EFSettingPreviewer2 >> actionRemoveSettingButton [
removeSettingButton
action: [ isSettingModification := true.
settingsDropList selectedItem
ifNil: [ self inform: 'please select a confguration' ]
ifNotNil: [ :selectedItem |
selectedItem removeFromSystem.
settingsDropList selectIndex: 1.
settingsDropList
items:
(settingsDropList listItems
remove: selectedItem;
yourself) ].

removeSettingButton action: [
isSettingModification := true.
settingsDropList selectedItem
ifNil: [ self inform: 'please select a confguration' ]
ifNotNil: [ :selectedItem |
selectedItem removeFromSystem.
settingsDropList selectIndex: 1.
settingsDropList items: (settingsDropList listItems
remove: selectedItem;
yourself) ].
isSettingModification := false ]
]

Expand Down Expand Up @@ -353,8 +353,8 @@ EFSettingPreviewer2 >> foo [

{ #category : #'initialization widgets' }
EFSettingPreviewer2 >> formatPrettyPrint [
methodDropList selectedItem
ifNil: [ ^ self ].

methodDropList selectedItem ifNil: [ ^ self ].
^ formaterPrettyPrinter format: methodDropList selectedItem ast
]

Expand Down

0 comments on commit 88fb30d

Please sign in to comment.