From VisualWorks®, 7.6 of 8. Februar 2008 on 28. Februar 2008 at 6:33:13 (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>AD2CodingAssistant</name> <environment>ICC.ADvance</environment> <super>ICC.ICC1ApplicationModel</super> <private>false</private> none tabs className clientRelations defineReadAccessor defineWriteAccessor addChangedMessage protocols <imports></imports> <category>IC&C ADvance Core</category> <attributes> <package>ADvance2PlugIns</package> </attributes> </class> <comment> ICC.ADvance.AD2CodingAssistant
This class helps defining access methods for client relations. It behaves much like the CodingAssistant. Instance Variables: tabs <SelectionInList> protocols <MultiSelectionInList> className <ValueHolder on: Symbol> clientRelations <MultiSelectionInList> defineReadAccessor <ValueHolder on: Boolean> defineWriteAccessor <ValueHolder on: Boolean> addChangedMessage <ValueHolder on: Boolean> Class Variables: MRUClasses <AD2MRUList of: Symbol> Names of the most recently used classes. @Name Coding Assistant @Copyright 1995-2002 IC&C GmbH
</comment> <class> <name>AD2CommentGenerator</name> <environment>ICC.ADvance</environment> <super>ICC.ICC1ApplicationModel</super> <private>false</private> none classList <imports></imports> <category>IC&C ADvance Core</category> <attributes> <package>ADvance2PlugIns</package> </attributes> </class> <comment> ICC.ADvance.AD2CommentGenerator
This class provides services for generating comment stubs and comment error reports for sets of classes. It heavily depends on class ClassDeclarations contained in the PPD Advanced tools product. The Advanced tools are a prerequisite of this Comment Generator. The Comment Generator invokes ClassDeclarations for the current or a selected subject and then runs all checks on it. Instance variables: classList <SelectionInList on: Class> To-Do: o Check whether there are instances of classes under investigation. Otherwise notify user. @Name Comment Generator @Copyright 1997-2002 IC&C GmbH
</comment> <class> <name>ADSmalllintConnect</name> <environment>ICC.ADvance</environment> <super>Core.Object</super> <private>false</private> none <imports></imports> <category>IC&C ADvance Core</category> <attributes> <package>ADvance2PlugIns</package> </attributes> </class> <comment> ICC.ADvance.ADSmalllintConnect
This class provides a connection to Smalllint. It invokes Smalllint for the current or a selected subject and then runs all checks on it. @Name Smalllint Connect @Copyright 1997-2002 IC&C GmbH
</comment> <class> <name>AD2Definer</name> <environment>ICC.ADvance</environment> <super>Tools.UIDefiner</super> <private>false</private> none registeredJobs <imports></imports> <category>IC&C ADvance Core</category> <attributes> <package>ADvance2PlugIns</package> </attributes> </class> <comment> ICC.ADvance.AD2Definer
This class helps you defining accessor methods for client relations. To use it do the following steps: 1. Create a definer for a the target class via AD2Definer class>>for: aClass. 2. Register the client relations you want to define access methods by a) registerReadDefinitionForAll: aCollectionOfClientRelations or b) registerWriteDefinitionForAll: aCollectionOfClientRelations addChangedMessage: aBoolean. 3. Send the definer a #doDefine message. Instance Variables: registeredJobs <OrderedCollection of: (Association key: Symbol value: IT1ClientRelation)> A collection describing what to define. Class Variables: ConfirmReplacement <Boolean> Shall the user confirm the method replacement?
</comment> <name>ConfirmReplacement</name> <environment>ICC.ADvance.AD2Definer</environment> <private>false</private> <constant>false</constant> <category>As yet unclassified</category> <attributes> <package>ADvance2PlugIns</package> </attributes> <name>MRUClasses</name> <environment>ICC.ADvance.AD2CodingAssistant</environment> <private>false</private> <constant>false</constant> <category>As yet unclassified</category> <attributes> <package>ADvance2PlugIns</package> </attributes> <methods> ICC.ADvance.AD2CodingAssistant <category>aspects</category>
addChangedMessage ^addChangedMessage isNil ifTrue: [addChangedMessage := false asValue] ifFalse: [addChangedMessage]
className ^className
clientRelations ^clientRelations isNil ifTrue: [clientRelations := MultiSelectionInList new] ifFalse: [clientRelations]
defineReadAccessor ^defineReadAccessor isNil ifTrue: [defineReadAccessor := true asValue] ifFalse: [defineReadAccessor]
defineWriteAccessor ^defineWriteAccessor isNil ifTrue: [defineWriteAccessor := true asValue] ifFalse: [defineWriteAccessor]
protocols ^protocols isNil ifTrue: [protocols := MultiSelectionInList new list: self class standardProtocols] ifFalse: [protocols]
tabs "Answer a SelectionInList for the tabs." tabs isNil ifTrue: [tabs := SelectionInList with: self labelArray. tabs selectionIndex: 1. tabs selectionIndexHolder onChangeSend: #tabsChanged to: self]. ^tabs
</methods> <methods> ICC.ADvance.AD2CodingAssistant <category>changing</category>
changedClassName | newClassName | self readClientRelations. self checkDefineButton. newClassName := self className value. newClassName isNil ifTrue: [^self]. (self adBasics systemEnvironment includesKey: newClassName) ifFalse: [^self classIsAbsent: newClassName]. self class lastClassName: newClassName. self setWindowLabel
changedDefineWriteAccessor self iccEnable: self defineWriteAccessor value group: #(#addChangedMessage). self checkDefineButton
checkDefineButton self iccEnable: (self protocols selections isEmpty not or: [self clientRelations selections isEmpty not and: [self defineReadAccessor value or: [self defineWriteAccessor value]]]) group: #(#defineAccessors)
tabsChanged | tabIndex | tabIndex := self tabs selectionIndex. (self builder componentAt: #tabbing) widget client: self spec: (self specArray at: tabIndex) builder: self builder
</methods> <methods> ICC.ADvance.AD2CodingAssistant <category>actions</category>
chooseClass | aClassOrNil | (aClassOrNil := self adDialog pickClassFor: self builder window) isNil ifTrue: [^self]. self className value: aClassOrNil fullName
clearAllClientRelations self clientRelations clearAll
defineAccessors | selections aDefiner | selections := self clientRelations selections. self targetClass isNil ifTrue: [self classIsAbsent: self className value. ^self className value: nil]. aDefiner := self class definerClass for: self targetClass. self defineReadAccessor value ifTrue: [aDefiner registerReadDefinitionForAll: selections]. self defineWriteAccessor value ifTrue: [aDefiner registerWriteDefinitionForAll: selections addChangedMessage: self addChangedMessage value]. aDefiner doDefine
selectAllClientRelations self clientRelations selectAll
</methods> <methods> ICC.ADvance.AD2CodingAssistant <category>private</category>
classIsAbsent: aClassName self class mruClasses remove: aClassName. self adDialog warn: ('Class <1p> doesn''t exist.' expandMacrosWith: aClassName asString ) for: self builder window
labelArray "Answer an Array with the tab labels." ^#('Attributes')
setWindowLabel | labelPrefix | labelPrefix := self class plugInName. self builder window label: (self targetClass isNil ifTrue: [labelPrefix] ifFalse: ['<1s> - [<2s>]' expandMacrosWith: labelPrefix with: self targetClass name])
specArray "Answer an Array with specification names for the tab pages." ^#(#attributesSpec)
</methods> <methods> ICC.ADvance.AD2CodingAssistant <category>initialize-release</category>
initialize super initialize. className := nil asValue onChangeSend: #changedClassName to: self. self clientRelations selectionIndexHolder onChangeSend: #checkDefineButton to: self. self protocols selectionIndexHolder onChangeSend: #checkDefineButton to: self. self defineReadAccessor onChangeSend: #checkDefineButton to: self. self defineWriteAccessor onChangeSend: #changedDefineWriteAccessor to: self
</methods> <methods> ICC.ADvance.AD2CodingAssistant <category>interface opening</category>
postBuildWith: aBuilder | mruClassName component | super postBuildWith: aBuilder. self setWindowLabel. (component := aBuilder componentAt: #clientRelations) isNil ifFalse: [component widget displayStringSelector: #extendedRoleName]. mruClassName := self class lastClassName. (self adBasics systemEnvironment includesKey: mruClassName) ifTrue: [self className value: mruClassName] ifFalse: [self class mruClasses remove: mruClassName. self readClientRelations. self checkDefineButton]
postOpenWith: aBuilder super postOpenWith: aBuilder. self tabsChanged
</methods> <methods> ICC.ADvance.AD2CodingAssistant <category>updating</category>
readClientRelations | targetClass | targetClass := self targetClass. self clientRelations list: (targetClass isNil ifTrue: [OrderedCollection new] ifFalse: [targetClass clientRelations])
updateClientRelations | oldSelections | oldSelections := self clientRelations selections. self readClientRelations. self clientRelations selections: oldSelections
</methods> <methods> ICC.ADvance.AD2CodingAssistant <category>accessing</category>
targetClass ^self adBasics systemEnvironment at: self className value ifAbsent: [nil]
</methods> <methods> ICC.ADvance.AD2CodingAssistant class <category>resources</category>
applicationLogo ^self resources opaqueImageFor: self named: #applicationImage
</methods> <methods> ICC.ADvance.AD2CodingAssistant class <category>info</category>
applicationName ^self plugInName
versionId ^#('7.0' '03/28/02')
</methods> <methods> ICC.ADvance.AD2CodingAssistant class <category>implementation classes</category>
definerClass "Answer the definer class." ^AD2Definer
plugInAPI "^<nil | Class> Answer the ADvance plug-in API class or nil if absent." ^(Object includesSelector: #advance) ifTrue: [(Object perform: #advance) plugInAPI] ifFalse: [nil]
</methods> <methods> ICC.ADvance.AD2CodingAssistant class <category>class initialization</category>
initialize "self initialize" self initializeMRUClasses. self plugInInstall
obsolete "This class is being removed from the system. Reset the class variable and de-install me." self uninitialize. super obsolete
uninitialize "This class is being removed from the system. Reset the class variable and de-install me." MRUClasses := nil. self plugInAPI isNil ifFalse: [self plugInAPI deinstallPlugIn: self].
</methods> <methods> ICC.ADvance.AD2CodingAssistant class <category>private initialization</category>
initializeMRUClasses MRUClasses := ICC.ADvance.AD2MRUList limit: 10
</methods> <methods> ICC.ADvance.AD2CodingAssistant class <category>accessing</category>
lastClassName ^self mruClasses isEmpty ifTrue: [nil] ifFalse: [self mruClasses mostRecentlyUsed]
lastClassName: aClassName self mruClasses add: aClassName
mruClasses "Answers the value of the shared variable. Lazy initialization is implemented, because class initialize is not always involved during reloading." MRUClasses isNil ifTrue: [self initializeMRUClasses]. ^MRUClasses
</methods> <methods> ICC.ADvance.AD2CodingAssistant class <category>plug-in methods</category>
markedAsADvancePlugIn "This class provides a plug-in interface for ADvance."
plugInInstall (self plugInAPI notNil and: ['*' match: self plugInAPI getAPIVersion]) ifTrue: [self plugInAPI installPlugIn: self]
plugInName ^'Coding Assistant'
plugInOpen "Open an instance of myself." self open
plugInOpenForPainter: aPainter "Open an instance of myself for aPainter. If aPainter has one class selected use it as target class." | selectedClasses | selectedClasses := aPainter selectedClasses. selectedClasses size = 1 ifTrue: [self openFor: selectedClasses first domain] ifFalse: [self plugInOpen]
plugInShowAboutDialog self adDialog aboutDialogClass showInfo: self for: nil
plugInShutdown "Do nothing."
</methods> <methods> ICC.ADvance.AD2CodingAssistant class <category>constants</category>
standardProtocols ^#('accessing' 'actions' 'adding-removing' 'aspects' 'backward compatibility' 'changing' 'comparing' 'converting' 'copying' 'displaying' 'initialize-release' 'interface opening' 'printing' 'private' 'testing' 'updating' '$accessing' '$constants' '$class initialization' '$instance creation' '$interface opening')
</methods> <methods> ICC.ADvance.AD2CodingAssistant class <category>interface opening</category>
openFor: aClass "Create a running instance of the application using aClass as target." self lastClassName: aClass fullName. ^self open
</methods> <methods> ICC.ADvance.AD2CommentGenerator <category>testing</category>
classDeclarationsIsAbsent "Check and answer whether class ClassDeclarations from the Advanced tools product is absent." | systemEnvironment | systemEnvironment := self adBasics systemEnvironment. ^#(#ClassDeclarations) contains: [:each | (systemEnvironment includesKey: each) not]
</methods> <methods> ICC.ADvance.AD2CommentGenerator <category>aspects</category>
classList classList isNil ifTrue: [classList := MultiSelectionInList new]. ^classList
</methods> <methods> ICC.ADvance.AD2CommentGenerator <category>actions</category>
clearAll self classList clearAll
generateComments | commentModifications classes classesWithoutComment classesWithComment classesWithConfirmedOverwrite systemOrganization | systemOrganization := self adBasics systemOrganization. commentModifications := self computeCommentModifications. commentModifications isNil ifTrue: [^self]. commentModifications isEmpty ifTrue: [^self adDialog message: 'Nothing to generate.']. classes := commentModifications keys asOrderedCollection. classesWithoutComment := classes select: [:each | (systemOrganization commentFor: each) isEmpty]. classesWithComment := classes reject: [:each | (systemOrganization commentFor: each) isEmpty]. classesWithConfirmedOverwrite := self confirmedOverwritesFor: classesWithComment. classesWithoutComment , classesWithConfirmedOverwrite do: [:each | systemOrganization setComment: (commentModifications at: each) for: each]
generateReport | commentModifications aStream | commentModifications := self computeCommentModifications. commentModifications isNil ifTrue: [^self]. commentModifications isEmpty ifTrue: [^self adDialog message: 'Nothing to report.']. aStream := WriteStream on: (String new: 1000). commentModifications keysAndValuesDo: [:eachClass :eachComment | aStream nextPutAll: '===================================='; cr; nextPutAll: ('Declaration Error Report and comment template for class <1p>:' expandMacrosWith: eachClass printString); cr; cr; nextPutAll: eachComment; cr; cr]. ComposedTextView open: aStream contents asValue label: 'Declaration Error Reports and Comment Templates' icon: nil extent: 540 @ 400
selectAll self classList selectAll
</methods> <methods> ICC.ADvance.AD2CommentGenerator <category>private</category>
computeCommentModifications "^<nil | (Dictionary key: Class value: String> Check whether classDeclarations is absent. If so warn and answer nil. Otherwise generate a comment template for each selected class in the GUI's classList. Answer a dictionary that maps classes with modified comments to the new comments." | systemOrganization modifiedComments classDeclarations | self classDeclarationsIsAbsent ifTrue: [self adDialog message: 'This feature requires the ''Advanced Tools'' component!'. ^nil]. systemOrganization := self adBasics systemOrganization. classDeclarations := self adBasics systemEnvironment at: #{Tools.ClassDeclarations}. modifiedComments := IdentityDictionary new. Cursor wait showWhile: [self classList selections do: [:each | | oldComment newComment | oldComment := systemOrganization commentFor: each. newComment := (classDeclarations on: each) formatComment: oldComment. newComment ~= oldComment ifTrue: [modifiedComments at: each put: newComment]]]. ^modifiedComments
confirmedOverwritesFor: aCollectionOfClasses ^self adDialog requestSelection: aCollectionOfClasses dialogBlock: [self adDialog new thickMargin; title: 'Confirm Comment Replacement'; infoIcon: (self advance resources opaqueImageAt: #replace)] selectAllLabel: 'Replace all' messageBlock: [:each | 'Class <1p> already has a comment.<n><n>Do you want to replace it?' expandMacrosWith: each printString]
setWindowLabel self builder window label: self class plugInName
</methods> <methods> ICC.ADvance.AD2CommentGenerator <category>changing</category>
enableButtons self iccEnable: self classList selections isEmpty not group: #(#generateCommentsButton #generateReportButton)
</methods> <methods> ICC.ADvance.AD2CommentGenerator <category>interface opening</category>
postBuildWith: aBuilder super postBuildWith: aBuilder. self classList selectionIndexHolder onChangeSend: #enableButtons to: self. self enableButtons. self setWindowLabel
</methods> <methods> ICC.ADvance.AD2CommentGenerator class <category>info</category>
applicationName ^self plugInName
versionId ^#('7.0' '03/28/02')
</methods> <methods> ICC.ADvance.AD2CommentGenerator class <category>class initialization</category>
initialize "self initialize" self plugInInstall
obsolete "This class is being removed from the system. De-install me." self plugInAPI isNil ifFalse: [self plugInAPI deinstallPlugIn: self]. super obsolete
</methods> <methods> ICC.ADvance.AD2CommentGenerator class <category>plug-in methods</category>
markedAsADvancePlugIn "This class provides a plug-in interface for ADvance."
plugInInstall (self plugInAPI notNil and: ['*' match: self plugInAPI getAPIVersion]) ifTrue: [self plugInAPI installPlugIn: self]
plugInName ^'Comment Generator'
plugInOpen "Select a subject, then open myself on the selection." | subject | (subject := self advance chooseSubjectFor: nil) isNil ifTrue: [^self]. self openOn: subject selection: #()
plugInOpenForPainter: aPainter "Open an instance of myself on aPainter's subject." aPainter hasDomain ifFalse: [^self adDialog message: ('No diagram loaded. Can''t run <1s>.' expandMacrosWith: self plugInName) for: aPainter window]. self openOn: aPainter model domain selection: (aPainter selectedClasses collect: [:each | each domain])
plugInShowAboutDialog self adDialog aboutDialogClass showInfo: self for: nil
plugInShutdown "Do nothing."
</methods> <methods> ICC.ADvance.AD2CommentGenerator class <category>instance creation</category>
openOn: aSubject selection: aCollectionOfClasses "Check for existence of class ClassDeclarations. If available invoke it for aSubject's contents and run all checks." | subjectClasses anInstance | subjectClasses := aSubject allClasses asSortedCollection: [:a :b | a name <= b name]. anInstance := self new. anInstance classList list: subjectClasses; selections: aCollectionOfClasses. self openOn: anInstance
</methods> <methods> ICC.ADvance.AD2CommentGenerator class <category>implementation classes</category>
plugInAPI "^<nil | Class> Answer the ADvance plug-in API class or nil if absent." ^(Object includesSelector: #advance) ifTrue: [(Object perform: #advance) plugInAPI] ifFalse: [nil]
</methods> <methods> ICC.ADvance.ADSmalllintConnect <category>checking</category>
openFor: aSubject "Check for existence of appropriate Smalllint and Environment classes. If available run checks for aSubject." self smalllintIsAbsent ifTrue: [^self adDialog message: 'Smalllint classes are absent.\Can''t run checks.' withCRs]. self smalllintHasAppropriateVersion ifFalse: [^self adDialog message: 'The Smalllint version found in the system is incompatible.\Can''t run checks.' withCRs]. self runChecksFor: aSubject
runChecksFor: aSubject "Open Smalllint on an environment equal to aSubject's contents and run all checks." | system testEnvironment | system := self adBasics systemEnvironment. testEnvironment := (system at: #'Refactory.Browser.ClassEnvironment') onEnvironment: (system at: #'Refactory.Browser.BrowserEnvironment') new classes: OrderedCollection new. aSubject allClassesDo: [:each | testEnvironment addClass: each; addClass: each class]. [(system at: #'Refactory.Browser.Smalllint') runRule: (system at: #'Refactory.Browser.CompositeLintRule') lintChecks onEnvironment: testEnvironment] forkAt: Processor userBackgroundPriority
</methods> <methods> ICC.ADvance.ADSmalllintConnect <category>testing</category>
smalllintHasAppropriateVersion "Check and answer whether Smalllint has an appropriate version." ^true
smalllintIsAbsent "Check and answer whether class Smalllint is absent." ^'Refactory.Browser.Smalllint' asQualifiedReference isDefined not
</methods> <methods> ICC.ADvance.ADSmalllintConnect class <category>info</category>
applicationName ^self plugInName
versionId ^#('7.0' '03/28/02')
</methods> <methods> ICC.ADvance.ADSmalllintConnect class <category>class initialization</category>
initialize "self initialize" self plugInInstall
obsolete "This class is being removed from the system. De-install me." self plugInAPI isNil ifFalse: [self plugInAPI deinstallPlugIn: self]. super obsolete
</methods> <methods> ICC.ADvance.ADSmalllintConnect class <category>plug-in methods</category>
markedAsADvancePlugIn "This class provides a plug-in interface for ADvance."
plugInInstall (self plugInAPI notNil and: ['*' match: self plugInAPI getAPIVersion]) ifTrue: [self plugInAPI installPlugIn: self]
plugInName ^'Smalllint Connect'
plugInOpen "Select a subject, then open myself on the selection." | subject | (subject := self advance chooseSubjectFor: nil) isNil ifTrue: [^self]. self new openFor: subject
plugInOpenForPainter: aPainter "Open an instance of myself on aPainter's subject." aPainter hasDomain ifFalse: [^self adDialog message: ('No diagram loaded. Can''t run <1s>.' expandMacrosWith: self plugInName) for: aPainter window]. self new openFor: aPainter model domain
plugInShowAboutDialog self adDialog aboutDialogClass showInfo: self for: nil
plugInShutdown "Do nothing."
</methods> <methods> ICC.ADvance.ADSmalllintConnect class <category>implementation classes</category>
plugInAPI "^<nil | Class> Answer the ADvance plug-in API class or nil if absent." ^(Object includesSelector: #advance) ifTrue: [(Object perform: #advance) plugInAPI] ifFalse: [nil]
</methods> <methods> ICC.ADvance.AD2Definer <category>utility</category>
categoryFor: aClientRelation ^aClientRelation isWrapped ifTrue: [#aspects] ifFalse: [#accessing]
rawSelectorFor: aClientRelation "^<Symbol>" | selector | selector := aClientRelation roleName copy. (selector at: 1) isUppercase ifTrue: [selector at: 1 put: (selector at: 1) asLowercase]. ^selector
valueStringFor: aClientRelation | roleClass suffix | roleClass := aClientRelation roleClass. suffix := roleClass isNil ifTrue: ['Value'] ifFalse: [aClientRelation isMultiple ifTrue: ['Value'] ifFalse: [roleClass name]]. ^((suffix at: 1) isVowel ifTrue: ['an'] ifFalse: ['a']) , suffix
</methods> <methods> ICC.ADvance.AD2Definer <category>private</category>
confirmedOverwriteJobsFor: overwriteJobs ^self class confirmReplacement ifTrue: [self adDialog requestSelection: overwriteJobs dialogBlock: [(self adDialog new) thickMargin; title: 'Confirm Method Replacement'; infoIcon: (self advance resources opaqueImageAt: #replace)] selectAllLabel: 'Replace all' messageBlock: [:assoc | 'The method <1s>%>%><2s> already exists.<n><n>Do you want to replace it?' expandMacrosWith: (self targetClassFor: assoc value) name with:(self selectorFor: assoc) asString ]] ifFalse: [overwriteJobs]
definitionJobs | overwriteJobs nonOverwriteJobs confirmedOverwriteJobs | overwriteJobs := self registeredJobs select: [:each | self selectorExistsFor: each]. nonOverwriteJobs := self registeredJobs asSet - overwriteJobs. confirmedOverwriteJobs := self confirmedOverwriteJobsFor: overwriteJobs. ^nonOverwriteJobs addAll: confirmedOverwriteJobs; yourself
selectorExistsFor: anAssociation "^<Boolean> anAssociation <Association key: Symbol value: ITClientRelation>" | aClientRelation class selector | aClientRelation := anAssociation value. class := self targetClassFor: aClientRelation. selector := self selectorFor: anAssociation. ^class includesSelector: selector
selectorFor: anAssociation "^<Symbol> anAssociation <Association key: Symbol value: aClientRelation>" | selector | selector := self rawSelectorFor: anAssociation value. anAssociation key == #read ifFalse: [selector := selector copyWith: $:]. ^selector asSymbol
targetClassFor: aClientRelation ^aClientRelation meta ifTrue: [self targetClass class] ifFalse: [self targetClass]
</methods> <methods> ICC.ADvance.AD2Definer <category>private-defining</category>
defineReadAccessorFor: aClientRelation | selector aStream | aClientRelation hasInheritedImplementation ifTrue: [^self]. selector := (self rawSelectorFor: aClientRelation) asSymbol. aStream := (String new: 50) writeStream. aStream nextPutAll: ('<1s><n><t>^<2s>' expandMacrosWith: selector with: aClientRelation roleName). self adBasics systemOrganization compile: aStream contents classified: (self categoryFor: aClientRelation) for: (self targetClassFor: aClientRelation)
defineWriteAccessorFor: aClientRelation addChangedMessage: aBoolean | roleName selector valueString aStream | aClientRelation hasInheritedImplementation | aClientRelation isWrapped ifTrue: [^self]. selector := (self rawSelectorFor: aClientRelation) asSymbol. valueString := self valueStringFor: aClientRelation. roleName := aClientRelation roleName. aStream := (String new: 50) writeStream. aStream nextPutAll: ('<1s>: <2s><n><t><3s> := <2s>' expandMacrosWith: selector with: valueString with: roleName). aBoolean ifTrue: [aStream nextPutAll: ('.<n><t>self changed: #<1s>' expandMacrosWith: roleName)]. self adBasics systemOrganization compile: aStream contents classified: (self categoryFor: aClientRelation) for: (self targetClassFor: aClientRelation)
</methods> <methods> ICC.ADvance.AD2Definer <category>registration/defining</category>
doDefine self registeredJobs isEmpty ifTrue: [^self]. Transcript cr; show: 'Access method definition...'. self definitionJobs do: [:anAssociation | anAssociation key == #read ifTrue: [self defineReadAccessorFor: anAssociation value] ifFalse: [self defineWriteAccessorFor: anAssociation value addChangedMessage: anAssociation key == #writeWithChangedMessage]]. Transcript space; show: 'done'
registerReadDefinitionForAll: aCollectionOfClientRelations self registeredJobs addAll: (aCollectionOfClientRelations collect: [:each | #read -> each])
registerWriteDefinitionForAll: aCollectionOfClientRelations addChangedMessage: aBoolean | jobSymbol | jobSymbol := aBoolean ifTrue: [#writeWithChangedMessage] ifFalse: [#write]. self registeredJobs addAll: (aCollectionOfClientRelations collect: [:each | jobSymbol -> each])
</methods> <methods> ICC.ADvance.AD2Definer <category>initialize-release</category>
initialize super initialize. self registeredJobs: OrderedCollection new
</methods> <methods> ICC.ADvance.AD2Definer <category>private-accessing</category>
registeredJobs ^registeredJobs
registeredJobs: aValue registeredJobs := aValue
</methods> <methods> ICC.ADvance.AD2Definer class <category>accessing</category>
confirmReplacement ^ConfirmReplacement
confirmReplacement: aBoolean ConfirmReplacement := aBoolean
</methods> <methods> ICC.ADvance.AD2Definer class <category>class initialization</category>
initialize "self initialize" self confirmReplacement: true
</methods> <methods> ICC.ADvance.AD2CodingAssistant class <category>resources</category>
applicationImage "UIMaskEditor new openOnClass: self andSelector: #applicationImage" <resource: #image> ^CachedImage on: (Image extent: 18@16 depth: 3 bitsPerPixel: 4 palette: (MappedPalette withColors: ((Array new: 6) at: 1 put: ColorValue black; at: 2 put: (Graphics.ColorValue scaledRed: 6077 scaledGreen: 6077 scaledBlue: 6077); at: 3 put: ColorValue white; at: 4 put: ColorValue yellow; at: 5 put: (ColorValue scaledRed: 4112 scaledGreen: 4112 scaledBlue: 4112); at: 6 put: (ColorValue scaledRed: 0 scaledGreen: 0 scaledBlue: 6135); yourself)) usingBits: #[17 17 17 17 17 17 17 17 17 0 0 0 17 0 1 17 17 17 17 17 17 0 0 0 16 50 48 17 17 17 17 17 17 0 0 0 16 35 32 65 17 17 17 17 17 0 0 0 16 50 48 65 17 17 17 17 17 0 0 0 16 35 32 65 16 0 0 0 17 0 0 0 17 0 4 65 16 34 34 32 17 0 0 0 17 20 68 17 16 36 68 32 65 0 0 0 17 17 17 17 16 34 34 32 65 0 0 0 17 17 21 17 16 36 68 32 65 0 0 0 17 17 21 81 16 34 34 32 65 0 0 0 17 85 85 85 16 36 68 32 65 0 0 0 17 17 21 81 16 34 34 32 65 0 0 0 17 17 21 17 16 0 0 0 65 0 0 0 17 17 17 17 17 68 68 68 65 0 0 0 17 17 17 17 17 17 17 17 17 0 0 0])
attributesMenu "UIMenuEditor new openOnClass: self andSelector: #attributesMenu" <resource: #menu> ^#(#Menu #( #(#MenuItem #label: 'Select all' #accessCharacterPosition: 1 ) #(#MenuItem #label: 'Clear all' #accessCharacterPosition: 1 ) #(#MenuItem #label: 'Update' #accessCharacterPosition: 1 ) ) #(2 1 ) #(#selectAllClientRelations #clearAllClientRelations #updateClientRelations ) ) decodeAsLiteralArray
</methods> <methods> ICC.ADvance.AD2CodingAssistant class <category>interface specs</category>
attributesSpec "UIPainter new openOnClass: self andSelector: #attributesSpec" <resource: #canvas> ^#(#{UI.FullSpec} #window: #(#{UI.WindowSpec} #label: '' #min: #(#{Core.Point} 244 253 ) #max: #(#{Core.Point} 640 480 ) #bounds: #(#{Graphics.Rectangle} 513 355 888 655 ) ) #component: #(#{UI.SpecCollection} #collection: #( #(#{UI.SequenceViewSpec} #layout: #(#{Graphics.LayoutFrame} 10 0 10 0 -10 1 -82 1 ) #name: #clientRelations #model: #clientRelations #menu: #attributesMenu #multipleSelections: true ) #(#{UI.CheckBoxSpec} #layout: #(#{UI.AlignmentOrigin} 11 0 -54 1 0 1 ) #model: #defineReadAccessor #label: 'Define read accessor' ) #(#{UI.CheckBoxSpec} #layout: #(#{UI.AlignmentOrigin} 11 0 -30 1 0 1 ) #model: #defineWriteAccessor #label: 'Define write accessor' ) #(#{UI.CheckBoxSpec} #layout: #(#{UI.AlignmentOrigin} 25 0 -6 1 0 1 ) #name: #addChangedMessage #model: #addChangedMessage #label: 'Add changed message' ) #(#{UI.ActionButtonSpec} #layout: #(#{Graphics.LayoutFrame} -105 1 -33 1 -10 1 -10 1 ) #name: #defineAccessors #model: #defineAccessors #label: 'Define' ) ) ) )
windowSpec "UIPainter new openOnClass: self andSelector: #windowSpec" <resource: #canvas> ^#(#{UI.FullSpec} #window: #(#{UI.WindowSpec} #label: 'Assistant' #min: #(#{Core.Point} 325 218 ) #max: #(#{Core.Point} 390 381 ) #bounds: #(#{Graphics.Rectangle} 526 266 916 647 ) ) #component: #(#{UI.SpecCollection} #collection: #( #(#{UI.ActionButtonSpec} #layout: #(#{Graphics.LayoutFrame} -227 1 -30 1 -119 1 -7 1 ) #model: #chooseClass #label: 'Pick class...' ) #(#{UI.ActionButtonSpec} #layout: #(#{Graphics.LayoutFrame} -113 1 -30 1 -6 1 -7 1 ) #model: #closeRequest #label: 'Close' ) #(#{TabControlSpec} #layout: #(#{Graphics.LayoutFrame} 6 0 6 0 -6 1 -36 1 ) #name: #tabbing #model: #tabs #labels: #() ) ) ) )
</methods> <methods> ICC.ADvance.AD2CommentGenerator class <category>resources</category>
classListMenu "MenuEditor new openOnClass: self andSelector: #classListMenu" <resource: #menu> ^#(#Menu #( #(#MenuItem #rawLabel: 'Select all' #value: #selectAll ) #(#MenuItem #rawLabel: 'Clear all' #value: #clearAll ) #(#MenuItem #rawLabel: 'Generate...' #value: #generateComments ) #(#MenuItem #rawLabel: 'Report...' #value: #generateReport ) ) #(2 2 ) nil ) decodeAsLiteralArray
</methods> <methods> ICC.ADvance.AD2CommentGenerator class <category>interface specs</category>
windowSpec "UIPainter new openOnClass: self andSelector: #windowSpec" <resource: #canvas> ^#(#FullSpec #window: #(#WindowSpec #label: ' ' #min: #(#Point 40 20 ) #bounds: #(#Rectangle 178 179 474 491 ) ) #component: #(#SpecCollection #collection: #( #(#ActionButtonSpec #layout: #(#LayoutFrame -227 1 -30 1 -119 1 -7 1 ) #name: #generateCommentsButton #model: #generateComments #label: 'Generate...' ) #(#ActionButtonSpec #layout: #(#LayoutFrame -113 1 -30 1 -6 1 -7 1 ) #name: #generateReportButton #model: #generateReport #label: 'Report...' ) #(#SequenceViewSpec #layout: #(#LayoutFrame 6 0 28 0 -6 1 -40 1 ) #model: #classList #menu: #classListMenu #multipleSelections: true #useModifierKeys: true #selectionType: #checkMark ) #(#LabelSpec #layout: #(#Point 6 4 ) #label: 'Classes:' ) ) ) )
</methods> <initialize> ICC.ADvance.AD2CodingAssistant </initialize> <initialize> ICC.ADvance.AD2CommentGenerator </initialize> <initialize> ICC.ADvance.ADSmalllintConnect </initialize> <initialize> ICC.ADvance.AD2Definer </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>UIDefiner</name> <environment>Tools</environment> <super>Core.Object</super> <private>false</private> none aClass initializeModels excludedBindings <imports></imports> <category>UIPainter-Support</category> <attributes> <package>UIPainter</package> </attributes> </class> <class> <name>ICC1ApplicationModel</name> <environment>ICC</environment> <super>UI.ApplicationModel</super> <private>false</private> none <imports></imports> <category>IC&C ADvance Support</category> <attributes> <package>ICCCommonClasses</package> </attributes> </class>