Skip to content

Commit

Permalink
Fixes remove package
Browse files Browse the repository at this point in the history
  • Loading branch information
carolahp committed Nov 9, 2023
1 parent b9b73bd commit 91b8172
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/NewTools-Scopes/ScopesManager.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ ScopesManager class >> invalidNames [
ScopesManager class >> newScopeFrom: aSet [

| packageScope classScope classes packages orphanClasses fullPackages |

classes := (aSet select: [ :each | each isClassOrTrait ]) reject: [
:each | each isMeta ].
packages := aSet select: [ :each | each isKindOf: RPackage ].
Expand Down Expand Up @@ -220,7 +221,7 @@ ScopesManager >> defaultScopeLabel [
ScopesManager >> editScope: aScope withNodes: aCollection [

| classesInScope packagesInScope classes packages fullPackages orphanClasses addedClasses removedClasses addedPackages removedPackages fullPackagesInScope orphanClassesInScope |

self halt.
classesInScope := aScope classes reject: [ :each | each isMeta ].
packagesInScope := aScope packages.

Expand All @@ -235,7 +236,7 @@ ScopesManager >> editScope: aScope withNodes: aCollection [
orphanClasses := self orphanClassesIn: classes havingFullPackages: fullPackages.

addedClasses := orphanClasses reject: [ :aClass | classesInScope includes: aClass ].
removedClasses := classesInScope reject: [ :aClass | orphanClasses includes: aClass ].
removedClasses := orphanClassesInScope reject: [ :aClass | orphanClasses includes: aClass ].

addedPackages := fullPackages reject: [ :aPackage | fullPackagesInScope includes: aPackage ].
removedPackages := fullPackagesInScope reject: [ :aPackage | fullPackages includes: aPackage ].
Expand All @@ -245,7 +246,7 @@ ScopesManager >> editScope: aScope withNodes: aCollection [

addedPackages do: [ :aPackage | aScope addPackage: aPackage ].
removedPackages do: [ :aPackage |
aScope removePackage: aPackage name ].
aScope removePackage: aPackage ].

^ aScope
]
Expand Down

0 comments on commit 91b8172

Please sign in to comment.