Skip to content

Commit

Permalink
Merge branch 'Pharo12' into 452-In-the-debugger-create-subclass-respo…
Browse files Browse the repository at this point in the history
…nsibility-button-does-not-offers-the-possibility-to-create-the-responsibility-in-subclasses-of-the-receiver-but-in-the-exception-class-SubclassResponsibility-but-only-after-performing-steps-
  • Loading branch information
adri09070 authored Oct 6, 2023
2 parents 42fa47d + 44c941f commit 0c12b78
Show file tree
Hide file tree
Showing 317 changed files with 7,755 additions and 6,282 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/newtools-all.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ env:

on:
push:
branches: [ Pharo11 ]
branches: [ Pharo12 ]
pull_request:
branches: [ Pharo11 ]
branches: [ Pharo12 ]

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
Expand All @@ -19,15 +19,15 @@ jobs:
strategy:
matrix:
os: [ ubuntu-latest ]
smalltalk: [ Pharo64-11 ]
smalltalk: [ Pharo64-12 ]
runs-on: ${{ matrix.os }}
name: ${{ matrix.smalltalk }} on ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Setup smalltalkCI
uses: hpi-swa/setup-smalltalkCI@v1
with:
smalltalk-version: ${{ matrix.smalltalk }}
smalltalk-image: ${{ matrix.smalltalk }}
- name: Load Image and Run Release Tests
run: smalltalkci -s ${{ matrix.smalltalk }} .smalltalk.release.ston
timeout-minutes: 10
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/newtools.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ env:

on:
push:
branches: [ Pharo11, dev-1.0 ]
branches: [ Pharo12, dev-1.0 ]
pull_request:
branches: [ Pharo11, dev-1.0 ]
branches: [ Pharo12, dev-1.0 ]

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
Expand All @@ -19,15 +19,15 @@ jobs:
strategy:
matrix:
os: [ ubuntu-latest ]
smalltalk: [ Pharo64-11 ]
smalltalk: [ Pharo64-12 ]
runs-on: ${{ matrix.os }}
name: ${{ matrix.smalltalk }} on ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Setup smalltalkCI
uses: hpi-swa/setup-smalltalkCI@v1
with:
smalltalk-version: ${{ matrix.smalltalk }}
smalltalk-image: ${{ matrix.smalltalk }}
- name: Load Image and Run Tests
run: smalltalkci -s ${{ matrix.smalltalk }} .smalltalk.ston
timeout-minutes: 15
Expand Down
2 changes: 1 addition & 1 deletion src/BaselineOfNewTools/BaselineOfNewTools.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,6 @@ BaselineOfNewTools >> sindarin: spec [
spec baseline: 'Sindarin' with: [
spec
repository: (self packageRepositoryURL
ifEmpty: [ 'github://pharo-spec/ScriptableDebugger:Pharo-11' ]);
ifEmpty: [ 'github://pharo-spec/ScriptableDebugger:Pharo12/src' ]);
loads: 'default' ]
]
23 changes: 16 additions & 7 deletions src/NewTools-ChangeSorter/ChangeSorterModel.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ A ChangeSorterModel is a model used by Change Sorter UIs for computation
"
Class {
#name : #ChangeSorterModel,
#superclass : #AbstractTool,
#superclass : #Model,
#classVars : [
'ClassDescriptionsMap'
],
Expand Down Expand Up @@ -50,6 +50,17 @@ ChangeSorterModel >> allChanges [
^ ChangeSet allChangeSets reverse
]

{ #category : #method }
ChangeSorterModel >> browseVersionsFrom: aMethod [
"Create and schedule a Versions Browser, showing all versions of the
currently selected message. Answer the browser or nil."

aMethod selector
ifNil: [ self inform: 'Sorry, only actual methods have retrievable versions.'. ^nil ]
ifNotNil: [:selector |
Smalltalk tools versionBrowser browseVersionsForMethod: aMethod ]
]

{ #category : #text }
ChangeSorterModel >> buildChangeSetDescriptionFor: changeSet [

Expand Down Expand Up @@ -173,7 +184,7 @@ ChangeSorterModel >> forgetSelector: selector inClass: aClass fromChangeSet: aCh
ChangeSorterModel >> removeChangeSet: aChangeSet prompting: doPrompt [
"Completely destroy my change set. Check if it's OK first, and if doPrompt is true, get the user to confirm his intentions first."

| message aName changeSetNumber msg |
| message aName msg |
aName := aChangeSet name.
aChangeSet okayToRemove ifFalse: [^ self]. "forms current changes for some project"
(aChangeSet isEmpty or: [doPrompt not]) ifFalse:
Expand Down Expand Up @@ -204,8 +215,6 @@ lost if you destroy the change set.
Do you really want to go ahead with this?') ifFalse: [^ self]]].

"Go ahead and remove the change set"
changeSetNumber := aChangeSet name initialIntegerOrNil.
changeSetNumber ifNotNil: [SystemVersion current unregisterUpdate: changeSetNumber].
ChangeSet removeChangeSet: aChangeSet.
]

Expand Down Expand Up @@ -254,13 +263,13 @@ ChangeSorterModel >> setContentsOfChangeSet: changeSet forClass: class andSelect
ifNil: [
"Only the change set is currently selected"
^ self buildChangeSetDescriptionFor: changeSet ].
selector
^ selector
ifNil: [
"class is selected but not the selector"
^ self buildClassDescriptionFor: changeSet class: class ]
self buildClassDescriptionFor: changeSet class: class ]
ifNotNil: [
"a class and a selector are selected"
^ self buildSelectorDescriptionFor: changeSet class: class selector: selector ]
self buildSelectorDescriptionFor: changeSet class: class selector: selector ]
]

{ #category : #'change set' }
Expand Down
56 changes: 31 additions & 25 deletions src/NewTools-ChangeSorter/SpChangeSorterPresenter.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -50,23 +50,26 @@ SpChangeSorterPresenter class >> title [
SpChangeSorterPresenter >> addPreamble [
self selectedChangeSet ifNil: [ ^ self inform: 'No change set selected' ].
self model addPreambleTo: self selectedChangeSet.
changesListPresenter setSelectedItem: self selectedChangeSet
changesListPresenter selectItem: self selectedChangeSet
]

{ #category : #'menu - change set' }
SpChangeSorterPresenter >> browseChangeSet [
"Open a message list browser on methods in the current change set"

| messages |
self selectedChangeSet ifNil: [ ^ self inform: 'No change set selected' ].
messages := self selectedChangeSet changedMessageList select: [ :each | each isValid ].
self application tools messageList browse: messages title: 'Methods in Change Set ' , self selectedChangeSet name
self selectedChangeSet ifNil: [
^ self inform: 'No change set selected' ].
messages := self selectedChangeSet changedMessageList select: [ :each |
each isValid ].
self application tools messageList
browse: messages
title: 'Methods in Change Set ' , self selectedChangeSet name
]

{ #category : #'menu - message' }
SpChangeSorterPresenter >> browseImplementorsOfMessages [

self model browseMessagesFrom: self selectedSelector
SystemNavigation new browseAllImplementorsOf: self selectedSelector
]

{ #category : #'menu - message' }
Expand All @@ -80,7 +83,7 @@ SpChangeSorterPresenter >> browseMethodFull [
{ #category : #'menu - message' }
SpChangeSorterPresenter >> browseSendersOfMessages [

self model browseSendersOfMessagesFrom: self selectedSelector
self systemNavigation browseAllSendersOf: self selectedSelector
]

{ #category : #'menu - message' }
Expand Down Expand Up @@ -338,7 +341,7 @@ SpChangeSorterPresenter >> findChangeSet [

| set |
set := self model findChangeSetIn: self changeSets.
changesListPresenter setSelectedItem: set
changesListPresenter selectItem: set
]

{ #category : #private }
Expand All @@ -347,7 +350,7 @@ SpChangeSorterPresenter >> forceChangesListRefresh [
| sel |
sel := self selectedChangeSet.
changesListPresenter items: self model allChanges.
changesListPresenter setSelectedItem: sel
changesListPresenter selectItem: sel
]

{ #category : #'menu - class' }
Expand Down Expand Up @@ -389,11 +392,9 @@ SpChangeSorterPresenter >> initialize [
{ #category : #initialization }
SpChangeSorterPresenter >> initializeAnnouncements [

SystemAnnouncer uniqueInstance weak
when:
ClassAdded , ClassCommented , ClassRecategorized , ClassModifiedClassDefinition , ClassRemoved , ClassRenamed
, ClassReorganized , MethodAdded , MethodModified , MethodRecategorized , MethodRemoved , ProtocolAdded
, ProtocolRemoved
SystemAnnouncer uniqueInstance weak
when: ClassAdded , ClassCommented , ClassRecategorized , ClassModifiedClassDefinition , ClassRemoved , ClassRenamed , MethodAdded , MethodModified
, MethodRecategorized , MethodRemoved , ProtocolAnnouncement
send: #updateClassesList
to: self
]
Expand Down Expand Up @@ -520,7 +521,7 @@ SpChangeSorterPresenter >> newSet [
aSet := self model createNewSet.
aSet
ifNotNil: [ self updateChangesList.
changesListPresenter setSelectedItem: aSet.
changesListPresenter selectItem: aSet.
self updateWindowTitle ]
]

Expand Down Expand Up @@ -616,7 +617,7 @@ SpChangeSorterPresenter >> remove [
SpChangeSorterPresenter >> removeClass [
"Remove the selected class from the system, at interactive user request. Make certain the user really wants to do this, since it is not reversible. Answer true if removal actually happened."

(self model removeClass: self selectedClass)
(SystemNavigation new removeClass: self selectedClass)
ifTrue: [ self setSelectedChangeSet: self selectedChangeSet ]
]

Expand All @@ -631,7 +632,7 @@ SpChangeSorterPresenter >> removeMessage [
class := self selectedClass.
(class includesSelector: selector) ifFalse:[^ self].
method := class>>selector.
(self model removeMethod: method inClass: class)
(SystemNavigation new removeMethod: method inClass: class)
ifTrue: [ self updateMessagesList ]]
]

Expand All @@ -640,7 +641,7 @@ SpChangeSorterPresenter >> removePostscript [

self selectedChangeSet ifNil: [ ^ self inform: 'No change set selected' ].
self model removePostscriptFrom: self selectedChangeSet.
changesListPresenter setSelectedItem: self selectedChangeSet
changesListPresenter selectItem: self selectedChangeSet
]

{ #category : #'menu - change set' }
Expand All @@ -649,7 +650,7 @@ SpChangeSorterPresenter >> removePreamble [
self selectedChangeSet ifNil: [ ^ self inform: 'No change set selected' ].
self selectedChangeSet hasPreamble ifFalse: [ ^ self inform: 'Change set has no preamble' ].
self selectedChangeSet removePreamble.
changesListPresenter setSelectedItem: self selectedChangeSet
changesListPresenter selectItem: self selectedChangeSet
]

{ #category : #'menu - change set' }
Expand All @@ -660,7 +661,7 @@ SpChangeSorterPresenter >> rename [

changesListPresenter
updateList;
setSelectedItem: set.
selectItem: set.
self updateWindowTitle
]

Expand Down Expand Up @@ -726,19 +727,19 @@ SpChangeSorterPresenter >> setSelectedChangeSet: aChangeSet [
{ #category : #api }
SpChangeSorterPresenter >> setSelectedChangeSetIndex: anIndex [

^ changesListPresenter setSelectedIndex: anIndex
^ changesListPresenter selectIndex: anIndex
]

{ #category : #api }
SpChangeSorterPresenter >> setSelectedClass: aClass [

^ classesListPresenter setSelectedItem: aClass
^ classesListPresenter selectItem: aClass
]

{ #category : #api }
SpChangeSorterPresenter >> setSelectedClassIndex: anIndex [

^ classesListPresenter setSelectedIndex: anIndex
^ classesListPresenter selectIndex: anIndex
]

{ #category : #accessing }
Expand Down Expand Up @@ -780,7 +781,7 @@ SpChangeSorterPresenter >> updateClassesListAndMessagesList [
| sel |
sel := methodsListPresenter selectedItem.
self updateClassesList.
methodsListPresenter setSelectedItem: sel.
methodsListPresenter selectItem: sel.
self updateMessagesList
]

Expand All @@ -794,7 +795,7 @@ SpChangeSorterPresenter >> updateMessagesList [
ifNil: [ methodsListPresenter items: {} ]
ifNotNil: [:class | methodsListPresenter items: (self selectedChangeSet selectorsInClass: class name) sort].

methodsListPresenter setSelectedItem: sel
methodsListPresenter selectItem: sel
]

{ #category : #private }
Expand All @@ -809,6 +810,11 @@ SpChangeSorterPresenter >> updateTextContents [
textPresenter text: text
]

{ #category : #'private - updating' }
SpChangeSorterPresenter >> updateTitle [
self withWindowDo: [ :window | window title: self title ]
]

{ #category : #api }
SpChangeSorterPresenter >> updateWindowTitle [

Expand Down
Loading

0 comments on commit 0c12b78

Please sign in to comment.