-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix placement of extension methods when grouping by package.
- Loading branch information
1 parent
3607388
commit 5ab737d
Showing
9 changed files
with
142 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
35 changes: 35 additions & 0 deletions
35
src/GToolkit4Epicea/GtEpiceaMethodInPackageHistory.class.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,40 @@ | ||
Class { | ||
#name : #GtEpiceaMethodInPackageHistory, | ||
#superclass : #GtEpiceaMethodHistory, | ||
#instVars : [ | ||
'targetPackageName' | ||
], | ||
#category : #'GToolkit4Epicea-History' | ||
} | ||
|
||
{ #category : #accessing } | ||
GtEpiceaMethodInPackageHistory >> isInitialChangeAddition [ | ||
| epEvent | | ||
|
||
epEvent := self initialChange content. | ||
^ super isInitialChangeAddition or: [ | ||
(epEvent class = EpMethodModification and: [ | ||
epEvent gtIsProtocolChangeForExtensionMethod and: [ | ||
epEvent gtAffectedPackageName = self targetPackageName ] ]) ] | ||
] | ||
|
||
{ #category : #accessing } | ||
GtEpiceaMethodInPackageHistory >> isLatestChangeRemoval [ | ||
| epEvent | | ||
|
||
epEvent := self latestChange content. | ||
^ super isLatestChangeRemoval or: [ | ||
(epEvent class = EpMethodModification and: [ | ||
epEvent gtIsProtocolChangeForExtensionMethod and: [ | ||
epEvent gtPreviousPackageName = self targetPackageName ] ]) ] | ||
] | ||
|
||
{ #category : #accessing } | ||
GtEpiceaMethodInPackageHistory >> targetPackageName [ | ||
^ targetPackageName | ||
] | ||
|
||
{ #category : #accessing } | ||
GtEpiceaMethodInPackageHistory >> targetPackageName: aPackageName [ | ||
targetPackageName := aPackageName | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
19 changes: 19 additions & 0 deletions
19
src/GToolkit4Epicea/TGtEpMethodModificationClassPackagename.trait.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
Trait { | ||
#name : #TGtEpMethodModificationClassPackagename, | ||
#instVars : [ | ||
'classPackageName' | ||
], | ||
#category : #'GToolkit4Epicea-Model' | ||
} | ||
|
||
{ #category : #accessing } | ||
TGtEpMethodModificationClassPackagename >> classPackageName [ | ||
^ classPackageName | ||
] | ||
|
||
{ #category : #accessing } | ||
TGtEpMethodModificationClassPackagename >> updateClassPackageName [ | ||
self newMethod realParent | ||
ifNotNil: [ :aParent | | ||
classPackageName := aParent package name ] | ||
] |