The Trunk: System-dtl.249.mcz

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

The Trunk: System-dtl.249.mcz

commits-2
David T. Lewis uploaded a new version of System to project The Trunk:
http://source.squeak.org/trunk/System-dtl.249.mcz

==================== Summary ====================

Name: System-dtl.249
Author: dtl
Time: 12 February 2010, 12:04:43.651 am
UUID: 38875405-8fe8-4874-9f68-dc48062cac14
Ancestors: System-jcg.248

Eliminate explicit references to MVC and Morphic classes in Preferences class>>setWindowTitleFontTo:
Remove explicit MVC dependencies from SystemDictionary>>discardMVC.

=============== Diff against System-jcg.248 ===============

Item was changed:
  ----- Method: Preferences class>>setWindowTitleFontTo: (in category 'fonts') -----
  setWindowTitleFontTo: aFont
  "Set the window-title font to be as indicated"
 
  Parameters at: #windowTitleFont put: aFont.
+ (Smalltalk hasClassNamed: #StandardSystemView)
+ ifTrue: [(Smalltalk at: #StandardSystemView) setLabelStyle].
+ (Smalltalk hasClassNamed: #Flaps)
+ ifTrue: [(Smalltalk at: #Flaps) replaceToolsFlap]
+ !
- StandardSystemView setLabelStyle.
- Flaps replaceToolsFlap!

Item was changed:
  ----- Method: SystemDictionary>>discardMVC (in category 'shrinking') -----
  discardMVC
  "After suitable checks, strip out much of MVC from the system"
  "Smalltalk discardMVC"
  | keepers |
+ self flag: #bob. "zapping projects"
- self flag: #bob.
- "zapping projects"
  self isMorphic
+ ifFalse: [^self inform: 'You must be in a Morphic project to discard MVC.'].
- ifFalse: [self inform: 'You must be in a Morphic project to discard MVC.'.
- ^ self].
  "Check that there are no MVC Projects"
+ (Project allProjects allSatisfy: [:proj | proj isMorphic])
- (Project allProjects
- allSatisfy: [:proj | proj isMorphic])
  ifFalse: [(self confirm: 'Would you like a chance to remove your
  MVC projects in an orderly manner?')
  ifTrue: [^ self].
  (self confirm: 'If you wish, I can remove all MVC projects,
  make this project be the top project, and place
  all orphaned sub-projects of MVC parents here.
  Would you like be to do this
  and proceed to discard all MVC classes?')
  ifTrue: [self zapMVCprojects]
  ifFalse: [^ self]].
  self reclaimDependents.
  "Remove old Paragraph classes and View classes."
+ self at: #Paragraph ifPresent: [:paraClass |
+ (ChangeSet superclassOrder: paraClass withAllSubclasses asArray)
+ reverseDo: [:c | c removeFromSystem]].
+ self at: #View ifPresent: [:viewClass |
+ (ChangeSet superclassOrder: viewClass withAllSubclasses asArray)
+ reverseDo: [:c | c removeFromSystem]].
- self
- at: #Paragraph
- ifPresent: [:paraClass | (ChangeSet superclassOrder: paraClass withAllSubclasses asArray)
- reverseDo: [:c | c removeFromSystem]].
- self
- at: #View
- ifPresent: [:viewClass | (ChangeSet superclassOrder: viewClass withAllSubclasses asArray)
- reverseDo: [:c | c removeFromSystem]].
  "Get rid of ParagraphEditor's ScrollController dependence"
+ self at: #ParagraphEditor ifPresent: [:paragraphEditor |
- (Smalltalk at: #ParagraphEditor) ifNotNilDo: [:paragraphEditor |
  #(#markerDelta #viewDelta #scrollAmount #scrollBar #computeMarkerRegion )
  do: [:sel | paragraphEditor removeSelector: sel].
  paragraphEditor compile: 'updateMarker'.
  "Reshape to MouseMenuController"
+ Compiler evaluate: (paragraphEditor definition copyReplaceAll: 'ScrollController' with: 'MouseMenuController')].
+ "Get rid of all Controller classes not needed by ParagraphEditor and ScreenController"
+ self at: #ScreenController ifPresent: [:screenController |
+ keepers := TextMorphEditor withAllSuperclasses copyWith: screenController].
+ self at: #Controller ifPresent: [:controller |
+ (ChangeSet superclassOrder: controller withAllSubclasses asArray)
+ reverseDo: [:c | (keepers includes: c)
+ ifFalse: [c removeFromSystem]]].
- Compiler
- evaluate: (paragraphEditor definition copyReplaceAll: 'ScrollController' with: 'MouseMenuController')].
- "Get rid of all Controller classes not needed by
- ParagraphEditor and ScreenController"
- keepers := TextMorphEditor withAllSuperclasses copyWith: ScreenController.
- (ChangeSet superclassOrder: Controller withAllSubclasses asArray)
- reverseDo: [:c | (keepers includes: c)
- ifFalse: [c removeFromSystem]].
  SystemOrganization removeCategoriesMatching: 'ST80-Paths'.
  SystemOrganization removeCategoriesMatching: 'ST80-Symbols'.
  SystemOrganization removeCategoriesMatching: 'ST80-Pluggable Views'.
  self removeClassNamed: 'FormButtonCache'.
  self removeClassNamed: 'WindowingTransformation'.
  self removeClassNamed: 'ControlManager'.
  self removeClassNamed: 'DisplayTextView'.
  ScheduledControllers := nil.
  Undeclared removeUnreferencedKeys.
  SystemOrganization removeEmptyCategories.
  Symbol rehash!