From VisualWorks®, 7.6 of February 8, 2008 on March 3, 2008 at 9:43:17 pm (Dialog confirm: 'You are filing-in a Parcel source file!\\While this is possible it will not have\the same effect as loading the parcel.\None of the Parcel''s prerequisites will\be loaded and none of its load actions\will be performed.\\Are you sure you want to file-in?' withCRs) ifFalse: [self error: 'Parcel file-in abandoned. Choose terminate or close.'] <class> <name>RefactoryChange</name> <environment>Refactory.Browser</environment> <super>Core.Object</super> <private>false</private> none name <imports></imports> <category>Browser-Change Objects</category> <attributes> <package>Browser-ChangeObjects</package> </attributes> </class> <comment> Refactory.Browser.RefactoryChange
RefactoryChange is an abstract class that represent some change to a class or method. They are used in combination with CompositeRefactoryChange to give transaction-like behavior. All change objects have the ability to undo themselves. Subclasses must implement the following messages: accessing changeObject renameChangesForObject:to: private executeNotifying: private-inspector accessing removeChange: Instance Variables: name <String> the name that is displayed for undo/redo
</comment> <class> <name>RefactoryObjectChange</name> <environment>Refactory.Browser</environment> <super>Refactory.Browser.RefactoryChange</super> <private>false</private> none objectName isMeta <imports></imports> <category>Browser-Change Objects</category> <attributes> <package>Browser-ChangeObjects</package> </attributes> </class> <comment> Refactory.Browser.RefactoryObjectChange
RefactoryObjectChange is the abstract superclass of all "atomic" changes (i.e., changes that affect one object). Subclasses must implement the following messages: private primitiveExecute Performs the change. Instance Variables: isMeta <Boolean> True if this change applies to the metaclass. objectName <CharacterArray> Name of the object being changed.
</comment> <class> <name>CommentChange</name> <environment>Refactory.Browser</environment> <super>Refactory.Browser.RefactoryObjectChange</super> <private>false</private> none comment <imports></imports> <category>Browser-Change Objects</category> <attributes> <package>Browser-ChangeObjects</package> </attributes> </class> <comment> Refactory.Browser.CommentChange
CommentChange represents a change to a class' comment. Instance Variables: comment <String> the new comment
</comment> <class> <name>ParcelChange</name> <environment>Refactory.Browser</environment> <super>Refactory.Browser.RefactoryObjectChange</super> <private>false</private> none parcelName <imports></imports> <category>Browser-Change Objects</category> <attributes> <package>Browser-ChangeObjects</package> </attributes> </class> <comment> Refactory.Browser.ParcelChange
ParcelChange is the abstract superclass of all changes that manipulate parcel contents. Subclasses must implement the following messages: private undoClass The class that implement the inverse operation Instance Variables: parcelName <String> The name of the parcel being changed.
</comment> <class> <name>AddSharedVariableToParcelChange</name> <environment>Refactory.Browser</environment> <super>Refactory.Browser.ParcelChange</super> <private>false</private> none <imports></imports> <category>Browser-Change Objects</category> <attributes> <package>Browser-ChangeObjects</package> </attributes> </class> <comment> Refactory.Browser.AddSharedVariableToParcelChange
AddSharedVariableToParcelChange adds a shared variable to a parcel.
</comment> <class> <name>OverrideChange</name> <environment>Refactory.Browser</environment> <super>Refactory.Browser.RefactoryObjectChange</super> <private>false</private> none override <imports></imports> <category>Browser-Change Objects</category> <attributes> <package>Browser-ChangeObjects</package> </attributes> </class> <comment> Refactory.Browser.OverrideChange
OverrideChange is the abstract superclass of the changes that deal with overrides. Instance Variables: override <Override> The override that is being changed.
</comment> <class> <name>AddOverrideChange</name> <environment>Refactory.Browser</environment> <super>Refactory.Browser.OverrideChange</super> <private>false</private> none <imports></imports> <category>Browser-Change Objects</category> <attributes> <package>Browser-ChangeObjects</package> </attributes> </class> <comment> Refactory.Browser.AddOverrideChange
AddOverrideChange adds an override.
</comment> <class> <name>RemoveObjectChange</name> <environment>Refactory.Browser</environment> <super>Refactory.Browser.RefactoryObjectChange</super> <private>false</private> none <imports></imports> <category>Browser-Change Objects</category> <attributes> <package>Browser-ChangeObjects</package> </attributes> </class> <comment> Refactory.Browser.RemoveObjectChange
RemoveObjectChange is the abstract superclass of changes that remove "Global" objects from the system
</comment> <class> <name>RemoveSharedVariableChange</name> <environment>Refactory.Browser</environment> <super>Refactory.Browser.RemoveObjectChange</super> <private>false</private> none <imports></imports> <category>Browser-Change Objects</category> <attributes> <package>Browser-ChangeObjects</package> </attributes> </class> <comment> Refactory.Browser.RemoveSharedVariableChange
RemoveSharedVariableChange removes a shared variable from the system
</comment> <class> <name>ExecuteCodeChange</name> <environment>Refactory.Browser</environment> <super>Refactory.Browser.RefactoryObjectChange</super> <private>false</private> none definition category parcels isPrivate controller package nameSpaceName <imports></imports> <category>Browser-Change Objects</category> <attributes> <package>Browser-ChangeObjects</package> </attributes> </class> <comment> Refactory.Browser.ExecuteCodeChange
ExecuteCodeChange is a special type of change where some code is executed to perform the change (e.g., defining a class). It is abstract. The appropriate subclass is resolved by matching against known selector patterns from the definition string. Subclasses must implement the following messages: private fillOutDefinition Instance Variables: category <String> the category the object will be in controller <Controller | nil> the controller for the view that is defining the object, can be nil if no view is defining the object (e.g., undo/redo) definition <String> the code that is executed isPrivate <Boolean> is the object private? namespaceName <String> where the object is being compiled into package <Store.PackageModel> the default package for the item parcels <Collection of: Parcel> a collection of parcels the object should be added to
</comment> <class> <name>AddSharedVariableChange</name> <environment>Refactory.Browser</environment> <super>Refactory.Browser.ExecuteCodeChange</super> <private>false</private> none isConstant initializer bindingReference <imports></imports> <category>Browser-Change Objects</category> <attributes> <package>Browser-ChangeObjects</package> </attributes> </class> <comment> Refactory.Browser.AddSharedVariableChange
AddSharedVariableChange is a change that represents the addition of a shared variable to a class or namespace. Instance Variables: bindingReference <GeneralBindingReference> The reference to the newly compiled variable. initializer <String> The initialize method for the new variable. isConstant <Boolean> True if the new variable is a constant.
</comment> <class> <name>PackageChange</name> <environment>Refactory.Browser</environment> <super>Refactory.Browser.RefactoryObjectChange</super> <private>false</private> none packageName <imports></imports> <category>Browser-Change Objects</category> <attributes> <package>Browser-ChangeObjects</package> </attributes> </class> <comment> Refactory.Browser.PackageChange
PackageChange is the abstract superclass of changes that manipulate a packages contents. Subclasses must implement the following messages: private currentPackage Instance Variables: packageName <String> The package being changed.
</comment> <class> <name>MoveClassDefinitionToPackageChange</name> <environment>Refactory.Browser</environment> <super>Refactory.Browser.PackageChange</super> <private>false</private> none <imports></imports> <category>Browser-Change Objects</category> <attributes> <package>Browser-ChangeObjects</package> </attributes> </class> <comment> Refactory.Browser.MoveClassDefinitionToPackageChange
MoveClassDefinitionToPackageChange moves a class definition from its current package into a new package.
</comment> <class> <name>RefactoryProtocolChange</name> <environment>Refactory.Browser</environment> <super>Refactory.Browser.RefactoryObjectChange</super> <private>false</private> none protocol isData <imports></imports> <category>Browser-Change Objects</category> <attributes> <package>Browser-ChangeObjects</package> </attributes> </class> <comment> Refactory.Browser.RefactoryProtocolChange
RefactoryProtocolChange is the abstract superclass of the changes that manipulate the method protocols. Instance Variables: isData <Boolean> True if this protocol is for shared variables. protocol <String> The protocol being changed.
</comment> <class> <name>RemoveProtocolChange</name> <environment>Refactory.Browser</environment> <super>Refactory.Browser.RefactoryProtocolChange</super> <private>false</private> none <imports></imports> <category>Browser-Change Objects</category> <attributes> <package>Browser-ChangeObjects</package> </attributes> </class> <comment> Refactory.Browser.RemoveProtocolChange
RemoveProtocolChange removes a protocol from the system. Note: This doesn't remove the objects in the protocol
</comment> <class> <name>RemoveNameSpaceChange</name> <environment>Refactory.Browser</environment> <super>Refactory.Browser.RemoveObjectChange</super> <private>false</private> none <imports></imports> <category>Browser-Change Objects</category> <attributes> <package>Browser-ChangeObjects</package> </attributes> </class> <comment> Refactory.Browser.RemoveNameSpaceChange
RemoveNamespaceChange removes a namespace from the system.
</comment> <class> <name>AddNameSpaceChange</name> <environment>Refactory.Browser</environment> <super>Refactory.Browser.ExecuteCodeChange</super> <private>false</private> none imports definedNameSpace <imports></imports> <category>Browser-Change Objects</category> <attributes> <package>Browser-ChangeObjects</package> </attributes> </class> <comment> Refactory.Browser.AddNameSpaceChange
AddNamespaceChange is a change that represent adding or recompiling a Namespace. Instance Variables: definedNamespace <String> Namespace actually defined. imports <Array of: String> The new namespace's import list.
</comment> <class> <name>RemoveClassChange</name> <environment>Refactory.Browser</environment> <super>Refactory.Browser.RemoveObjectChange</super> <private>false</private> none <imports></imports> <category>Browser-Change Objects</category> <attributes> <package>Browser-ChangeObjects</package> </attributes> </class> <comment> Refactory.Browser.RemoveClassChange
RemoveClassChange removes a class from the system
</comment> <class> <name>AddMethodToParcelChange</name> <environment>Refactory.Browser</environment> <super>Refactory.Browser.ParcelChange</super> <private>false</private> none selector <imports></imports> <category>Browser-Change Objects</category> <attributes> <package>Browser-ChangeObjects</package> </attributes> </class> <comment> Refactory.Browser.AddMethodToParcelChange
AddMethodToParcelChange is a change that adds an existing method to a parcel. Instance Variables: selector <Symbol> The selector of the method to add.
</comment> <class> <name>MoveObjectChange</name> <environment>Refactory.Browser</environment> <super>Refactory.Browser.RefactoryObjectChange</super> <private>false</private> none targetNamespace <imports></imports> <category>Browser-Change Objects</category> <attributes> <package>Browser-ChangeObjects</package> </attributes> </class> <comment> Refactory.Browser.MoveObjectChange
MoveObjectChange moves a class, namespace or shared variable to another namespace. Instance Variables: targetNamespace <String> the namespace's name where we are moving to
</comment> <class> <name>MigrateObjectChange</name> <environment>Refactory.Browser</environment> <super>Refactory.Browser.MoveObjectChange</super> <private>false</private> none <imports></imports> <category>My Classes</category> <attributes> <package>Browser-ChangeObjects</package> </attributes> </class> <comment> Refactory.Browser.MigrateObjectChange
I'm a special kind of move. The two differences are: a) We make sure that all of my object's bindings are currently stuffed with a value and b) we take care NOT to flush the bindings after the move.
</comment> <class> <name>AddProtocolChange</name> <environment>Refactory.Browser</environment> <super>Refactory.Browser.RefactoryProtocolChange</super> <private>false</private> none <imports></imports> <category>Browser-Change Objects</category> <attributes> <package>Browser-ChangeObjects</package> </attributes> </class> <comment> Refactory.Browser.AddProtocolChange
AddProtocolChange adds a new protocol to a class
</comment> <class> <name>AddMethodChange</name> <environment>Refactory.Browser</environment> <super>Refactory.Browser.RefactoryObjectChange</super> <private>false</private> none source selector protocols parcels controller definedSelector package <imports></imports> <category>Browser-Change Objects</category> <attributes> <package>Browser-ChangeObjects</package> </attributes> </class> <comment> Refactory.Browser.AddMethodChange
AddMethodChange adds a method to a class. If this is used to replace and existing method, the new method will live in the same package and parcels as the original. Instance Variables: controller <Controller | nil> Who to notify on a syntax error. definedSelector <Symbol | nil> The selector of the added method if the source compiled. package <Store.PackageModel> The package that the new method is added to. parcels <Collection of: Parcel> The parcels that the new method belongs to. protocols <Collection of: Symbol> The protocols that the new methods is in. selector <Symbol> The selector of the method to be added. source <String> The source code of the added method. Shared Variables: EagerAutoCategorization <Boolean> When we inheritProtocol, do we do so always, or only if it's a new method on the reciever?
</comment> <class> <name>RemoveMethodFromParcelChange</name> <environment>Refactory.Browser</environment> <super>Refactory.Browser.ParcelChange</super> <private>false</private> none selector <imports></imports> <category>Browser-Change Objects</category> <attributes> <package>Browser-ChangeObjects</package> </attributes> </class> <comment> Refactory.Browser.RemoveMethodFromParcelChange
RemoveMethodFromParcelChange removes a method definition from a parcel. Note: This does not remove a method from the image. Instance Variables: selector <Symbol> The method to remove.
</comment> <class> <name>RemoveSharedVariableFromParcelChange</name> <environment>Refactory.Browser</environment> <super>Refactory.Browser.ParcelChange</super> <private>false</private> none <imports></imports> <category>Browser-Change Objects</category> <attributes> <package>Browser-ChangeObjects</package> </attributes> </class> <comment> Refactory.Browser.RemoveSharedVariableFromParcelChange
RemoveSharedVariableFromParcelChange removes a shared variable from the parcel. Note: This does not remove the shared variable from the image.
</comment> <class> <name>MoveNameSpaceToPackageChange</name> <environment>Refactory.Browser</environment> <super>Refactory.Browser.PackageChange</super> <private>false</private> none <imports></imports> <category>Browser-Change Objects</category> <attributes> <package>Browser-ChangeObjects</package> </attributes> </class> <comment> Refactory.Browser.MoveNameSpaceToPackageChange
MoveNamespaceToPackageChange moves a namespace into a new package.
</comment> <class> <name>AddClassChange</name> <environment>Refactory.Browser</environment> <super>Refactory.Browser.ExecuteCodeChange</super> <private>false</private> none superclassName instanceVariableNames classInstanceVariableNames imports indexedType definedClass <imports></imports> <category>Browser-Change Objects</category> <attributes> <package>Browser-ChangeObjects</package> </attributes> </class> <comment> Refactory.Browser.AddClassChange
AddClassChange is a change that represents adding or recompiling a class. Instance Variables: classInstanceVariableNames <SequenceableCollection of: String> our class instance variable names definedClass <Behavior> the class that was defined imports <Collection of: NameSpaceImport> the imports for the class indexedType <Symbol> #bytes, #none, or #objects instanceVariableNames <SequenceableCollection of: String> our instance variables superclassName <String | nil> the name of our superclass
</comment> <class> <name>MoveSharedVariableToPackageChange</name> <environment>Refactory.Browser</environment> <super>Refactory.Browser.PackageChange</super> <private>false</private> none <imports></imports> <category>Browser-Change Objects</category> <attributes> <package>Browser-ChangeObjects</package> </attributes> </class> <comment> Refactory.Browser.MoveSharedVariableToPackageChange
MoveSharedVariableToPackageChange moves a shared variable into a new package.
</comment> <class> <name>RestoreOverrideChange</name> <environment>Refactory.Browser</environment> <super>Refactory.Browser.OverrideChange</super> <private>false</private> none <imports></imports> <category>Browser-Change Objects</category> <attributes> <package>Browser-ChangeObjects</package> </attributes> </class> <comment> Refactory.Browser.RestoreOverrideChange
RestoreOverrideChange restores a system override.
</comment> <class> <name>MoveMethodToPackageChange</name> <environment>Refactory.Browser</environment> <super>Refactory.Browser.PackageChange</super> <private>false</private> none selector <imports></imports> <category>Browser-Change Objects</category> <attributes> <package>Browser-ChangeObjects</package> </attributes> </class> <comment> Refactory.Browser.MoveMethodToPackageChange
MoveMethodToPackageChange moves a method from its current package into a new package. Instance Variables: selector <Symbol> The selector of the method to be moved.
</comment> <class> <name>CompositeRefactoryChange</name> <environment>Refactory.Browser</environment> <super>Refactory.Browser.RefactoryChange</super> <private>false</private> none changes <imports></imports> <category>Browser-Change Objects</category> <attributes> <package>Browser-ChangeObjects</package> </attributes> </class> <comment> Refactory.Browser.CompositeRefactoryChange
CompositeRefactoryChange represents a series of changes (RefactoryChange) that need to be performed. It provides transaction-like behavior by defering all changes until it is told to commit them. Instance Variables: changes <SequenceableCollection of: RefactoryChange> my changes
</comment> <class> <name>RenameObjectChange</name> <environment>Refactory.Browser</environment> <super>Refactory.Browser.CompositeRefactoryChange</super> <private>false</private> none oldName newName <imports></imports> <category>Browser-Change Objects</category> <attributes> <package>Browser-ChangeObjects</package> </attributes> </class> <comment> Refactory.Browser.RenameObjectChange
RenameObjectChange is a special change that renames a class, namespace or shared variable. Instance Variables: newName <String> new name for the object oldName <String> old name of the object
</comment> <class> <name>RefactoryChangeFailureNotification</name> <environment>Refactory.Browser</environment> <super>Core.Notification</super> <private>false</private> none <imports></imports> <category>Browser-Change Objects</category> <attributes> <package>Browser-ChangeObjects</package> </attributes> </class> <comment> Refactory.Browser.RefactoryChangeFailureNotification
RefactoryChangeFailureNotification is signaled when one of the changes fails. When this is raised, the change is not marked as an undoable change. Since something went wrong, we don't know how to undo that.
</comment> <class> <name>AddNameSpaceToParcelChange</name> <environment>Refactory.Browser</environment> <super>Refactory.Browser.ParcelChange</super> <private>false</private> none <imports></imports> <category>Browser-Change Objects</category> <attributes> <package>Browser-ChangeObjects</package> </attributes> </class> <comment> Refactory.Browser.AddNameSpaceToParcelChange
AddNamespaceToParcelChange adds a namespace to a parcel.
</comment> <class> <name>RenameProtocolChange</name> <environment>Refactory.Browser</environment> <super>Refactory.Browser.RefactoryProtocolChange</super> <private>false</private> none newProtocol <imports></imports> <category>Browser-Change Objects</category> <attributes> <package>Browser-ChangeObjects</package> </attributes> </class> <comment> Refactory.Browser.RenameProtocolChange
RenameProtocolChange changes the name of an existing protocol Instance Variables: newProtocol <String> The new name of the protocol
</comment> <class> <name>RefactoryVariableChange</name> <environment>Refactory.Browser</environment> <super>Refactory.Browser.RefactoryObjectChange</super> <private>false</private> none variable <imports></imports> <category>Browser-Change Objects</category> <attributes> <package>Browser-ChangeObjects</package> </attributes> </class> <comment> Refactory.Browser.RefactoryVariableChange
RefactoryVariableChange is the abstract superclass of all changes that deal with variables. Subclasses must implement the following messages: private changeSymbol Instance Variables: variable <String> The name of the variable to be changed.
</comment> <class> <name>RemoveOverrideChange</name> <environment>Refactory.Browser</environment> <super>Refactory.Browser.OverrideChange</super> <private>false</private> none <imports></imports> <category>Browser-Change Objects</category> <attributes> <package>Browser-ChangeObjects</package> </attributes> </class> <comment> Refactory.Browser.RemoveOverrideChange
RemoveOverrideChange removes an override.
</comment> <class> <name>AddInstanceVariableChange</name> <environment>Refactory.Browser</environment> <super>Refactory.Browser.RefactoryVariableChange</super> <private>false</private> none <imports></imports> <category>Browser-Change Objects</category> <attributes> <package>Browser-ChangeObjects</package> </attributes> </class> <comment> Refactory.Browser.AddInstanceVariableChange
AddInstanceVariableChange is a change that recompiles a class with a new instance variable added to it.
</comment> <class> <name>AddClassDefinitionToParcelChange</name> <environment>Refactory.Browser</environment> <super>Refactory.Browser.ParcelChange</super> <private>false</private> none <imports></imports> <category>Browser-Change Objects</category> <attributes> <package>Browser-ChangeObjects</package> </attributes> </class> <comment> Refactory.Browser.AddClassDefinitionToParcelChange
AddClassDefinitionToParcelChange is a change that adds an existing class definition to a parcel.
</comment> <class> <name>RemoveNameSpaceFromParcelChange</name> <environment>Refactory.Browser</environment> <super>Refactory.Browser.ParcelChange</super> <private>false</private> none <imports></imports> <category>Browser-Change Objects</category> <attributes> <package>Browser-ChangeObjects</package> </attributes> </class> <comment> Refactory.Browser.RemoveNameSpaceFromParcelChange
RemoveNamespaceFromParcelChange removes a namespace from a parcel. Note: This doesn't remove the namespace from the image.
</comment> <class> <name>RenameInstanceVariableChange</name> <environment>Refactory.Browser</environment> <super>Refactory.Browser.RefactoryVariableChange</super> <private>false</private> none newName <imports></imports> <category>Browser-Change Objects</category> <attributes> <package>Browser-ChangeObjects</package> </attributes> </class> <comment> Refactory.Browser.RenameInstanceVariableChange
RenameInstanceVariableChange is a special change that renames an instance variable around other changes. Instance Variables: className <String> class name that defines the variable isMeta <Boolean> is meta class? newName <String> new name for the variable oldName <String> old name for the variable
</comment> <class> <name>RemoveMethodChange</name> <environment>Refactory.Browser</environment> <super>Refactory.Browser.RefactoryObjectChange</super> <private>false</private> none selector <imports></imports> <category>Browser-Change Objects</category> <attributes> <package>Browser-ChangeObjects</package> </attributes> </class> <comment> Refactory.Browser.RemoveMethodChange
RemoveMethodChange is the change that removes a method from the system. Instance Variables: selector <Symbol> The method to remove
</comment> <class> <name>MoveToProtocolChange</name> <environment>Refactory.Browser</environment> <super>Refactory.Browser.AddProtocolChange</super> <private>false</private> none symbol <imports></imports> <category>Browser-Change Objects</category> <attributes> <package>Browser-ChangeObjects</package> </attributes> </class> <comment> Refactory.Browser.MoveToProtocolChange
MoveToProtocolChange moves an object from another protocol into this one. Instance Variables: symbol <Symbol> The name of the object to move into this protocol
</comment> <class> <name>RefactoryChangeManager</name> <environment>Refactory.Browser</environment> <super>Core.Object</super> <private>false</private> none undo redo isPerformingRefactoring <imports></imports> <category>Browser-Change Objects</category> <attributes> <package>Browser-ChangeObjects</package> </attributes> </class> <comment> Refactory.Browser.RefactoryChangeManager
RefactoryChangeManager is a singleton that manages all changes performed by the RB. It holds the undo and redo list of changes. Instance Variables: isPerformingRefactoring <Boolean> are we currently executing a change? If we are not currently executing a change and we notice that a change has occurred, then we must clear the undo/redo lists. redo <OrderedCollection> the list of redo changes undo <OrderedCollection> the list of undo changes Shared Variables: Instance <RefactoryChangeManager> our sole instance UndoSize <Integer> the maximum size of the undo/redo list
</comment> <class> <name>CodeComponentCommentChange</name> <environment>Refactory.Browser</environment> <super>Refactory.Browser.CommentChange</super> <private>false</private> none type <imports></imports> <category>Browser-Change Objects</category> <attributes> <package>Browser-ChangeObjects</package> </attributes> </class> <comment> Refactory.Browser.CodeComponentCommentChange
CodeComponentCommentChange represents a change to a code component's (Parcel, Package, etc.) comment. Instance Variables: type <Symbol> #parcel or #package
</comment> <class> <name>CurrentPackageChange</name> <environment>Refactory.Browser</environment> <super>Refactory.Browser.RefactoryChange</super> <private>false</private> none packageName <imports></imports> <category>Browser-Change Objects</category> <attributes> <package>Browser-ChangeObjects</package> </attributes> </class> <comment> Refactory.Browser.CurrentPackageChange
CurrentPackageChange represents changing the current package. While this change does not change any code, it is useful for undoing the setting of the current package. Instance Variables: packageName <String> the name of the package to make current
</comment> <class> <name>RemoveInstanceVariableChange</name> <environment>Refactory.Browser</environment> <super>Refactory.Browser.RefactoryVariableChange</super> <private>false</private> none <imports></imports> <category>Browser-Change Objects</category> <attributes> <package>Browser-ChangeObjects</package> </attributes> </class> <comment> Refactory.Browser.RemoveInstanceVariableChange
RemoveInstanceVariableChange is a change that recompiles a class without an instance variable.
</comment> <class> <name>RemoveClassDefinitionFromParcelChange</name> <environment>Refactory.Browser</environment> <super>Refactory.Browser.ParcelChange</super> <private>false</private> none <imports></imports> <category>Browser-Change Objects</category> <attributes> <package>Browser-ChangeObjects</package> </attributes> </class> <comment> Refactory.Browser.RemoveClassDefinitionFromParcelChange
RemoveClassDefinitionFromParcelChange removes a class from a parcel. Note: this doesn't remove the class from the image.
</comment> <name>EagerAutoCategorization</name> <environment>Refactory.Browser.AddMethodChange</environment> <private>false</private> <constant>false</constant> <category>settings</category> <initializer>false</initializer> <attributes> <package>Browser-ChangeObjects</package> </attributes> <name>Instance</name> <environment>Refactory.Browser.RefactoryChangeManager</environment> <private>false</private> <constant>false</constant> <category>As yet unclassified</category> <attributes> <package>Browser-ChangeObjects</package> </attributes> <name>UndoSize</name> <environment>Refactory.Browser.RefactoryChangeManager</environment> <private>false</private> <constant>false</constant> <category>As yet unclassified</category> <attributes> <package>Browser-ChangeObjects</package> </attributes> <methods> Refactory.Browser.RefactoryChange <category>converting</category>
addAttributesTo: aString for: anObject | parseTree | parseTree := RBParser parseExpression: aString onError: [:s :p | ^aString]. parseTree isMessage ifFalse: [^aString]. ('*:attributes:' match: parseTree selector) ifTrue: [^aString]. ^aString , ' attributes: ' , (self attributesForObject: anObject) asArray storeString
asCompositeChange ^(CompositeRefactoryChange new) changes: (OrderedCollection with: self); name: self name; yourself
attributesForObject: anObject ^SourceFileFormat attributesFor: anObject excluding: #()
classChangesForRemoveNameSpace: aNameSpace | changes classes | classes := self classRootsFor: aNameSpace asNameSpace. changes := CompositeRefactoryChange new. classes do: [:each | changes addChange: (self undoForRemoveClass: each)]. ^changes
classRootsFor: aNameSpace | classes | classes := Set new. aNameSpace bindingsDo: [:each | each isForNameSpace ifTrue: [classes addAll: (self classRootsFor: each value)] ifFalse: [each isForClass ifTrue: [classes add: each value]]]. ^classes reject: [:each | each allSuperclasses anySatisfy: [:spr | classes includes: spr]]
nameSpaceChangesForRemoveNameSpace: aNameSpace | changes | changes := CompositeRefactoryChange new. aNameSpace asNameSpace bindingsDo: [:each | each isForNameSpace ifTrue: [(changes defineNameSpace: each value definition) parcels: (Parcel parcelsDefiningBinding: each); package: (self packageForNameSpace: each value). changes addChange: (self nameSpaceChangesForRemoveNameSpace: each value)]]. ^changes
sharedVariableChangesForRemoveNameSpace: aNameSpace | changes | changes := CompositeRefactoryChange new. aNameSpace asNameSpace bindingsDo: [:each | each isForNameSpace ifTrue: [changes addChange: (self sharedVariableChangesForRemoveNameSpace: each value)]. each isForGeneral ifTrue: [(changes defineSharedVariable: (self addAttributesTo: (aNameSpace definitionOfStatic: each) for: (aNameSpace asNameSpace fullyQualifiedReferenceOf: each key))) parcels: (Parcel parcelsDefiningBinding: each); package: (self packageForSharedVariable: each key in: aNameSpace)]]. ^changes
undoForRemoveClass: class | classChanges | classChanges := CompositeRefactoryChange new. (class withAllSubclasses reject: [:each | each isMeta]) do: [:each | (classChanges defineClass: (self addAttributesTo: each definition for: each)) parcels: (Parcel parcelsDefiningClass: each); package: (self packageForClassDefinition: each). classChanges addChange: (self undoForRemoveNameSpace: each). each selectors do: [:selector | (classChanges compile: (each sourceCodeAt: selector) in: each) copyAttributesFrom: selector]. each class selectors do: [:selector | (classChanges compile: (each class sourceCodeAt: selector) in: each class) parcels: (Parcel parcelsDefiningSelector: selector inClass: each class)]]. ^classChanges
undoForRemoveNameSpace: aNameSpace | changes | changes := CompositeRefactoryChange new. aNameSpace isBehavior ifFalse: [(changes defineNameSpace: (self addAttributesTo: aNameSpace definition for: aNameSpace)) parcels: (Parcel parcelsDefiningBinding: aNameSpace fullyQualifiedReference binding); package: (self packageForNameSpace: aNameSpace)]. changes addChange: (self nameSpaceChangesForRemoveNameSpace: aNameSpace). changes addChange: (self classChangesForRemoveNameSpace: aNameSpace). changes addChange: (self sharedVariableChangesForRemoveNameSpace: aNameSpace). changes addChange: (self undoForRemoveOverrides: (Override overridesForClassOrNameSpace: aNameSpace)). ^changes
undoForRemoveOverrides: overrides | classChanges | classChanges := CompositeRefactoryChange new. overrides isNil ifFalse: [overrides do: [:each | classChanges addChange: (AddOverrideChange for: each)]]. ^classChanges
</methods> <methods> Refactory.Browser.RefactoryChange <category>accessing</category>
changeForClass: aRBClass selector: aSelector ^nil
changeForMetaclass: aSymbol selector: aSelector ^nil
changeObject self subclassResponsibility
changes ^#()
changesSize ^1
name ^name isNil ifTrue: [self changeString] ifFalse: [name]
originalCode ^''
renameChangesForObject: aClassName to: newClassName "We're in the middle of performing a rename operation. If we stored the class name, we need to change the class name to the new name to perform the compiles." self subclassResponsibility
withAllChanges | changes index | changes := OrderedCollection with: self. index := 1. [index <= changes size] whileTrue: [changes addAll: (changes at: index) changes. index := index + 1]. ^changes
</methods> <methods> Refactory.Browser.RefactoryChange <category>printing</category>
changeString ^self class name
displayString ^name isNil ifTrue: [self changeString] ifFalse: [name]
</methods> <methods> Refactory.Browser.RefactoryChange <category>performing-changes</category>
execute ^self executeNotifying: []
</methods> <methods> Refactory.Browser.RefactoryChange <category>private</category>
changeVariable: variableName thatBeginsWith: startString toBeginWith: newStartString (variableName = startString or: [variableName size > (startString size + 1) and: [(variableName copyFrom: 1 to: startString size + 1) = (startString , '.')]]) ifTrue: [^newStartString , (variableName copyFrom: startString size + 1 to: variableName size)]. ^variableName
executeNotifying: aBlock self subclassResponsibility
packageForClass: aClass selector: aSymbol | registry | registry := self storeRegistry. registry isNil ifTrue: [^nil]. ^registry containingPackageForSelector: aSymbol class: aClass
packageForClassDefinition: aClass | registry | registry := self storeRegistry. registry isNil ifTrue: [^nil]. ^registry containingPackageForClass: aClass
packageForNameSpace: aNameSpace | registry | registry := self storeRegistry. registry isNil ifTrue: [^nil]. ^registry containingPackageForNameSpaceSymbol: aNameSpace absoluteSymbol
packageForSharedVariable: aName in: aNameSpace | registry | registry := self storeRegistry. registry isNil ifTrue: [^nil]. ^registry containingPackageForDataKey: aName symbol: aNameSpace absoluteSymbol
setPackage: package while: aBlock | policiesRef | (package isNil or: [package isBundle]) ifTrue: [^aBlock value]. policiesRef := #{Store.Policies}. policiesRef isDefined ifFalse: [^aBlock value]. policiesRef value packagePolicy forcePackage: package while: aBlock
storeRegistry ^#{Store.Registry} valueOrDo: [nil]
</methods> <methods> Refactory.Browser.RefactoryChange <category>initialize-release</category>
initialize
name: aString name := aString
</methods> <methods> Refactory.Browser.RefactoryChange <category>comparing</category>
= aRefactoryClassChange ^self class = aRefactoryClassChange class
hash ^self class hash
</methods> <methods> Refactory.Browser.RefactoryChange <category>private-inspector accessing</category>
removeChange: aChange self subclassResponsibility
</methods> <methods> Refactory.Browser.RefactoryChange class <category>instance creation</category>
new ^(super new) initialize; yourself
</methods> <methods> Refactory.Browser.RefactoryObjectChange <category>accessing</category>
changeClass: aBehavior isMeta := aBehavior isMeta. self objectName: aBehavior instanceBehavior unambiguousName
changeObject | class | class := self bindingReference valueOrDo: [^nil]. ^isMeta ifTrue: [class class] ifFalse: [class]
methodSourceFor: aSymbol (self changeObject includesSelector: aSymbol) ifFalse: [^nil]. ^self changeObject sourceCodeAt: aSymbol
objectName ^objectName
objectName: aString objectName := aString
renameChangesForObject: aClassName to: newClassName | newString | newString := self changeVariable: self objectName thatBeginsWith: aClassName toBeginWith: newClassName. self objectName = newString ifFalse: [^(self copy) objectName: newString; yourself]. ^self
</methods> <methods> Refactory.Browser.RefactoryObjectChange <category>private</category>
binding ^self bindingReference binding
bindingReference ^objectName asQualifiedReference makeUnambiguous
executeNotifying: aBlock | undo | undo := self asUndoOperation. undo notNil ifTrue: [undo name: self name]. self primitiveExecute. aBlock value. ^undo
isMeta ^isMeta
isMeta: aBoolean isMeta := aBoolean
primitiveExecute ^self subclassResponsibility
</methods> <methods> Refactory.Browser.RefactoryObjectChange <category>printing</category>
changeString ^self displayClassName
displayClassName ^isMeta == true ifTrue: [self objectName , ' class'] ifFalse: [self objectName asString]
printOn: aStream aStream nextPutAll: self displayString
</methods> <methods> Refactory.Browser.RefactoryObjectChange <category>comparing</category>
= aRefactoryClassChange ^super = aRefactoryClassChange and: [self objectName = aRefactoryClassChange objectName and: [isMeta = aRefactoryClassChange isMeta]]
hash ^self objectName hash
</methods> <methods> Refactory.Browser.RefactoryObjectChange <category>converting</category>
asUndoOperation ^nil
</methods> <methods> Refactory.Browser.RefactoryObjectChange <category>initialize-release</category>
initialize super initialize. isMeta := false
</methods> <methods> Refactory.Browser.RefactoryObjectChange <category>private-inspector accessing</category>
removeChange: aChange "Do nothing for leaf changes"
</methods> <methods> Refactory.Browser.CommentChange <category>accessing</category>
comment ^comment
comment: aString comment := aString
</methods> <methods> Refactory.Browser.CommentChange <category>printing</category>
changeString ^((#Comment1s << #browser >> 'Comment <1s>') expandMacrosWith: objectName)
printOn: aStream aStream nextPutAll: objectName; nextPutAll: ' comment: '; print: comment; nextPut: $!
</methods> <methods> Refactory.Browser.CommentChange <category>private</category>
commentObject ^self bindingReference value
primitiveExecute self commentObject comment: comment
</methods> <methods> Refactory.Browser.CommentChange <category>converting</category>
asUndoOperation ^(self copy) comment: self commentObject comment; yourself
</methods> <methods> Refactory.Browser.CommentChange class <category>instance creation</category>
object: aClassOrNameSpace comment: aString ^(self new) objectName: aClassOrNameSpace unambiguousName; comment: aString; yourself
</methods> <methods> Refactory.Browser.ParcelChange <category>accessing</category>
parcel ^Parcel parcelNamed: parcelName
parcel: aParcel parcelName := aParcel name
</methods> <methods> Refactory.Browser.ParcelChange <category>private</category>
undoClass self subclassResponsibility
</methods> <methods> Refactory.Browser.ParcelChange <category>converting</category>
asUndoOperation ^(self undoClass new) name: self name; objectName: self objectName; isMeta: self isMeta; parcel: self parcel; yourself
</methods> <methods> Refactory.Browser.ParcelChange class <category>instance creation</category>
objectName: aString parcel: aParcel ^(self new) objectName: aString; parcel: aParcel; yourself
</methods> <methods> Refactory.Browser.AddSharedVariableToParcelChange <category>private</category>
primitiveExecute | ref | ref := self bindingReference. self parcel addName: ref simpleName in: ref environment
undoClass ^RemoveSharedVariableFromParcelChange
</methods> <methods> Refactory.Browser.OverrideChange <category>initialize-release</category>
override: anOverride override := anOverride
</methods> <methods> Refactory.Browser.OverrideChange <category>accessing</category>
override ^override
</methods> <methods> Refactory.Browser.OverrideChange <category>comparing</category>
= anObject ^super = anObject and: [self override = anObject override]
</methods> <methods> Refactory.Browser.OverrideChange class <category>instance creation</category>
for: anOverride ^(self new) override: anOverride; yourself
</methods> <methods> Refactory.Browser.AddOverrideChange <category>private</category>
primitiveExecute Override installOverride: override
</methods> <methods> Refactory.Browser.AddOverrideChange <category>converting</category>
asUndoOperation ^RemoveOverrideChange for: override
</methods> <methods> Refactory.Browser.AddOverrideChange <category>printing</category>
changeString ^((#AddOverrideFor1s << #browser >> 'Add Override for <1s>') expandMacrosWith: override printString)
</methods> <methods> Refactory.Browser.RemoveObjectChange <category>printing</category>
printOn: aStream aStream nextPutAll: '#{'; nextPutAll: objectName; nextPutAll: '} removeFromSystem'; nextPut: $!
</methods> <methods> Refactory.Browser.RemoveObjectChange <category>private</category>
primitiveExecute self bindingReference removeFromSystem
</methods> <methods> Refactory.Browser.RemoveObjectChange class <category>instance creation</category>
objectName: aString ^(self new) objectName: aString; yourself
</methods> <methods> Refactory.Browser.RemoveSharedVariableChange <category>printing</category>
changeString ^((#RemoveSharedVariable1s << #browser >> 'Remove shared variable <1s>') expandMacrosWith: objectName)
</methods> <methods> Refactory.Browser.RemoveSharedVariableChange <category>converting</category>
asUndoOperation | ref classChanges overs addVarChange | ref := self bindingReference. addVarChange := (AddSharedVariableChange definition: ref definition) parcels: (Parcel parcelsDefiningBinding: self binding); package: (self packageForSharedVariable: ref simpleName in: ref environment); yourself. overs := Override overridesForStatic: self binding in: ref environment. overs isNil ifTrue: [^addVarChange]. classChanges := CompositeRefactoryChange new. classChanges addChange: addVarChange. classChanges addChange: (self undoForRemoveOverrides: overs). ^classChanges
</methods> <methods> Refactory.Browser.ExecuteCodeChange <category>accessing</category>
category category isNil ifTrue: [self fillOutDefinition]. ^category
changeClassName objectName isNil ifTrue: [self fillOutDefinition]. ^objectName
isPrivate isPrivate isNil ifTrue: [self fillOutDefinition]. ^isPrivate
nameSpace ^self nameSpaceName asQualifiedReference value
nameSpaceName nameSpaceName isNil ifTrue: [self fillOutDefinition]. ^nameSpaceName
objectName objectName isNil ifTrue: [self fillOutDefinition]. ^objectName
package ^package
parcels ^parcels
renameChangesForObject: aClassName to: newClassName | newChange tree newReceiver | newChange := super renameChangesForObject: aClassName to: newClassName. tree := RBParser parseExpression: newChange definition onError: [:s :e | ^newChange]. tree isMessage ifFalse: [^newChange]. tree receiver isVariable ifFalse: [^newChange]. newReceiver := self changeVariable: tree receiver name thatBeginsWith: aClassName toBeginWith: newClassName. newReceiver = tree receiver name ifTrue: [^newChange]. tree receiver: (RBVariableNode named: newReceiver). ^(newChange copy) definition: tree formattedCode; fillOutDefinition; yourself
</methods> <methods> Refactory.Browser.ExecuteCodeChange <category>printing</category>
changeString ^((#Define1s << #browser >> 'Define <1s>') expandMacrosWith: self displayClassName)
originalCode | ref binding | ref := self objectName asQualifiedReference. binding := ref bindingOrNil. ^binding isNil ifTrue: [''] ifFalse: [ref definition]
printOn: aStream aStream nextPutAll: definition
</methods> <methods> Refactory.Browser.ExecuteCodeChange <category>private</category>
compilationScope ^self package ifNil: [self nameSpace] ifNotNil: [:pkg | pkg environment ifNil: [self nameSpace]]
controller ^controller
controller: aController controller := aController
definition ^definition
fillOutDefinition self subclassResponsibility
namesIn: aString | names stream nameStream | names := OrderedCollection new. stream := ReadStream on: aString. [stream skipSeparators. stream atEnd] whileFalse: [nameStream := WriteStream on: (String new: 10). [stream atEnd or: [stream peek isSeparator]] whileFalse: [nameStream nextPut: stream next]. names add: nameStream contents]. ^names
parseImports: aString | imports stream drillDown private importName | imports := OrderedCollection new. stream := aString readStream. [stream skipSeparators. stream atEnd] whileFalse: [drillDown := false. private := false. importName := stream upToSeparator. [importName = 'drillDown' or: [importName = 'private']] whileTrue: [importName = 'drillDown' ifTrue: [drillDown := true] ifFalse: [private := true]. stream skipSeparators. importName := stream upToSeparator]. importName notEmpty ifTrue: [imports add: (((importName last = $* ifTrue: [GeneralNameSpaceImport] ifFalse: [SpecificNameSpaceImport]) path: (importName tokensBasedOn: $.)) drillDown: drillDown; private: private; yourself)]]. ^imports
primitiveExecute | object | [self setPackage: self package while: [object := Compiler evaluate: definition for: nil in: self compilationScope notifying: self controller logged: false]. object isNil ifTrue: [RefactoryChangeFailureNotification raise]] on: RedefinitionNotification do: [:note | RedefinitionNotification interactiveHandler: note forcedPackage: self package]. ^object
</methods> <methods> Refactory.Browser.ExecuteCodeChange <category>initialize-release</category>
definition: aString definition := aString
initialize super initialize. parcels := #(). package := nil
package: aPackageModel package := aPackageModel
parcels: aCollection parcels := aCollection
</methods> <methods> Refactory.Browser.ExecuteCodeChange <category>comparing</category>
= anExecuteCodeChange ^self class = anExecuteCodeChange class and: [definition = anExecuteCodeChange definition]
hash ^definition hash
</methods> <methods> Refactory.Browser.ExecuteCodeChange <category>testing</category>
isValidCreationMessage: aMessageNode (aMessageNode receiver isVariable or: [aMessageNode receiver isLiteralNode]) ifFalse: [^false]. (self isValidMessageName: aMessageNode) ifFalse: [^false]. ^aMessageNode arguments allSatisfy: [:each | each isLiteralNode]
isValidMessageName: aMessageNode ^false
</methods> <methods> Refactory.Browser.ExecuteCodeChange class <category>private</category>
classDefinitionMessages ^#(#defineClass:superclass:indexedType:private:instanceVariableNames:classInstanceVariableNames:imports:category: #defineClass:superclass:indexedType:private:instanceVariableNames:classInstanceVariableNames:imports:category:attributes: #subclass:instanceVariableNames:classVariableNames:poolDictionaries: #subclass:instanceVariableNames:classVariableNames:poolDictionaries:category: #variableByteSubclass:classVariableNames:poolDictionaries: #variableByteSubclass:instanceVariableNames:classVariableNames:poolDictionaries:category: #variableSubclass:instanceVariableNames:classVariableNames:poolDictionaries: #variableSubclass:instanceVariableNames:classVariableNames:poolDictionaries:category:)
nameSpaceDefinitionMessages ^#(#defineNameSpace:private:imports:category: #defineNameSpace:private:imports:category:attributes:)
sharedVariableDefinitionMessages ^#(#defineStatic:private:constant:category:initializer: #defineStatic:private:constant:category:initializer:attributes: #defineSharedVariable:private:constant:category:initializer: #defineSharedVariable:private:constant:category:initializer:attributes:)
</methods> <methods> Refactory.Browser.ExecuteCodeChange class <category>instance creation</category>
definition: aString ^self definition: aString for: nil
definition: aString for: aController | message | message := RBParser parseExpression: aString. message isMessage ifFalse: [^nil]. (self classDefinitionMessages includes: message selector) ifTrue: [^(AddClassChange new) definition: aString; controller: aController; yourself]. (self nameSpaceDefinitionMessages includes: message selector) ifTrue: [^(AddNameSpaceChange new) definition: aString; controller: aController; yourself]. (self sharedVariableDefinitionMessages includes: message selector) ifTrue: [^(AddSharedVariableChange new) definition: aString; controller: aController; yourself]. ^self error: #unknownDefinitionType >> 'Unknown Definition Type' << #browser
</methods> <methods> Refactory.Browser.AddSharedVariableChange <category>initialize-release</category>
initialize super initialize. isConstant := false. initializer := nil
</methods> <methods> Refactory.Browser.AddSharedVariableChange <category>accessing</category>
definedObject ^bindingReference
initializer initializer isNil ifTrue: [self fillOutDefinition]. ^initializer
isConstant isConstant isNil ifTrue: [self fillOutDefinition]. ^isConstant
nameSpace "The enviornment used for the creation of a shared variable that is in a class is its environment. This same environment is also used in the CompiledInitializer. My superclass uses #nameSpace as the environment for compiling the do-it, so we need to make sure that if this change is for a class shared variable, return the enviorment of the class instead of the class itself. I know, this sounds crazy. 7.4.1 is very close and I want to limit the number of changes we are making right now. Besides, who reads method comments anyway?" | nameSpaceOrBehavior | nameSpaceOrBehavior := super nameSpace. ^nameSpaceOrBehavior isBehavior ifTrue: [nameSpaceOrBehavior environment] ifFalse: [nameSpaceOrBehavior]
</methods> <methods> Refactory.Browser.AddSharedVariableChange <category>testing</category>
isValidMessageName: aMessageNode ^self class sharedVariableDefinitionMessages includes: aMessageNode selector
</methods> <methods> Refactory.Browser.AddSharedVariableChange <category>private</category>
fillOutDefinition | parseTree | parseTree := RBParser parseExpression: definition onError: [:str :pos | ^self parseDefinitionError]. parseTree isMessage ifFalse: [^self parseDefinitionError]. (self isValidCreationMessage: parseTree) ifFalse: [^self parseDefinitionError]. nameSpaceName := parseTree receiver name. objectName := nameSpaceName , '.' , parseTree arguments first value. isPrivate := (parseTree arguments at: 2) value. isConstant := (parseTree arguments at: 3) value. category := (parseTree arguments at: 4) value asSymbol. initializer := (parseTree arguments at: 5) value
parseDefinitionError nameSpaceName := 'Root'. objectName := #_UnknownSharedVariable
primitiveExecute | binding nameSpace | bindingReference := super primitiveExecute. binding := bindingReference bindingOrNil. binding notNil ifTrue: [nameSpace := bindingReference environment. parcels do: [:each | each addBinding: binding in: nameSpace]]. ^bindingReference
</methods> <methods> Refactory.Browser.AddSharedVariableChange <category>converting</category>
asUndoOperation | binding ref | ref := self objectName asQualifiedReference. binding := ref bindingOrNil. ^(binding notNil and: [binding isForGeneral]) ifTrue: [(self class definition: ref definition) parcels: (Parcel parcelsDefiningBinding: binding); package: (self packageForSharedVariable: ref simpleName in: ref environment); yourself] ifFalse: [RemoveSharedVariableChange objectName: self objectName]
</methods> <methods> Refactory.Browser.PackageChange <category>accessing</category>
package ^self storeRegistry packageNamed: packageName
package: aPackage packageName := aPackage name
storeChangeSet ^#{Store.XChangeSet} value current
</methods> <methods> Refactory.Browser.PackageChange <category>private</category>
currentPackage self subclassResponsibility
</methods> <methods> Refactory.Browser.PackageChange <category>converting</category>
asUndoOperation | oldPackage | oldPackage := self currentPackage. oldPackage isNil ifTrue: [^nil]. ^(self copy) package: oldPackage; yourself
</methods> <methods> Refactory.Browser.MoveClassDefinitionToPackageChange <category>private</category>
currentPackage ^self packageForClassDefinition: self changeObject
primitiveExecute self storeChangeSet moveClassDefinition: self changeObject toPackage: self package
</methods> <methods> Refactory.Browser.MoveClassDefinitionToPackageChange class <category>instance creation</category>
class: aClass package: aPackage ^(self new) changeClass: aClass; package: aPackage; yourself
</methods> <methods> Refactory.Browser.RefactoryProtocolChange <category>accessing</category>
isData ^isData
isData: aBoolean isData := aBoolean
protocol ^protocol
protocol: aSymbol protocol := aSymbol
</methods> <methods> Refactory.Browser.RefactoryProtocolChange <category>private</category>
logProtocolChange: aString SourceFileManager default logChange: aString
protocolObject ^self isData ifTrue: [self bindingReference value asNameSpace] ifFalse: [self changeObject]
</methods> <methods> Refactory.Browser.RefactoryProtocolChange class <category>instance creation</category>
class: aClass protocol: aSymbol ^(self new) changeClass: aClass; protocol: aSymbol; isData: false; yourself
nameSpace: aNameSpace protocol: aSymbol ^(self new) objectName: aNameSpace unambiguousName; protocol: aSymbol; isData: true; yourself
</methods> <methods> Refactory.Browser.RemoveProtocolChange <category>private</category>
primitiveExecute self protocolObject organization removeCategory: self protocol. self logProtocolChange: self protocolObject printString , ' organization removeCategory: ' , self protocol storeString. self protocolObject reorganize
</methods> <methods> Refactory.Browser.RemoveProtocolChange <category>printing</category>
changeString ^((#GenKey5 << #browser >> 'Remove protocol, <1s>, from <2s>') expandMacrosWith: self protocol with: self protocolObject printString)
</methods> <methods> Refactory.Browser.RemoveProtocolChange <category>converting</category>
asUndoOperation (self protocolObject organization categories includes: self protocol) ifFalse: [^CompositeRefactoryChange new]. ^self isData ifTrue: [AddProtocolChange nameSpace: self changeObject protocol: self protocol] ifFalse: [AddProtocolChange class: self changeObject protocol: self protocol]
</methods> <methods> Refactory.Browser.RemoveNameSpaceChange <category>converting</category>
asUndoOperation ^self undoForRemoveNameSpace: self bindingReference value
</methods> <methods> Refactory.Browser.RemoveNameSpaceChange <category>printing</category>
changeString ^((#RemoveNameSpace1s << #browser >> 'Remove name space <1s>') expandMacrosWith: objectName)
</methods> <methods> Refactory.Browser.AddNameSpaceChange <category>accessing</category>
definedObject ^definedNameSpace
imports imports isNil ifTrue: [self fillOutDefinition]. ^imports
newNameSpaceName ^self objectName
</methods> <methods> Refactory.Browser.AddNameSpaceChange <category>converting</category>
asUndoOperation | binding ref | ref := self objectName asQualifiedReference. binding := ref bindingOrNil. ^(binding notNil and: [binding isForNameSpace]) ifTrue: [(self class definition: binding value definition) parcels: (Parcel parcelsDefiningBinding: binding); package: (self packageForNameSpace: binding value); yourself] ifFalse: [| changes | changes := CompositeRefactoryChange new. changes removeNameSpaceNamed: self objectName. binding notNil ifTrue: [binding isForClass ifTrue: [changes addChange: (self undoForRemoveClass: binding value)] ifFalse: [changes defineNameSpace: ref definition]]. changes]
</methods> <methods> Refactory.Browser.AddNameSpaceChange <category>private</category>
fillOutDefinition | parseTree | parseTree := RBParser parseExpression: definition onError: [:str :pos | ^self parseDefinitionError]. parseTree isMessage ifFalse: [^self parseDefinitionError]. (self isValidCreationMessage: parseTree) ifFalse: [^self parseDefinitionError]. nameSpaceName := parseTree receiver name. objectName := nameSpaceName , '.' , parseTree arguments first value. isPrivate := (parseTree arguments at: 2) value. imports := self parseImports: (parseTree arguments at: 3) value. category := (parseTree arguments at: 4) value asSymbol
parseDefinitionError nameSpaceName := 'Root'. objectName := #_UnknownNameSpace. imports := #()
primitiveExecute definedNameSpace := super primitiveExecute. parcels do: [:each | each addNameSpace: definedNameSpace]. ^definedNameSpace
</methods> <methods> Refactory.Browser.AddNameSpaceChange <category>testing</category>
isValidMessageName: aMessageNode ^self class nameSpaceDefinitionMessages includes: aMessageNode selector
</methods> <methods> Refactory.Browser.AddNameSpaceChange <category>initialize-release</category>
initialize super initialize. imports := nil
</methods> <methods> Refactory.Browser.RemoveClassChange <category>converting</category>
asUndoOperation | class | class := self bindingReference value. ^self undoForRemoveClass: class
</methods> <methods> Refactory.Browser.RemoveClassChange <category>printing</category>
changeString ^((#RemoveClass1s << #browser >> 'Remove class <1s>') expandMacrosWith: objectName)
</methods> <methods> Refactory.Browser.RemoveClassChange class <category>instance creation</category>
remove: aClass ^(self new) changeClass: aClass; yourself
removeClassName: aSymbol ^(self new) objectName: aSymbol; yourself
</methods> <methods> Refactory.Browser.AddMethodToParcelChange <category>accessing</category>
selector ^selector
selector: aSymbol selector := aSymbol
</methods> <methods> Refactory.Browser.AddMethodToParcelChange <category>private</category>
primitiveExecute self parcel addSelector: self selector class: self changeObject
undoClass ^RemoveMethodFromParcelChange
</methods> <methods> Refactory.Browser.AddMethodToParcelChange <category>converting</category>
asUndoOperation ^(super asUndoOperation) selector: self selector; yourself
</methods> <methods> Refactory.Browser.AddMethodToParcelChange class <category>instance creation</category>
class: aClass selector: aSymbol parcel: aParcel ^(self new) changeClass: aClass; selector: aSymbol; parcel: aParcel; yourself
</methods> <methods> Refactory.Browser.MoveObjectChange <category>private</category>
nameSpace ^targetNamespace asQualifiedReference value
nameSpaceName ^targetNamespace
primitiveExecute self changeObjectReference relocateTo: self nameSpace
</methods> <methods> Refactory.Browser.MoveObjectChange <category>accessing</category>
changeObjectReference ^objectName asQualifiedReference
originalNamespaceName | index | index := objectName lastIndexOf: $.. ^index isZero ifTrue: [objectName] ifFalse: [objectName first: index - 1]
renameChangesForObject: aClassName to: newClassName | change newObjectName renamedNameSpace | change := super renameChangesForObject: aClassName to: newClassName. newObjectName := self changeVariable: objectName thatBeginsWith: aClassName toBeginWith: newClassName. renamedNameSpace := self changeVariable: targetNamespace thatBeginsWith: aClassName toBeginWith: newClassName. (objectName ~= newObjectName or: [renamedNameSpace ~= targetNamespace]) ifTrue: [change move: newObjectName to: targetNamespace]. ^change
simpleObjectName ^objectName allButFirst: (objectName lastIndexOf: $.)
</methods> <methods> Refactory.Browser.MoveObjectChange <category>initialize-release</category>
move: anUnambiguousName to: anUnambiguousTargetName objectName := anUnambiguousName. targetNamespace := anUnambiguousTargetName
</methods> <methods> Refactory.Browser.MoveObjectChange <category>converting</category>
asUndoOperation ^(self copy) move: targetNamespace , '.' , self simpleObjectName to: self originalNamespaceName; yourself
</methods> <methods> Refactory.Browser.MoveObjectChange <category>comparing</category>
= aMoveObjectChange ^super = aMoveObjectChange and: [targetNamespace = aMoveObjectChange nameSpaceName]
</methods> <methods> Refactory.Browser.MoveObjectChange class <category>instance creation</category>
move: objectName to: nameSpaceName ^(self new) move: objectName to: nameSpaceName; yourself
</methods> <methods> Refactory.Browser.MigrateObjectChange <category>private</category>
primeBinding: aVariableBinding aVariableBinding isForClass ifTrue: [^self primeClassBindings: aVariableBinding value]. aVariableBinding isForNameSpace ifTrue: [^self primeNamespaceBindings: aVariableBinding value]. self primeGeneralBinding: aVariableBinding
primeBindings self primeBinding: self changeObjectReference binding
primeClassBindings: aClass aClass selectorsAndMethodsDo: [:ignored :method | self primeCodeBindings: method]. aClass class selectorsAndMethodsDo: [:ignored :method | self primeCodeBindings: method]. aClass asNameSpace bindingsDo: [:each | self primeBinding: each]
primeCodeBindings: aCompiledCode aCompiledCode allLiteralsDo: [:each | each isBindingReference ifTrue: [each bindingOrNil ifNotNil: [each value]]. (each isVariableBinding and: [each isDeferred]) ifTrue: [each value]]
primeGeneralBinding: aBindingReference aBindingReference binding initializer ifNotNil: [:code | self primeCodeBindings: code method]
primeNamespaceBindings: aNamespace aNamespace bindingsDo: [:each | self primeBinding: each]
primitiveExecute self primeBindings. self quietlyRelocate
quietlyRelocate | originalMethod node quietLinker | originalMethod := SystemUtils class compiledMethodAt: #linkSystem. node := SystemUtils class compilerClass new compile: 'linkSystem' in: SystemUtils class notifying: nil ifFail: []. quietLinker := node generate. [SystemUtils class replaceMethodAt: #linkSystem withMethod: quietLinker. self changeObjectReference relocateTo: self nameSpace] ensure: [SystemUtils class replaceMethodAt: #linkSystem withMethod: originalMethod]
</methods> <methods> Refactory.Browser.AddProtocolChange <category>private</category>
primitiveExecute self protocolObject organization addCategory: self protocol. self logProtocolChange: self protocolObject printString , ' organization addCategory: ' , self protocol printString. self protocolObject reorganize
</methods> <methods> Refactory.Browser.AddProtocolChange <category>printing</category>
changeString ^((#AddProtocol1sTo2s << #browser >> 'Add protocol, <1s>, to <2s>') expandMacrosWith: self protocol with: self protocolObject printString)
</methods> <methods> Refactory.Browser.AddProtocolChange <category>converting</category>
asUndoOperation ^(self protocolObject organization categories includes: self protocol) ifTrue: [self copy] ifFalse: [self isData ifTrue: [RemoveProtocolChange nameSpace: self changeObject protocol: self protocol] ifFalse: [RemoveProtocolChange class: self changeObject protocol: self protocol]]
</methods> <methods> Refactory.Browser.AddMethodChange <category>initialize-release</category>
class: aClass protocol: aProtocol source: aString self changeClass: aClass. self protocols: aProtocol. source := aString
class: aClass source: aString self changeClass: aClass. source := aString. self protocols: self currentProtocol
copyAttributesFrom: aSelector self copyAttributesFrom: aSelector in: self changeObject
copyAttributesFrom: aSelector in: class class isNil ifTrue: [^self]. parcels := Parcel parcelsDefiningSelector: aSelector inClass: class. package := self packageForClass: class selector: aSelector
initialize super initialize. parcels := #(). package := nil
package: aPackageModel package := aPackageModel
parcels: aCollection parcels := aCollection
protocols: aCollection protocols := aCollection isString ifTrue: [Array with: aCollection] ifFalse: [aCollection]. protocols isNil ifTrue: [protocols := Array with: ClassOrganizer defaultProtocol]
</methods> <methods> Refactory.Browser.AddMethodChange <category>comparing</category>
= anAddMethodChange ^super = anAddMethodChange and: [self parseTree = anAddMethodChange parseTree]
hash ^self parseTree hash
</methods> <methods> Refactory.Browser.AddMethodChange <category>private</category>
controller ^controller
controller: aController controller := aController
inheritProtocol "Search for my selector in the super class chain and match it if found, otherwise leave as is." | targetClass | (targetClass := self changeObject) ifNil: [^self]. ((targetClass includesSelector: self selector) and: [EagerAutoCategorization == true not]) ifTrue: [^self]. targetClass := targetClass superclass. [targetClass notNil] whileTrue: [(targetClass organization categoryOfElement: self selector) ifNotNil: [:protocol | ^self protocols: (Array with: protocol)]. targetClass := targetClass superclass]
parseSelector | class | class := self changeObject. ^class isNil ifTrue: [RBParser parseMethodPattern: source] ifFalse: [class parserClass new parseSelector: source]
parseTree ^RBParser parseMethod: source onError: [:str :pos | ^nil]
primitiveExecute self setPackage: self package while: [definedSelector := self changeObject compile: source classified: self protocol notifying: self controller environment: self environment]. definedSelector isNil ifTrue: [RefactoryChangeFailureNotification raiseSignal. ^nil]. parcels do: [:each | each addSelector: definedSelector forClass: self changeObject]. ^definedSelector
</methods> <methods> Refactory.Browser.AddMethodChange <category>accessing</category>
changeForClass: aSymbol selector: aSelector ^(isMeta not and: [self selector = aSelector and: [objectName = aSymbol]]) ifTrue: [self] ifFalse: [nil]
changeForMetaclass: aSymbol selector: aSelector ^(isMeta and: [self selector = aSelector and: [objectName = aSymbol]]) ifTrue: [self] ifFalse: [nil]
definedSelector ^definedSelector
environment "Return the environment in which our method should be compiled. If we return nil, then the method should be compiled in its default environment, i.e. the namespace of the class. The rules are - if the method itself defines an environment, use it. - if there is no environment defined by this package, use the default (return nil) - if there is no package defined, use the default (return nil) - if the package holds the class definition use the default (return nil), otherwise we would effectively be forcing all classes in a package to be in the default namespace, since we would override the scope of all methods. - if the method is an extension, return the environment of the package." | method | self changeObject ifNil: [^nil]. method := self changeObject compiledMethodAt: selector ifAbsent: [nil]. (method notNil and: [method environment ~= self changeObject environment]) ifTrue: [^method environment]. package ifNil: [^nil]. package environment ifNil: [^nil]. (package includesDefinitionOf: self changeObject instanceBehavior absoluteName) ifTrue: [^nil]. ^package environment
package ^package
parcels ^parcels
protocol ^self protocols first
protocols ^protocols
selector selector isNil ifTrue: [selector := self parseSelector ifNil: [#unknown]]. ^selector
</methods> <methods> Refactory.Browser.AddMethodChange <category>converting</category>
asUndoOperation | change | change := (self changeObject includesSelector: self selector) ifTrue: [| oldProtocol | oldProtocol := self currentProtocol. oldProtocol isNil ifTrue: [oldProtocol := #accessing]. (self class compile: (self methodSourceFor: self selector) in: self changeObject classified: oldProtocol) copyAttributesFrom: self selector; yourself] ifFalse: [RemoveMethodChange remove: selector from: self changeObject]. (self changeObject organization categories includes: self protocol) ifFalse: [change := (CompositeRefactoryChange named: self name) addChange: change; yourself. change addChange: (RemoveProtocolChange class: self changeObject protocol: self protocol)]. ^change
currentProtocol ^self changeObject organization categoryOfElement: self selector
</methods> <methods> Refactory.Browser.AddMethodChange <category>printing</category>
changeString ^((#Compile1s2s << #browser >> 'Compile <1s>%>%><2s>') expandMacrosWith: self displayClassName with: self selector)
originalCode self changeObject isNil ifTrue: [^'']. ^(self changeObject includesSelector: self selector) ifTrue: [self methodSourceFor: self selector] ifFalse: ['']
printOn: aStream aStream nextPutAll: source
</methods> <methods> Refactory.Browser.AddMethodChange class <category>instance creation</category>
compile: aString in: aClass ^(self new) class: aClass source: aString; yourself
compile: aString in: aBehavior classified: aProtocol ^(self new) class: aBehavior protocol: aProtocol source: aString; yourself
compile: aString in: aBehavior classified: aProtocol for: aController ^(self compile: aString in: aBehavior classified: aProtocol) controller: aController; yourself
compile: aString in: aClass for: aController ^(self compile: aString in: aClass) controller: aController; yourself
</methods> <methods> Refactory.Browser.AddMethodChange class <category>accessing</category>
eagerAutoCategorization ^EagerAutoCategorization
eagerAutoCategorization: aBoolean EagerAutoCategorization := aBoolean
</methods> <methods> Refactory.Browser.RemoveMethodFromParcelChange <category>accessing</category>
selector ^selector
selector: aSymbol selector := aSymbol
</methods> <methods> Refactory.Browser.RemoveMethodFromParcelChange <category>converting</category>
asUndoOperation ^(super asUndoOperation) selector: self selector; yourself
</methods> <methods> Refactory.Browser.RemoveMethodFromParcelChange <category>private</category>
primitiveExecute self parcel removeSelector: self selector class: self changeObject
undoClass ^AddMethodToParcelChange
</methods> <methods> Refactory.Browser.RemoveMethodFromParcelChange class <category>instance creation</category>
class: aClass selector: aSymbol parcel: aParcel ^(self new) changeClass: aClass; selector: aSymbol; parcel: aParcel; yourself
</methods> <methods> Refactory.Browser.RemoveSharedVariableFromParcelChange <category>private</category>
primitiveExecute | ref | ref := self bindingReference. self parcel removeName: ref simpleName in: ref environment
undoClass ^AddSharedVariableToParcelChange
</methods> <methods> Refactory.Browser.MoveNameSpaceToPackageChange <category>private</category>
currentPackage ^self packageForNameSpace: self changeObject
primitiveExecute self storeChangeSet moveNameSpaceDefinition: self changeObject toPackage: self package
</methods> <methods> Refactory.Browser.MoveNameSpaceToPackageChange class <category>instance creation</category>
nameSpace: aNameSpace package: aPackage ^(self new) objectName: aNameSpace fullName; package: aPackage; yourself
</methods> <methods> Refactory.Browser.AddClassChange <category>accessing</category>
classInstanceVariableNames classInstanceVariableNames isNil ifTrue: [self fillOutDefinition]. ^classInstanceVariableNames
definedObject ^definedClass
imports imports isNil ifTrue: [self fillOutDefinition]. ^imports
indexedType indexedType isNil ifTrue: [self fillOutDefinition]. ^indexedType
instanceVariableNames instanceVariableNames isNil ifTrue: [self fillOutDefinition]. ^instanceVariableNames
renameChangesForObject: aClassName to: newClassName | newChange tree newSuperclass superclass | newChange := super renameChangesForObject: aClassName to: newClassName. tree := RBParser parseExpression: newChange definition onError: [:s :e | ^newChange]. tree isMessage ifFalse: [^newChange]. tree arguments size < 2 ifTrue: [^newChange]. superclass := tree arguments at: 2. (superclass isLiteralNode and: [superclass value isBindingReference]) ifFalse: [^newChange]. newSuperclass := self changeVariable: superclass value asString thatBeginsWith: aClassName toBeginWith: newClassName. newSuperclass = superclass value asString ifTrue: [^newChange]. tree arguments at: 2 put: (RBLiteralNode value: (LiteralBindingReference pathString: newSuperclass)). ^(newChange copy) definition: tree formattedCode; fillOutDefinition; yourself
superclassName objectName isNil ifTrue: [self fillOutDefinition]. ^superclassName
</methods> <methods> Refactory.Browser.AddClassChange <category>testing</category>
isNewDefinitionFormat: aParseTree ^aParseTree selector keywords first = 'defineClass:'
isValidMessageName: aMessageNode ^self class classDefinitionMessages includes: aMessageNode selector
</methods> <methods> Refactory.Browser.AddClassChange <category>private</category>
fillOutDefinition | parseTree | parseTree := RBParser parseExpression: definition onError: [:str :pos | ^self parseDefinitionError]. parseTree isMessage ifFalse: [^self parseDefinitionError]. (self isValidCreationMessage: parseTree) ifFalse: [^self parseDefinitionError]. (self isNewDefinitionFormat: parseTree) ifTrue: [self fillOutUsingNewFormat: parseTree] ifFalse: [self fillOutUsingOldFormat: parseTree]
fillOutUsingNewFormat: parseTree nameSpaceName := parseTree receiver name. superclassName := (parseTree arguments at: 2) value isNil ifTrue: [nil] ifFalse: [(parseTree arguments at: 2) value asString]. objectName := nameSpaceName , '.' , parseTree arguments first value. indexedType := (parseTree arguments at: 3) value. isPrivate := (parseTree arguments at: 4) value. instanceVariableNames := self namesIn: (parseTree arguments at: 5) value. classInstanceVariableNames := self namesIn: (parseTree arguments at: 6) value. imports := self parseImports: (parseTree arguments at: 7) value. category := parseTree arguments size < 8 ifTrue: [#Unknown] ifFalse: [(parseTree arguments at: 8) value asSymbol]
fillOutUsingOldFormat: parseTree nameSpaceName := 'Smalltalk'. superclassName := parseTree receiver isVariable ifTrue: [parseTree receiver name asSymbol] ifFalse: [parseTree receiver value]. objectName := 'Smalltalk.' , parseTree arguments first value. isPrivate := false. indexedType := ('variableByte' match: parseTree selector) ifTrue: [#bytes] ifFalse: [('variable' match: parseTree selector) ifTrue: [#objects] ifFalse: [#none]]. instanceVariableNames := self namesIn: (parseTree arguments at: 2) value. classInstanceVariableNames := #(). "classVariableNames := self namesIn: (parseTree arguments at: 3) value." imports := self namesIn: (parseTree arguments at: 4) value. category := parseTree arguments size < 5 ifTrue: [#Unknown] ifFalse: [(parseTree arguments at: 5) value asSymbol]
parseDefinitionError nameSpaceName := 'Root'. objectName := #_UnknownClass. instanceVariableNames := #(). classInstanceVariableNames := #()
primitiveExecute definedClass := super primitiveExecute. parcels do: [:each | each addClass: definedClass]. ^definedClass
</methods> <methods> Refactory.Browser.AddClassChange <category>converting</category>
asUndoOperation | ref | ref := self objectName asQualifiedReference. ^(ref isDefined and: [ref bindingOrNil value environment = self nameSpace]) ifTrue: [(self class definition: ref definition) parcels: (Parcel parcelsDefiningBinding: ref binding); package: (self packageForClassDefinition: ref binding value); yourself] ifFalse: [RemoveClassChange removeClassName: self objectName]
</methods> <methods> Refactory.Browser.MoveSharedVariableToPackageChange <category>private</category>
currentPackage | binding | binding := self bindingReference bindingOrNil. ^self packageForSharedVariable: binding key in: (Root whoDefinesBinding: binding)
primitiveExecute | ref | ref := self bindingReference. self storeChangeSet moveDataKey: ref simpleName owner: ref environment toPackage: self package
</methods> <methods> Refactory.Browser.MoveSharedVariableToPackageChange class <category>instance creation</category>
sharedVariableNamed: aString package: aPackage ^(self new) objectName: aString; package: aPackage; yourself
</methods> <methods> Refactory.Browser.RestoreOverrideChange <category>private</category>
primitiveExecute override reinstall. Override removeOverride: override
</methods> <methods> Refactory.Browser.RestoreOverrideChange <category>converting</category>
asUndoOperation | change | change := CompositeRefactoryChange new. change addChange: override undoChangeObject. change addChange: (AddOverrideChange for: override). ^change
</methods> <methods> Refactory.Browser.RestoreOverrideChange <category>printing</category>
changeString ^((#RestoreOverrideFor1s << #browser >> 'Restore Override for <1s>') expandMacrosWith: override printString)
</methods> <methods> Refactory.Browser.MoveMethodToPackageChange <category>accessing</category>
selector ^selector
selector: aSymbol selector := aSymbol
</methods> <methods> Refactory.Browser.MoveMethodToPackageChange <category>private</category>
currentPackage ^self packageForClass: self changeObject selector: self selector
primitiveExecute self storeChangeSet moveSelector: self selector class: self changeObject toPackage: self package. self changeObject recompile: self selector in: (self package environmentFor: self selector in: self changeObject)
</methods> <methods> Refactory.Browser.MoveMethodToPackageChange class <category>instance creation</category>
class: aClass selector: aSelector package: aPackage ^(self new) changeClass: aClass; selector: aSelector; package: aPackage; yourself
</methods> <methods> Refactory.Browser.CompositeRefactoryChange <category>accessing</category>
addChange: aRefactoryChange changes add: aRefactoryChange. ^aRefactoryChange
changeForClass: aRBClass selector: aSelector changes reverseDo: [:each | | change | change := each changeForClass: aRBClass selector: aSelector. change notNil ifTrue: [^change]]. ^nil
changeForMetaclass: aSymbol selector: aSelector changes reverseDo: [:each | | change | change := each changeForMetaclass: aSymbol selector: aSelector. change notNil ifTrue: [^change]]. ^nil
changeObject "Composite Changes don't really have one of these" ^nil
changesSize ^changes inject: 0 into: [:sum :each | sum + each changesSize]
renameChangesForObject: aClassName to: newClassName ^(self copy) changes: (self changes collect: [:each | each renameChangesForObject: aClassName to: newClassName]); yourself
</methods> <methods> Refactory.Browser.CompositeRefactoryChange <category>refactory-changes</category>
addInstanceVariable: variableName to: aClass ^self addChange: (AddInstanceVariableChange add: variableName to: aClass)
compile: source in: class ^self addChange: (AddMethodChange compile: source in: class)
compile: source in: class classified: aProtocol ^self addChange: (AddMethodChange compile: source in: class classified: aProtocol)
defineClass: aString ^self addChange: (AddClassChange definition: aString)
defineNameSpace: aString ^self addChange: (AddNameSpaceChange definition: aString)
defineSharedVariable: aString ^self addChange: (AddSharedVariableChange definition: aString)
moveObjectNamed: objectName to: nameSpaceName ^self addChange: (MoveObjectChange move: objectName to: nameSpaceName)
removeClass: aClass ^self addChange: (RemoveClassChange removeClassName: aClass unambiguousName)
removeClassNamed: aSymbol self addChange: (RemoveClassChange removeClassName: aSymbol)
removeInstanceVariable: variableName from: aClass ^self addChange: (RemoveInstanceVariableChange remove: variableName from: aClass)
removeMethod: aSelector from: aClass ^self addChange: (RemoveMethodChange remove: aSelector from: aClass)
removeMethodProtocol: aSymbol from: aClass ^self addChange: (RemoveProtocolChange class: aClass protocol: aSymbol)
removeNameSpaceNamed: aString ^self addChange: (RemoveNameSpaceChange objectName: aString)
removeSharedVariableNamed: aString ^self addChange: (RemoveSharedVariableChange objectName: aString)
removeSharedVariableProtocol: aSymbol from: aNameSpace ^self addChange: (RemoveProtocolChange nameSpace: aNameSpace protocol: aSymbol)
restoreOverriddenMethod: aSelector for: aClass ^self addChange: (RestoreOverrideChange for: (Override overridesForSelector: aSelector class: aClass) last)
</methods> <methods> Refactory.Browser.CompositeRefactoryChange <category>private-inspector accessing</category>
changes ^changes
changes: aCollection changes := aCollection
removeChange: aChange changes remove: aChange ifAbsent: [changes do: [:each | each removeChange: aChange]]
</methods> <methods> Refactory.Browser.CompositeRefactoryChange <category>printing</category>
displayString ^super displayString asText allBold
printOn: aStream name isNil ifTrue: [super printOn: aStream] ifFalse: [aStream nextPutAll: name asString]
</methods> <methods> Refactory.Browser.CompositeRefactoryChange <category>comparing</category>
= aRefactoryBuilder super = aRefactoryBuilder ifFalse: [^false]. changes size = aRefactoryBuilder changes size ifFalse: [^false]. changes with: aRefactoryBuilder changes do: [:each :change | each = change ifFalse: [^false]]. ^true
hash ^changes size
</methods> <methods> Refactory.Browser.CompositeRefactoryChange <category>initialize-release</category>
initialize super initialize. changes := OrderedCollection new
</methods> <methods> Refactory.Browser.CompositeRefactoryChange <category>copying</category>
postCopy super postCopy. changes := changes collect: [:each | each copy]
</methods> <methods> Refactory.Browser.CompositeRefactoryChange <category>parcel-changes</category>
moveClassDefinition: aClass toParcel: aParcel (Parcel parcelsDefiningClass: aClass) do: [:each | self addChange: (RemoveClassDefinitionFromParcelChange objectName: aClass fullName parcel: each)]. aParcel isUnparceledParcel ifFalse: [self addChange: (AddClassDefinitionToParcelChange objectName: aClass fullName parcel: aParcel)]
moveNameSpace: aNameSpace toParcel: aParcel (Parcel parcelsDefiningNameSpace: aNameSpace) do: [:each | self addChange: (RemoveNameSpaceFromParcelChange objectName: aNameSpace fullName parcel: each)]. aParcel isUnparceledParcel ifFalse: [self addChange: (AddNameSpaceToParcelChange objectName: aNameSpace fullName parcel: aParcel)]
moveSelector: aSymbol in: aClass toParcel: aParcel (Parcel parcelsDefiningSelector: aSymbol inClass: aClass) do: [:each | self addChange: (RemoveMethodFromParcelChange class: aClass selector: aSymbol parcel: each)]. aParcel isUnparceledParcel ifFalse: [self addChange: (AddMethodToParcelChange class: aClass selector: aSymbol parcel: aParcel)]
moveSharedVariable: aName in: aNameSpace toParcel: aParcel | fullName | fullName := aNameSpace fullName , '.' , aName. (Parcel parcelsDefiningBinding: (aNameSpace bindingFor: aName)) do: [:each | self addChange: (RemoveSharedVariableFromParcelChange objectName: fullName parcel: each)]. aParcel isUnparceledParcel ifFalse: [self addChange: (AddSharedVariableToParcelChange objectName: fullName parcel: aParcel)]
</methods> <methods> Refactory.Browser.CompositeRefactoryChange <category>private</category>
executeNotifying: aBlock | undos undo | undos := changes collect: [:each | [each executeNotifying: aBlock] on: RefactoryChangeFailureNotification do: [:ex | each == changes first ifTrue: [ex pass] ifFalse: [ex resume]]]. (undos anySatisfy: [:each | each isNil]) ifTrue: [^nil]. undo := self copy. undo changes: undos reverse. ^undo
</methods> <methods> Refactory.Browser.CompositeRefactoryChange class <category>instance creation</category>
named: aString ^(self new) name: aString; yourself
</methods> <methods> Refactory.Browser.RenameObjectChange <category>private</category>
executeNotifying: aBlock [| undos | self changeObjectReference renameTo: newName. undos := changes collect: [:each | (each renameChangesForObject: oldName asString to: self newUnambiguousName) executeNotifying: aBlock]. (undos anySatisfy: [:each | each isNil]) ifTrue: [^nil]. ^(self copy) changes: undos reverse; rename: self newUnambiguousName to: oldName asQualifiedReference simpleName; yourself] on: RefactoryChangeFailureNotification do: [:ex | ex resume]
newName ^newName
newUnambiguousName ^oldName asQualifiedReference environment unambiguousName , '.' , newName
oldName ^oldName
</methods> <methods> Refactory.Browser.RenameObjectChange <category>accessing</category>
changeObjectReference ^oldName asQualifiedReference
renameChangesForObject: aClassName to: newClassName | change newString | change := super renameChangesForObject: aClassName to: newClassName. newString := self changeVariable: oldName thatBeginsWith: aClassName toBeginWith: newClassName. oldName = newString ifFalse: [change rename: newClassName to: newString]. ^change
</methods> <methods> Refactory.Browser.RenameObjectChange <category>comparing</category>
= aRenameClassChange ^super = aRenameClassChange and: [oldName = aRenameClassChange oldName and: [newName = aRenameClassChange newName]]
</methods> <methods> Refactory.Browser.RenameObjectChange <category>initialize-release</category>
rename: oldString to: newString oldName := oldString. newName := newString. name := ((#Rename1sTo2s << #browser >> 'Rename <1s> to <2s>') expandMacrosWith: oldName with: newName)
</methods> <methods> Refactory.Browser.RenameObjectChange class <category>instance creation</category>
rename: oldString to: newString ^(self new) rename: oldString to: newString; yourself
</methods> <methods> Refactory.Browser.AddNameSpaceToParcelChange <category>private</category>
primitiveExecute self parcel addNameSpace: self changeObject
undoClass ^RemoveNameSpaceFromParcelChange
</methods> <methods> Refactory.Browser.RenameProtocolChange <category>converting</category>
asUndoOperation ^(self copy) protocol: self newProtocol; newProtocol: self protocol; yourself
</methods> <methods> Refactory.Browser.RenameProtocolChange <category>private</category>
primitiveExecute (self protocolObject renameCategory: self protocol to: self newProtocol) ifTrue: [self logProtocolChange: self protocolObject printString , ' organization renameCategory: ' , self protocol printString , ' to: ' , self newProtocol printString]
</methods> <methods> Refactory.Browser.RenameProtocolChange <category>printing</category>
changeString ^((#RenameProtocol1sTo2sIn3s << #browser >> 'Rename protocol, <1s>, to <2s> in <3s>') expandMacrosWith: self protocol with: self newProtocol with: self protocolObject printString)
</methods> <methods> Refactory.Browser.RenameProtocolChange <category>accessing</category>
newProtocol ^newProtocol
newProtocol: aSymbol newProtocol := aSymbol
</methods> <methods> Refactory.Browser.RenameProtocolChange class <category>instance creation</category>
class: aClass oldProtocol: oldSymbol newProtocol: newSymbol ^(self new) changeClass: aClass; protocol: oldSymbol; newProtocol: newSymbol; isData: false; yourself
nameSpace: aNameSpace oldProtocol: oldSymbol newProtocol: newSymbol ^(self new) objectName: aNameSpace fullName; protocol: oldSymbol; newProtocol: newSymbol; isData: true; yourself
</methods> <methods> Refactory.Browser.RefactoryVariableChange <category>comparing</category>
= aRefactoryVariableChange ^super = aRefactoryVariableChange and: [variable = aRefactoryVariableChange variable]
hash ^self class hash bitXor: variable hash
</methods> <methods> Refactory.Browser.RefactoryVariableChange <category>private</category>
changeSymbol self subclassResponsibility
primitiveExecute | changeSymbol | changeSymbol := self changeSymbol. self changeObject perform: changeSymbol with: self variable
variable ^variable
</methods> <methods> Refactory.Browser.RefactoryVariableChange <category>initialize-release</category>
class: aBehavior variable: aString self changeClass: aBehavior. variable := aString
</methods> <methods> Refactory.Browser.RemoveOverrideChange <category>private</category>
primitiveExecute Override removeOverride: override
</methods> <methods> Refactory.Browser.RemoveOverrideChange <category>converting</category>
asUndoOperation ^AddOverrideChange for: override
</methods> <methods> Refactory.Browser.RemoveOverrideChange <category>printing</category>
changeString ^((#RemoveOverrideFor1s << #browser >> 'Remove Override for <1s>') expandMacrosWith: override printString)
</methods> <methods> Refactory.Browser.AddInstanceVariableChange <category>private</category>
changeSymbol ^#addInstVarName:
</methods> <methods> Refactory.Browser.AddInstanceVariableChange <category>printing</category>
changeString ^(#AddInstVar1sFrom2s << #browser >> 'Add instance variable named, <1s>, to <2s>') expandMacrosWith: variable with: self displayClassName
printOn: aStream aStream nextPutAll: self displayClassName; space; nextPutAll: self changeSymbol; space; nextPutAll: variable; nextPut: $!
</methods> <methods> Refactory.Browser.AddInstanceVariableChange <category>converting</category>
asUndoOperation ^RemoveInstanceVariableChange remove: variable from: self changeObject
</methods> <methods> Refactory.Browser.AddInstanceVariableChange class <category>instance creation</category>
add: aVariable to: aBehavior ^(self new) class: aBehavior variable: aVariable; yourself
</methods> <methods> Refactory.Browser.AddClassDefinitionToParcelChange <category>private</category>
primitiveExecute self parcel addClass: self changeObject
undoClass ^RemoveClassDefinitionFromParcelChange
</methods> <methods> Refactory.Browser.RemoveNameSpaceFromParcelChange <category>private</category>
primitiveExecute self parcel removeNameSpace: self changeObject
undoClass ^AddNameSpaceToParcelChange
</methods> <methods> Refactory.Browser.RenameInstanceVariableChange <category>printing</category>
changeString ^#RenameInstVar1sTo2sFor3s << #browser >> 'Rename instance variable named <1s> to <2s> for <3s>' expandMacrosWith: variable with: newName with: self displayClassName
printOn: aStream | keywords | keywords := self changeSymbol keywords. aStream nextPutAll: self displayClassName; space; nextPutAll: keywords first; space; nextPutAll: variable; space; nextPutAll: (keywords at: 2); space; newName; nextPut: $!
</methods> <methods> Refactory.Browser.RenameInstanceVariableChange <category>accessing</category>
asUndoOperation ^self class rename: newName to: variable in: self changeObject
newName ^newName
</methods> <methods> Refactory.Browser.RenameInstanceVariableChange <category>private</category>
changeSymbol ^#changeInstVarName:to:
newName: aString newName := aString
primitiveExecute | changeSymbol | changeSymbol := self changeSymbol. self changeObject perform: changeSymbol with: self variable with: newName
</methods> <methods> Refactory.Browser.RenameInstanceVariableChange <category>comparing</category>
= aRenameInstanceVariableChange ^super = aRenameInstanceVariableChange and: [newName = aRenameInstanceVariableChange newName]
hash ^super hash bitXor: newName hash
</methods> <methods> Refactory.Browser.RenameInstanceVariableChange class <category>instance creation</category>
rename: aVariable to: aNewName in: aClass ^(self new) class: aClass variable: aVariable; newName: aNewName; yourself
</methods> <methods> Refactory.Browser.RemoveMethodChange <category>comparing</category>
= aRemoveMethodChange ^super = aRemoveMethodChange and: [selector = aRemoveMethodChange selector]
hash ^selector hash
</methods> <methods> Refactory.Browser.RemoveMethodChange <category>private</category>
primitiveExecute ^self changeObject removeSelector: selector
selector ^selector
</methods> <methods> Refactory.Browser.RemoveMethodChange <category>initialize-release</category>
selector: aSymbol selector := aSymbol
</methods> <methods> Refactory.Browser.RemoveMethodChange <category>converting</category>
asUndoOperation ^(AddMethodChange compile: (self methodSourceFor: self selector) in: self changeObject) copyAttributesFrom: self selector; yourself
</methods> <methods> Refactory.Browser.RemoveMethodChange <category>printing</category>
changeString ^(#RemoveMethod2s1s << #browser >> 'Remove method, <2s>>><1s>') expandMacrosWith: selector with: self displayClassName
originalCode ^(self changeObject includesSelector: self selector) ifTrue: [self methodSourceFor: self selector] ifFalse: ['']
printOn: aStream aStream nextPutAll: self displayClassName; nextPutAll: ' removeSelector: #'; nextPutAll: selector; nextPut: $!
</methods> <methods> Refactory.Browser.RemoveMethodChange class <category>instance creation</category>
remove: aSymbol from: aClass ^(self new) changeClass: aClass; selector: aSymbol; yourself
</methods> <methods> Refactory.Browser.MoveToProtocolChange <category>testing</category>
includesProtocol ^self protocolObject organization categories includes: self protocol
</methods> <methods> Refactory.Browser.MoveToProtocolChange <category>accessing</category>
symbol ^symbol
symbol: aSymbol symbol := aSymbol
</methods> <methods> Refactory.Browser.MoveToProtocolChange <category>private</category>
primitiveExecute self includesProtocol ifTrue: [super primitiveExecute]. self protocolObject classifySymbol: symbol under: self protocol. self logProtocolChange: self protocolObject printString , ' organization classify: ' , symbol printString , ' under: ' , self protocol printString.
</methods> <methods> Refactory.Browser.MoveToProtocolChange <category>printing</category>
changeString ^((#Move1sTo2sIn3s << #browser >> 'Move <1s>, to <2s> in <3s>') expandMacrosWith: symbol with: self protocol with: self protocolObject printString)
</methods> <methods> Refactory.Browser.MoveToProtocolChange <category>converting</category>
asUndoOperation | compositeChange category | compositeChange := CompositeRefactoryChange named: self name. category := self protocolObject organization categoryOfElement: self symbol. compositeChange addChange: ((self copy) protocol: category; yourself). self includesProtocol ifFalse: [compositeChange addChange: (self isData ifTrue: [RemoveProtocolChange nameSpace: self changeObject protocol: self protocol] ifFalse: [RemoveProtocolChange class: self changeObject protocol: self protocol])]. ^compositeChange
</methods> <methods> Refactory.Browser.MoveToProtocolChange class <category>instance creation</category>
class: aClass protocol: protocolSymbol symbol: aSymbol ^(self class: aClass protocol: protocolSymbol) symbol: aSymbol; yourself
nameSpace: aNameSpace protocol: protocolSymbol symbol: aSymbol ^(self nameSpace: aNameSpace protocol: protocolSymbol) symbol: aSymbol; yourself
</methods> <methods> Refactory.Browser.RefactoryChangeManager <category>private</category>
clearUndoRedoList undo := OrderedCollection new. redo := OrderedCollection new
</methods> <methods> Refactory.Browser.RefactoryChangeManager <category>initialize-release</category>
connectToChanges ChangeSet addDependent: self
disconnectFromChanges ChangeSet removeDependent: self
initialize undo := OrderedCollection new. redo := OrderedCollection new. isPerformingRefactoring := false. self connectToChanges
release super release. self disconnectFromChanges
</methods> <methods> Refactory.Browser.RefactoryChangeManager <category>testing</category>
hasRedoableOperations ^redo notEmpty
hasUndoableOperations ^undo notEmpty
</methods> <methods> Refactory.Browser.RefactoryChangeManager <category>public access</category>
addUndo: aRefactoringChange aRefactoringChange isNil ifTrue: [^self clearUndoRedoList]. undo addLast: aRefactoringChange. undo size > UndoSize ifTrue: [undo removeFirst]. redo := OrderedCollection new
ignoreChangesWhile: aBlock isPerformingRefactoring ifTrue: [^aBlock value]. isPerformingRefactoring := true. aBlock ensure: [isPerformingRefactoring := false]
performChange: aRefactoringChange self ignoreChangesWhile: [[self addUndo: aRefactoringChange execute] on: RefactoryChangeFailureNotification do: [:ex | ex return]]
performChange: aRefactoringChange withMessage: aString self ignoreChangesWhile: [[self addUndo: (aRefactoringChange executeWithMessage: aString)] on: RefactoryChangeFailureNotification do: [:ex | ex return]]
redoChange ^redo last
redoOperation redo isEmpty ifTrue: [^self]. self ignoreChangesWhile: [| change undoChange | change := redo removeLast. undoChange := change execute. undoChange isNil ifTrue: [self clearUndoRedoList] ifFalse: [undo add: undoChange]]
undoChange ^undo last
undoOperation undo isEmpty ifTrue: [^self]. self ignoreChangesWhile: [| change redoChange | change := undo removeLast. redoChange := change execute. redoChange isNil ifTrue: [self clearUndoRedoList] ifFalse: [redo add: redoChange]]
</methods> <methods> Refactory.Browser.RefactoryChangeManager <category>updating</category>
update: anAspectSymbol with: aParameter from: aSender | changeType | (aSender == ChangeSet and: [isPerformingRefactoring not]) ifFalse: [^self]. changeType := (anAspectSymbol isString ifTrue: [anAspectSymbol asString] ifFalse: ['class']) asLowercase. (changeType indexOfSubCollection: 'class' startingAt: 1) + (changeType indexOfSubCollection: 'selector' startingAt: 1) > 0 ifTrue: [self clearUndoRedoList]
</methods> <methods> Refactory.Browser.RefactoryChangeManager class <category>class initialization</category>
initialize self nuke. UndoSize := 5
obsolete self nuke. super obsolete.
undoSize ^UndoSize
undoSize: anInteger UndoSize := anInteger max: 0
</methods> <methods> Refactory.Browser.RefactoryChangeManager class <category>instance creation</category>
instance Instance isNil ifTrue: [Instance := self basicNew. Instance initialize]. ^Instance
new ^self shouldNotImplement
</methods> <methods> Refactory.Browser.RefactoryChangeManager class <category>public access</category>
nuke Instance notNil ifTrue: [Instance release]. Instance := nil
</methods> <methods> Refactory.Browser.CodeComponentCommentChange <category>initialize-release</category>
type: aSymbol type := aSymbol
</methods> <methods> Refactory.Browser.CodeComponentCommentChange <category>private</category>
commentObject type = #parcel ifTrue: [^Parcel parcelNamed: self objectName]. ^type = #package ifTrue: [self storeRegistry packageNamed: self objectName] ifFalse: [self storeRegistry bundleNamed: self objectName]
</methods> <methods> Refactory.Browser.CodeComponentCommentChange class <category>instance creation</category>
bundle: aBundleModel comment: aString ^(self new) objectName: aBundleModel name; type: #bundle; comment: aString; yourself
codeComponent: aCodeComponent comment: aString aCodeComponent isParcel ifTrue: [^self parcel: aCodeComponent comment: aString]. aCodeComponent isPackage ifTrue: [^self package: aCodeComponent comment: aString]. aCodeComponent isBundle ifTrue: [^self bundle: aCodeComponent comment: aString]. self error: (#UnknownCodeComponent << #browser >> 'Unknown code component')
package: aPackageModel comment: aString ^(self new) objectName: aPackageModel name; type: #package; comment: aString; yourself
parcel: aParcel comment: aString ^(self new) objectName: aParcel name; type: #parcel; comment: aString; yourself
</methods> <methods> Refactory.Browser.CurrentPackageChange <category>accessing</category>
changeObject ^nil
package ^packageName isNil ifTrue: [nil] ifFalse: [self storeRegistry packageNamed: packageName]
renameChangesForObject: aClassName to: newClassName
</methods> <methods> Refactory.Browser.CurrentPackageChange <category>printing</category>
changeString ^((#GenKey2 << #browser >> 'Make <1s> the default package for changes.') expandMacrosWith: (packageName isNil ifTrue: [(#none1 << #browser >> '(none)')] ifFalse: [packageName]))
</methods> <methods> Refactory.Browser.CurrentPackageChange <category>initialize-release</category>
package: aPackage packageName := aPackage isNil ifTrue: [nil] ifFalse: [aPackage name]
</methods> <methods> Refactory.Browser.CurrentPackageChange <category>private</category>
executeNotifying: aBlock | undo | undo := self class package: self storeRegistry currentPackage. undo name: self name. self storeRegistry currentPackage: self package. ^undo
</methods> <methods> Refactory.Browser.CurrentPackageChange <category>private-inspector accessing</category>
removeChange: aChange "Do nothing for leaf changes"
</methods> <methods> Refactory.Browser.CurrentPackageChange class <category>instance creation</category>
package: aPackage ^(self new) package: aPackage; yourself
</methods> <methods> Refactory.Browser.RemoveInstanceVariableChange <category>printing</category>
changeString ^(#RemoveInstVar1sFrom2s << #browser >> 'Remove instance variable named, <1s>, from <2s>') expandMacrosWith: variable with: self displayClassName
printOn: aStream aStream nextPutAll: self displayClassName; space; nextPutAll: self changeSymbol; space; nextPutAll: variable; nextPut: $!
</methods> <methods> Refactory.Browser.RemoveInstanceVariableChange <category>private</category>
changeSymbol ^#removeInstVarName:
</methods> <methods> Refactory.Browser.RemoveInstanceVariableChange <category>converting</category>
asUndoOperation ^AddInstanceVariableChange add: variable to: self changeObject
</methods> <methods> Refactory.Browser.RemoveInstanceVariableChange class <category>instance creation</category>
remove: aVariable from: aBehavior ^(self new) class: aBehavior variable: aVariable; yourself
</methods> <methods> Refactory.Browser.RemoveClassDefinitionFromParcelChange <category>private</category>
primitiveExecute self parcel undefineClass: self changeObject
undoClass ^AddClassDefinitionToParcelChange
</methods> <methods> Kernel.Override class <category>RefactoringBrowser</category>
removeClassOrNameSpaceOverride: override | list | list := self overriddenClassesAndNameSpaces at: override object ifAbsent: [^self]. list remove: override ifAbsent: []. list isEmpty ifTrue: [self overriddenClassesAndNameSpaces removeKey: override object]
removeMethodOverride: override | dict list | dict := self overriddenMethods at: override owner ifAbsent: [^self]. list := dict at: override selector ifAbsent: [^self]. list remove: override ifAbsent: []. list isEmpty ifTrue: [dict removeKey: override selector]. dict isEmpty ifTrue: [self overriddenMethods removeKey: override owner]
removeOverride: override override isForMethod ifTrue: [^self removeMethodOverride: override]. override isForGeneral ifTrue: [^self removeSharedVariableOverride: override]. ^self removeClassOrNameSpaceOverride: override
removeSharedVariableOverride: override | dict list | dict := self overriddenStatics at: override owner ifAbsent: [^self]. list := dict at: override key ifAbsent: [^self]. list remove: override ifAbsent: []. list isEmpty ifTrue: [dict removeKey: override key]. dict isEmpty ifTrue: [self overriddenStatics removeKey: override owner]
</methods> <methods> Kernel.Override <category>RefactoringBrowser</category>
undoChangeObject self subclassResponsibility
</methods> <methods> Kernel.Parcel class <category>Refactoring Browser</category>
isBindingDefinedInParcel: aBinding aBinding isForClass ifTrue: [^self isClassDefinedInParcel: aBinding value]. ^(self parcelsDefiningBinding: aBinding) notEmpty
isClassDefinedInParcel: aClass | classParcels | classParcels := self parcelsForClass: aClass. classParcels isNil ifTrue: [^false]. ^classParcels contains: [:each | each definesClass: aClass]
isSelector: aSelector parceledInClass: aClass | methodParcels | methodParcels := self parcelsForClass: aClass. methodParcels isNil ifTrue: [^false]. ^methodParcels contains: [:each | each definesSelector: aSelector forClass: aClass]
parcelsDefiningBinding: aBinding | bindingParcels | bindingParcels := self parcelsForBinding: aBinding. bindingParcels isNil ifTrue: [^#()]. aBinding isForGeneral ifTrue: [^bindingParcels]. ^aBinding isForClass ifTrue: [bindingParcels select: [:each | each definesClass: aBinding value]] ifFalse: [bindingParcels select: [:each | each definesObject: aBinding value]]
parcelsDefiningClass: aClass | classParcels | classParcels := self parcelsForClass: aClass. classParcels isNil ifTrue: [^#()]. ^classParcels select: [:each | each definesClass: aClass]
parcelsDefiningNameSpace: aNameSpace | nameSpaceParcels | nameSpaceParcels := self parcelsForClassOrNameSpace: aNameSpace. nameSpaceParcels isNil ifTrue: [^#()]. ^nameSpaceParcels select: [:each | each definesObject: aNameSpace]
parcelsDefiningSelector: aSelector inClass: aClass | methodParcels | methodParcels := self parcelsForClass: aClass. methodParcels isNil ifTrue: [^#()]. ^methodParcels select: [:each | each definesSelector: aSelector forClass: aClass]
</methods> <methods> Kernel.Parcel <category>Refactoring Browser</category>
isUnparceledParcel ^false
</methods> <methods> Kernel.NameSpaceImport <category>testing</category>
isDrillDown ^drillDown
isPrivate ^private
</methods> <methods> Kernel.OverridenNameSpace <category>Refactoring Browser</category>
undoChangeObject | change | change := Refactory.Browser.AddNameSpaceChange definition: self object definition. change parcels: (Parcel parcelsDefiningClass: self object). change package: (change packageForNameSpace: self object). ^change
</methods> <methods> Kernel.OverridenClass <category>Refactoring Browser</category>
undoChangeObject | change | change := Refactory.Browser.AddClassChange definition: self object definition. change parcels: (Parcel parcelsDefiningClass: self object). change package: (change packageForClassDefinition: self object). ^change
</methods> <methods> Kernel.OverridenMethod <category>Refactoring Browser</category>
undoChangeObject | change | change := Refactory.Browser.AddMethodChange compile: (self implementingClass sourceCodeAt: self selector) in: self implementingClass. change parcels: (Parcel parcelsDefiningSelector: self selector inClass: self implementingClass). change package: (change packageForClass: self implementingClass selector: self selector). ^change
</methods> <methods> Kernel.OverridenStatic <category>Refactoring Browser</category>
undoChangeObject | change | change := Refactory.Browser.AddSharedVariableChange definition: (self owner asNameSpace definitionOfStatic: self object). change parcels: (Parcel parcelsDefiningBinding: self object). change package: (change packageForSharedVariable: self key in: self owner). ^change
</methods> <initialize> Refactory.Browser.RefactoryChangeManager </initialize> "Imported Classes:" self error: 'Attempting to file-in parcel imports. Choose terminate or close' <class> <name>Object</name> <environment>Core</environment> <super></super> <private>false</private> none <imports></imports> <category>Kernel-Objects</category> <attributes> <package>Kernel-Objects</package> </attributes> </class> <class> <name>Override</name> <environment>Kernel</environment> <super>Core.Object</super> <private>false</private> none sources definition <imports></imports> <category>System-Overrides</category> <attributes> <package>System-Overrides</package> </attributes> </class> <class> <name>OverridenStatic</name> <environment>Kernel</environment> <super>Kernel.Override</super> <private>false</private> objects <imports></imports> <category>System-Overrides</category> <attributes> <package>System-Overrides</package> </attributes> </class> <class> <name>Parcel</name> <environment>Kernel</environment> <super>Kernel.CodeComponent</super> <private>false</private> none definedObjects definedClasses definedBindings classSelectors namedObjects dirty loaded parcels classParcelMap parcelFileInfoCache parcelFileDirectoryCache dependents <imports></imports> <category>System-Code Components</category> <attributes> <package>System-Code Components</package> </attributes> </class> <class> <name>NameSpaceImport</name> <environment>Kernel</environment> <super>Kernel.BindingReference</super> <private>false</private> none drillDown private <imports></imports> <category>System-Name Spaces</category> <attributes> <package>System-Name Spaces</package> </attributes> </class> <class> <name>OverridenMethod</name> <environment>Kernel</environment> <super>Kernel.Override</super> <private>false</private> none selector protocol instVarNames <imports></imports> <category>System-Overrides</category> <attributes> <package>System-Overrides</package> </attributes> </class> <class> <name>OverridenNameSpace</name> <environment>Kernel</environment> <super>Kernel.Override</super> <private>false</private> none comment documentation <imports></imports> <category>System-Overrides</category> <attributes> <package>System-Overrides</package> </attributes> </class> <class> <name>OverridenClass</name> <environment>Kernel</environment> <super>Kernel.Override</super> <private>false</private> objects comment documentation <imports></imports> <category>System-Overrides</category> <attributes> <package>System-Overrides</package> </attributes> </class> <class> <name>Notification</name> <environment>Core</environment> <super>Core.Exception</super> <private>false</private> none <imports></imports> <category>Kernel-Exception Handling</category> <attributes> <package>Kernel-Exception Handling</package> </attributes> </class>