[Pkg] SystemEditor: SystemEditor-mtf.132.mcz

squeak-dev-noreply at lists.squeakfoundation.org squeak-dev-noreply at lists.squeakfoundation.org
Sat Oct 11 05:40:39 UTC 2008


A new version of SystemEditor was added to project SystemEditor:
http://www.squeaksource.com/SystemEditor/SystemEditor-mtf.132.mcz

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

Name: SystemEditor-mtf.132
Author: mtf
Time: 10 October 2008, 10:41:32 pm
UUID: 099c03b4-c8b8-42fa-996b-b5042619dba1
Ancestors: SystemEditor-mtf.131

Removed OldMetaclassEditor. 

=============== Diff against SystemEditor-mtf.131 ===============

Item was changed:
  ----- Method: ClassEditor class>>classMetaclassEditor (in category 'instance creation') -----
  classMetaclassEditor
  "Answer the class of editors for my instances' cooresponding metaclass editor"
  
+ 	^ MetaclassEditor!
- 	^ OldMetaclassEditor!

Item was added:
+ ----- Method: MetaclassEditor>>superclass:methodDictionary:format: (in category 'behavior') -----
+ superclass: aClass methodDictionary: mDict format: fmt
+ 	"Basic initialization of the receiver.
+ 	Must only be sent to a new instance; else we would need Object flushCache."
+ 	superclass := aClass.
+ 	format := fmt.
+ 	methodDict := mDict.!

Item was changed:
+ ----- Method: MetaclassEditor>>new (in category 'behavior') -----
- ----- Method: MetaclassEditor>>new (in category 'metaclass') -----
  new
  	^ editor := self basicNew!

Item was added:
+ ----- Method: MetaclassEditor>>basicNew (in category 'behavior') -----
+ basicNew
+ 	"Primitive. Answer an instance of the receiver (which is a class) with no 
+ 	indexable variables. Fail if the class is indexable. Essential. See Object 
+ 	documentation whatIsAPrimitive."
+ 
+ 	<primitive: 70>
+ 	"space must be low"
+ 	self environment signalLowSpace.
+ 	^ self basicNew  "retry if user proceeds"
+ !

Item was removed:
- ----- Method: OldMetaclassEditor>>subject (in category 'accessing') -----
- subject
- 	^ editor subject ifNotNilDo: [:subject | subject class]!

Item was removed:
- ----- Method: OldMetaclassEditor>>methods (in category 'accessing') -----
- methods
- 	^ methods ifNil: [methods := MethodDictionaryEditor for: self]!

Item was removed:
- ----- Method: OldMetaclassEditor>>theNonMetaClass (in category 'reflecting') -----
- theNonMetaClass
- 	^ editor!

Item was removed:
- OldMetaclassEditor subclass: #OldRootMetaclassEditor
- 	instanceVariableNames: ''
- 	classVariableNames: ''
- 	poolDictionaries: ''
- 	category: 'SystemEditor-Editors'!

Item was removed:
- ----- Method: OldRootMetaclassEditor class>>classClassEditor (in category 'instance creation') -----
- classClassEditor
- 	^ RootClassEditor!

Item was removed:
- ----- Method: OldRootMetaclassEditor>>product (in category 'building') -----
- product
- 	^ nil!

Item was removed:
- ----- Method: OldMetaclassEditor>>superclass: (in category 'editing') -----
- superclass: aClass 
- 	superEditor := self system edEditorFor: aClass!

Item was removed:
- ----- Method: OldMetaclassEditor>>compile:classified:withStamp:notifying:logSource: (in category 'editing') -----
- compile: source classified: category withStamp: aString notifying: anObject logSource: aBoolean
- 	| cm |
- 	cm := MethodEditor
- 			source: source
- 			classified: category
- 			stamp: aString
- 			notifying: anObject
- 			logging: aBoolean.
- 	self methods add: cm.!

Item was removed:
- ----- Method: OldMetaclassEditor>>edMethodAt:ifAbsent: (in category 'editing') -----
- edMethodAt: aSelector ifAbsent: aBlock
- 	^ self methods at: aSelector ifAbsent: aBlock!

Item was removed:
- ----- Method: OldMetaclassEditor>>instVarNames (in category 'reflecting') -----
- instVarNames
- 	"Override the implemenation in Behavior. That will return the inst vars of 
- 	ClassEditor, but we want the inst vars of the subject's class."
- 
- 	self isDebuggingAsEditor ifTrue: [^ super instVarNames].
- 	^ instVarNames ifNil: [self subject instVarNames]!

Item was removed:
- ----- Method: OldMetaclassEditor class>>new (in category 'instance creation') -----
- new
- 	| instance |
- 	instance := self basicNew.
- 	instance
- 		superclass: self classClassEditor
- 		methodDictionary: MethodDictionary new
- 		format: self classClassEditor format.
- 	^ instance!

Item was removed:
- ----- Method: OldMetaclassEditor>>instSize (in category 'reflecting') -----
- instSize
- 	"Override the implemenation in Behavior, so that when inspecting the
- 	ClassEditor, it will look like a regular Class"
- 
- 	self isDebuggingAsEditor ifTrue: [^ super instSize].
- 	^ self instVarNames size + self superclassOrEditor instSize!

Item was removed:
- ----- Method: OldMetaclassEditor>>classSide (in category 'reflecting') -----
- classSide
- 	^self theMetaClass!

Item was removed:
- ----- Method: OldMetaclassEditor>>instanceVariableNames: (in category 'reflecting') -----
- instanceVariableNames: instString
- 	instVarNames := Scanner new scanFieldNames: instString!

Item was removed:
- ----- Method: OldMetaclassEditor>>format (in category 'reflecting') -----
- format
- "Override the implemenation in Behavior. That will return the format of ClassEditor, but we want the format of the subject's meta class"
- 
- 	^ self edClassFormat bits!

Item was removed:
- ----- Method: OldRootMetaclassEditor class>>canEdit:for: (in category 'instance creation') -----
- canEdit: anObject for: anEditor
- 	^ false!

Item was removed:
- ----- Method: OldMetaclassEditor>>definition (in category 'reflecting') -----
- definition
- 	^ self definitionST80!

Item was removed:
- ----- Method: OldMetaclassEditor>>compile:classified:withStamp:notifying: (in category 'editing') -----
- compile: source classified: cat withStamp: aString notifying: anObject
- 	^ self 
- 		compile: source
- 		classified: cat
- 		withStamp: aString
- 		notifying: anObject
- 		logSource: self acceptsLoggingOfCompilation !

Item was removed:
- ----- Method: OldMetaclassEditor>>isUniClass (in category 'reflecting') -----
- isUniClass
- 	"The debugger sometimes sends this message"
- 	^ false!

Item was removed:
- ----- Method: OldMetaclassEditor>>acceptsLoggingOfCompilation (in category 'reflecting') -----
- acceptsLoggingOfCompilation
- 
- 	^ self instanceSide acceptsLoggingOfCompilation!

Item was removed:
- ----- Method: OldMetaclassEditor>>superclass (in category 'reflecting') -----
- superclass
- "Answers the editor on my new superclass, creating it if necessary"
- 
- 	^ self environment edEditorFor: self superclassOrEditor!

Item was removed:
- ----- Method: OldMetaclassEditor>>isDebuggingAsEditor (in category 'debugging') -----
- isDebuggingAsEditor
- 	"To be transparent enough to fool most existing software,
- 	MetaclassEditors must answer their subject's instance variables when
- 	sent the message allInstVarNames. However, this message is also used by
- 	the debugger, inspector, and explorer, when inspecting ClassEditors, and
- 	an inspector should see the real instance variables of ClassEditor rather
- 	than those of the MetaclassEditor's subject. So there is a conflict of
- 	interest already.
- 	
- 	But it gets worse. If you do open an inspector on an object that is
- 	reporting wrong information about it's instance variables, Bad things
- 	happen. Specifically, the inspector calls instVarAt: on an instance
- 	variable that does not exist, leading to an error every time the display
- 	is updated. Less severe, instVarAt: will answer nonsensical. 
- 	
- 	So I took the instance variable proxying behavior all the way so that it
- 	successfully fools the debugger, inspector, and explorer into seeing
- 	proxied instance variables (see the senders af this message if you want
- 	to know how). But there is still the original problem that you, the
- 	programmer want to see the real state of ClassEditor. That is where this
- 	method comes in.
- 	
- 	If this method returns false, everybody sees the proxied instance
- 	variables. This is the correct behavior. If this method returns false,
- 	everyone sees the true instance variables of ClassEditor. This is
- 	incorrect behavior, and breaks the Unit tests, but it is invaluable if
- 	you are debugging ClassEditor"
- 
- 	^ self environment debug!

Item was removed:
- ----- Method: OldMetaclassEditor>>removeSelector: (in category 'editing') -----
- removeSelector: aSymbol 
- 	methods ifNil: [methods := MethodDictionaryEditor for: self].
- 	methods remove: aSymbol.!

Item was removed:
- ----- Method: OldMetaclassEditor>>lookupSelector: (in category 'metaclass') -----
- lookupSelector: aSelector
- 	
- 	"Override the implementation in Behavior to make ClassEditor
- 	debuggable. The debugger calls this during simulated execution,
- 	and since we override #includesSelector and #superclass to 
- 	reflect on the subject, we get incorrect method dispatch."
- 
- 	| lookupClass dict |
- 	lookupClass := self.
- 	[lookupClass == nil] whileFalse: 
- 		[dict := lookupClass instVarAt: 2.
- 		(dict includesKey: aSelector)
- 			ifTrue: [^ dict at: aSelector].
- 		lookupClass := lookupClass instVarAt: 1].
- 	^ nil!

Item was removed:
- ----- Method: OldMetaclassEditor>>edRequiresSubclassRebuild (in category 'building') -----
- edRequiresSubclassRebuild
- 	^ self subject
- 		ifNotNilDo: [:subject | subject format ~= self format]
- 		ifNil: [false]!

Item was removed:
- ----- Method: OldMetaclassEditor>>hasComment (in category 'reflecting') -----
- hasComment
- 	^ self instanceSide hasComment!

Item was removed:
- ----- Method: OldMetaclassEditor>>compile:classified:notifying: (in category 'editing') -----
- compile: source classified: cat notifying: anObject
- 	^ self 
- 		compile: source
- 		classified: cat
- 		withStamp: Utilities changeStamp
- 		notifying: anObject
- 		logSource: self acceptsLoggingOfCompilation !

Item was removed:
- ----- Method: OldMetaclassEditor>>instanceVariablesString (in category 'reflecting') -----
- instanceVariablesString
- 	^ String streamContents: 
- 		[:stream | 
- 		self allInstVarNames
- 			do: [:ea | stream nextPutAll: ea]
- 			separatedBy: [stream nextPut: $ ]]!

Item was removed:
- ----- Method: OldRootMetaclassEditor>>allSuperclasses (in category 'reflecting') -----
- allSuperclasses
- 	^ OrderedCollection new!

Item was removed:
- ----- Method: OldRootMetaclassEditor>>subject (in category 'accessing') -----
- subject
- 	^ nil!

Item was removed:
- ----- Method: OldMetaclassEditor>>allInstVarNames (in category 'reflecting') -----
- allInstVarNames
- 	 "specialized in order to enable debugger to show as self"
- 	
- 	self isDebuggingAsEditor ifTrue: [^ super allInstVarNames].
- 	^ self edSuperclass
- 		ifNil: [self instVarNames copy]
- 		ifNotNil: [self edSuperclass allInstVarNames, self instVarNames]!

Item was removed:
- ----- Method: OldMetaclassEditor>>edSuperclass (in category 'building') -----
- edSuperclass
- "Answer my product's superclass, building it if necessary"
- 
- 	| classOrEditor |
- 	classOrEditor :=  self superclassOrEditor.
- 	^ classOrEditor edIsEditor
- 		ifTrue: [classOrEditor product]
- 		ifFalse: [classOrEditor]!

Item was removed:
- ----- Method: OldMetaclassEditor>>isMethodsChanged (in category 'testing') -----
- isMethodsChanged
- 	methods ifNil: [^ false].
- 	^ methods isChanged!

Item was removed:
- ----- Method: OldMetaclassEditor>>typeOfClass (in category 'reflecting') -----
- typeOfClass
- 	^ #normal!

Item was removed:
- Behavior subclass: #OldMetaclassEditor
- 	instanceVariableNames: 'editor superEditor instVarNames methods organization traitComposition'
- 	classVariableNames: ''
- 	poolDictionaries: ''
- 	category: 'SystemEditor-Editors'!

Item was removed:
- ----- Method: OldMetaclassEditor>>superclassOrEditor (in category 'accessing') -----
- superclassOrEditor
- "Answer my superclass as an editor if it is being edited, or as a class if it is not. Does not add anything to my SystemEditor"
- 
- 	superEditor ifNotNil: [^ superEditor].
- 	self subject superclass ifNil: [^ self class classRootEditor on: nil for: self environment].
- 	^ self environment classOrEditorFor: self subject superclass!

Item was removed:
- ----- Method: OldRootMetaclassEditor>>ultimateSourceCodeAt:ifAbsent: (in category 'reflecting') -----
- ultimateSourceCodeAt: selector ifAbsent: aBlock
- "Return the source code at selector, deferring to superclass if necessary"
- 
- 	^ aBlock value!

Item was removed:
- ----- Method: OldMetaclassEditor>>edIsEditor (in category 'testing') -----
- edIsEditor
- 	^ true!

Item was removed:
- ----- Method: OldRootMetaclassEditor>>allInstVarNames (in category 'reflecting') -----
- allInstVarNames
- 	^ #()!

Item was removed:
- ----- Method: OldMetaclassEditor class>>classRootEditor (in category 'instance creation') -----
- classRootEditor
- "Answer the class of editors for the root of my heiarchy"
- 
- 	^ OldRootMetaclassEditor!

Item was removed:
- ----- Method: OldMetaclassEditor>>theMetaClass (in category 'reflecting') -----
- theMetaClass
- 	^ self!

Item was removed:
- ----- Method: OldMetaclassEditor>>edRequiresRecompile (in category 'building') -----
- edRequiresRecompile
- 	^ instVarNames ~~ nil!

Item was removed:
- ----- Method: OldMetaclassEditor>>definitionST80 (in category 'reflecting') -----
- definitionST80
- 	^ String streamContents: 
- 		[:strm |
- 		strm print: self;
- 			crtab;
- 			nextPutAll: 'instanceVariableNames: ';
- 			store: self instanceVariablesString]!

Item was removed:
- ----- Method: OldMetaclassEditor>>environment (in category 'reflecting') -----
- environment
- 	^ self system!

Item was removed:
- ----- Method: OldMetaclassEditor>>edMethodsDo: (in category 'building') -----
- edMethodsDo: aBlock
- 	methods ifNotNil: [methods do: aBlock]!

Item was removed:
- ----- Method: OldRootMetaclassEditor>>instSize (in category 'reflecting') -----
- instSize
- 	^ 0!

Item was removed:
- ----- Method: OldRootMetaclassEditor>>edRequiresRecompile (in category 'building') -----
- edRequiresRecompile
- 	^ false!

Item was removed:
- ----- Method: OldMetaclassEditor>>definitionST80: (in category 'reflecting') -----
- definitionST80: isST80
- 	^ isST80 ifTrue: [self definitionST80] ifFalse: [self definition]!

Item was removed:
- ----- Method: OldMetaclassEditor>>edClassFormat (in category 'building') -----
- edClassFormat
- 	^ ClassFormat
- 		size: self instSize
- 		type: self typeOfClass
- 		index: self indexIfCompact!

Item was removed:
- ----- Method: OldMetaclassEditor>>indexIfCompact (in category 'reflecting') -----
- indexIfCompact
- 	self subject ifNotNil: [^ self subject indexIfCompact].
- 	^ 0!

Item was removed:
- ----- Method: OldMetaclassEditor>>removeInstVarName: (in category 'editing') -----
- removeInstVarName: aString 
- 	instVarNames ifNil: [instVarNames := self subject instVarNames].
- 	instVarNames := instVarNames copyWithout: aString!

Item was removed:
- ----- Method: OldMetaclassEditor>>edBuild (in category 'building') -----
- edBuild
- 	| result class |
- 	class := self subject ifNil: [Metaclass] ifNotNilDo: [:subject | subject class].
- 	result := class basicNew.
- 	"Create a temporary MethodDictionary to catch code written by SyntaxError dialogs. MethodDictionaryEditor will overwrite this. See MethodEditor>>compileFor:"
- 	result
- 		superclass: self edSuperclass
- 		methodDictionary: MethodDictionary new
- 		format: self format;		
- 		organization: self organization edBuild.
- 	result setInstVarNames: self instVarNames.
- 	^ result!

Item was removed:
- ----- Method: OldMetaclassEditor class>>classClassEditor (in category 'instance creation') -----
- classClassEditor
- "Answers the class of my instance-side editor"
- 
- 	^ ClassEditor!

Item was removed:
- ----- Method: OldMetaclassEditor>>isMeta (in category 'reflecting') -----
- isMeta
- 	^ true!

Item was removed:
- ----- Method: OldMetaclassEditor>>system (in category 'accessing') -----
- system
- 	^ editor system!

Item was removed:
- ----- Method: OldMetaclassEditor>>product (in category 'building') -----
- product
- 	^ editor product class!

Item was removed:
- ----- Method: OldMetaclassEditor>>edRequiresBuild (in category 'building') -----
- edRequiresBuild
- 	^ (superEditor ~~ nil) | (instVarNames ~~ nil) | (methods ~~ nil)!

Item was removed:
- ----- Method: OldMetaclassEditor>>classPool (in category 'reflecting') -----
- classPool
- 	^ editor classPool!

Item was removed:
- ----- Method: OldMetaclassEditor>>compiledMethodAt: (in category 'reflecting') -----
- compiledMethodAt: aSelector
- 	^ self subjectDo: [:subject | subject compiledMethodAt: aSelector]!

Item was removed:
- ----- Method: OldMetaclassEditor>>compile:classified: (in category 'editing') -----
- compile: source classified: cat
- 	^ self 
- 		compile: source
- 		classified: cat
- 		withStamp: Utilities changeStamp
- 		notifying: nil
- 		logSource: self acceptsLoggingOfCompilation !

Item was removed:
- ----- Method: OldRootMetaclassEditor>>edRequiresBuild (in category 'building') -----
- edRequiresBuild
- 	^ false!

Item was removed:
- ----- Method: OldRootMetaclassEditor>>typeOfClass (in category 'reflecting') -----
- typeOfClass
- 	^ #normal!

Item was removed:
- ----- Method: OldMetaclassEditor>>instanceSide (in category 'reflecting') -----
- instanceSide
- 	^ self theNonMetaClass!

Item was removed:
- ----- Method: OldMetaclassEditor>>addInstVarName: (in category 'editing') -----
- addInstVarName: aString 
- 	instVarNames ifNil: [instVarNames := self subject instVarNames].
- 	instVarNames := instVarNames copyWith: aString!

Item was removed:
- ----- Method: OldMetaclassEditor>>printOn: (in category 'printing') -----
- printOn: aStream
- 	aStream
- 		nextPutAll: 'a MetaclassEditor on: ';
- 		print: editor subject !

Item was removed:
- ----- Method: OldMetaclassEditor>>comment (in category 'reflecting') -----
- comment
- 	^ self instanceSide comment!

Item was removed:
- ----- Method: OldMetaclassEditor>>includesSelector: (in category 'reflecting') -----
- includesSelector: aSelector
- 	^ (methods ifNil: [self subject] ifNotNil: [methods])
- 		includesSelector: aSelector!

Item was removed:
- ----- Method: OldMetaclassEditor>>rearrangeInstVarNames: (in category 'editing') -----
- rearrangeInstVarNames: associations
- 	"The associations are name -> pos and cover the subset
- 	of vars that should be moved. The old just fill in the holes."
- 
- 	instVarNames := ClassEditor rearrangeVarNames: associations oldNames: instVarNames!

Item was removed:
- ----- Method: OldMetaclassEditor>>new (in category 'metaclass') -----
- new
- 	^ editor := self basicNew!

Item was removed:
- ----- Method: OldMetaclassEditor>>name (in category 'reflecting') -----
- name
- 	^ editor name, ' class'!

Item was removed:
- ----- Method: OldMetaclassEditor>>subjectDo: (in category 'accessing') -----
- subjectDo: aBlock
- 	^ self subject
- 		ifNotNilDo: [:subject | aBlock value: subject]
- 		ifNil: [self error: 'key not found']!

Item was removed:
- ----- Method: OldMetaclassEditor>>edInitializeForNewClass (in category 'building') -----
- edInitializeForNewClass
- 	superEditor := self system edEditorFor: Object class.
- 	instVarNames := Array new.
- 	methods := MethodDictionaryEditor for: self!

Item was removed:
- ----- Method: OldMetaclassEditor>>sourceCodeAt: (in category 'reflecting') -----
- sourceCodeAt: aSelector
- 	^ self subjectDo: [:subject | subject sourceCodeAt: aSelector]!

Item was removed:
- ----- Method: OldMetaclassEditor>>organization (in category 'reflecting') -----
- organization
- 	^ organization ifNil: [organization := OrganizationEditor for: self]!

Item was removed:
- ----- Method: OldRootMetaclassEditor>>edRegisterEditor (in category 'initialize-release') -----
- edRegisterEditor
- "Do nothing"!

Item was removed:
- ----- Method: OldMetaclassEditor>>edMethodAt: (in category 'editing') -----
- edMethodAt: aSelector
- 	^ self methods at: aSelector!

Item was removed:
- ----- Method: OldMetaclassEditor>>methodDictionary (in category 'reflecting') -----
- methodDictionary
- 	| methodEditor |
- 	(methods isNil and: [self edRequiresRecompile not]) ifTrue: [^ self subject methodDictionary].
- 	methodEditor := methods ifNil: [MethodDictionaryEditor for: self].
- 	^ methodEditor buildFor: self!

Item was removed:
- ----- Method: OldMetaclassEditor>>browserDefinition: (in category 'reflecting') -----
- browserDefinition: style
- 	^ self definition!



More information about the Packages mailing list