'From Pharo3.0 of 18 March 2013 [Latest update: #30290] on 22 July 2013 at 1:46:46 pm'! !MethodToolbar methodsFor: 'initialization' stamp: 'BenjaminVanRyseghem 6/12/2012 18:00'! initialize "Initialization code for MethodToolbar" methodHolder := nil asValueHolder. model := AbstractTool new. super initialize.! ! !MethodToolbar methodsFor: 'initialization' stamp: 'BenjaminVanRyseghem 6/12/2012 18:00'! initialize "Initialization code for MethodToolbar" methodHolder := nil asValueHolder. model := AbstractTool new. super initialize.! ! !WorkingCopyToolBar methodsFor: 'initialize' stamp: 'BenjaminVanRyseghem 6/12/2012 18:45'! initialize "Initialization code for WorkingCopyToolBar" super initialize. workingCopyHolder := nil asValueHolder! ! !WorkingCopyToolBar methodsFor: 'initialize' stamp: 'BenjaminVanRyseghem 6/12/2012 18:45'! initialize "Initialization code for WorkingCopyToolBar" super initialize. workingCopyHolder := nil asValueHolder! ! !ColorEditor methodsFor: 'initialize' stamp: 'BenjaminVanRyseghem 7/16/2012 19:15'! initialize "Initialization code for ColorEditor" super initialize. color := Color black asValueHolder. morph := Morph new color: self color; extent: 25@25; yourself! ! !ColorEditor methodsFor: 'initialize' stamp: 'BenjaminVanRyseghem 7/16/2012 19:15'! initialize "Initialization code for ColorEditor" super initialize. color := Color black asValueHolder. morph := Morph new color: self color; extent: 25@25; yourself! ! !MonticelloRepositoryBrowser methodsFor: 'initialize' stamp: 'BenjaminVanRyseghem 6/12/2012 18:41'! initialize "Initialization code for MonticelloRepositoryBrowser" super initialize. order := self class order! ! !MonticelloRepositoryBrowser methodsFor: 'initialize' stamp: 'BenjaminVanRyseghem 6/12/2012 18:41'! initialize "Initialization code for MonticelloRepositoryBrowser" super initialize. order := self class order! ! !ChangeSorterApplication methodsFor: 'initialization' stamp: 'StephaneDucasse 12/18/2012 17:14'! initialize "Initialization code for ChangeSorterApplication" prettyPrint := false. showDiff := false. model := ChangeSorterModel new. SystemAnnouncer uniqueInstance weak on: CurrentChangeSetChanged do: [:each | self updateTitle]. super initialize. self initializeAnnouncements. ! ! !ChangeSorterApplication methodsFor: 'initialization' stamp: 'StephaneDucasse 12/18/2012 17:14'! initialize "Initialization code for ChangeSorterApplication" prettyPrint := false. showDiff := false. model := ChangeSorterModel new. SystemAnnouncer uniqueInstance weak on: CurrentChangeSetChanged do: [:each | self updateTitle]. super initialize. self initializeAnnouncements. ! ! !STEditor methodsFor: 'initialize' stamp: 'BenjaminVanRyseghem 7/12/2012 18:18'! initialize "Initialization code for BlocEditor" super initialize. object := nil asValueHolder! ! !STEditor methodsFor: 'initialize' stamp: 'BenjaminVanRyseghem 7/12/2012 18:18'! initialize "Initialization code for BlocEditor" super initialize. object := nil asValueHolder! ! !BlocEditor methodsFor: 'initialize' stamp: 'BenjaminVanRyseghem 7/11/2012 18:18'! initialize "Initialization code for BlocEditor" super initialize. block := nil asValueHolder! ! !BlocEditor methodsFor: 'initialize' stamp: 'BenjaminVanRyseghem 7/11/2012 18:18'! initialize "Initialization code for BlocEditor" super initialize. block := nil asValueHolder! ! !PickListModel methodsFor: 'initialization' stamp: 'BenjaminVanRyseghem 2/22/2013 00:07'! initialize "Initialization code for PickList" wrapHolder := [ :i | i printString ] asValueHolder. pickedItemsHolder := OrderedCollection new asValueHolder. associationsWrapperToItem := Dictionary new asValueHolder. associationsItemToWrapper := Dictionary new asValueHolder. associationsIndexToWrapper := Dictionary new asValueHolder. labelClickableHolder := true asValueHolder. defaultValueHolder := false asValueHolder. blockToPerformOnWrappers := [:wrapper | ] asValueHolder. super initialize.! ! !PickListModel methodsFor: 'initialization' stamp: 'BenjaminVanRyseghem 2/22/2013 00:07'! initialize "Initialization code for PickList" wrapHolder := [ :i | i printString ] asValueHolder. pickedItemsHolder := OrderedCollection new asValueHolder. associationsWrapperToItem := Dictionary new asValueHolder. associationsItemToWrapper := Dictionary new asValueHolder. associationsIndexToWrapper := Dictionary new asValueHolder. labelClickableHolder := true asValueHolder. defaultValueHolder := false asValueHolder. blockToPerformOnWrappers := [:wrapper | ] asValueHolder. super initialize.! ! !DualChangeSorterApplication methodsFor: 'initialization' stamp: 'StephaneDucasse 12/18/2012 17:14'! initialize "Initialization code for DualChangeSorterApplication" super initialize. model := ChangeSorterModel new. isRefreshing := false. SystemAnnouncer uniqueInstance weak on: CurrentChangeSetChanged do: [:each | self updateTitle]! ! !DualChangeSorterApplication methodsFor: 'initialization' stamp: 'BenjaminVanRyseghem 6/12/2012 18:22'! initializeWidgets "Initialization code for DualChangeSorterApplication" self instantiateModels: #( changeSorterLeft ChangeSorterApplication changeSorterRight ChangeSorterApplication ). self menusRegistration. self shortcutsRegistration. self setFocusOrder! ! !DualChangeSorterApplication methodsFor: 'initialization' stamp: 'StephaneDucasse 12/18/2012 17:14'! initialize "Initialization code for DualChangeSorterApplication" super initialize. model := ChangeSorterModel new. isRefreshing := false. SystemAnnouncer uniqueInstance weak on: CurrentChangeSetChanged do: [:each | self updateTitle]! ! !DualChangeSorterApplication methodsFor: 'initialization' stamp: 'BenjaminVanRyseghem 6/12/2012 18:22'! initializeWidgets "Initialization code for DualChangeSorterApplication" self instantiateModels: #( changeSorterLeft ChangeSorterApplication changeSorterRight ChangeSorterApplication ). self menusRegistration. self shortcutsRegistration. self setFocusOrder! ! !ClassTestCase methodsFor: 'tests' stamp: 'SebastianTleye 7/19/2013 12:50'! testTraitExplicitRequirementMethodsMustBeImplementedInTheClassOrInASuperclass self assertValidLintRule: RBExplicitRequirementMethodsRule new! ! !ClassTestCase methodsFor: 'tests' stamp: 'SebastianTleye 7/19/2013 14:30'! testMethodsOfTheClassShouldNotBeRepeatedInItsSuperclasses self assertValidLintRule: RBRepeteadMethodsInTheSuperclassRule new! ! !ClassTestCase methodsFor: 'tests' stamp: 'SebastianTleye 7/19/2013 13:45'! testLocalMethodsOfTheClassShouldNotBeRepeatedInItsTraits self assertValidLintRule: RBLocalMethodsOfAClassNotInItsTraitComposition new! ! !ClassTestCase methodsFor: 'utils' stamp: 'SebastianTleye 7/19/2013 15:29'! differentMethodsWithSameSelectorBetween: firstClass and: secondClass | repeatedSelectors differentMethodsWithSameSelector | repeatedSelectors := firstClass localSelectors intersection: secondClass localSelectors. differentMethodsWithSameSelector := repeatedSelectors select: [ :selector | | m1 m2| m1 := firstClass>>selector. m2 := secondClass>>selector. m1 sourceCode ~= m2 sourceCode]. ^differentMethodsWithSameSelector.! ! !ClassTestCase methodsFor: 'utils' stamp: 'SebastianTleye 7/19/2013 15:30'! repeatedMethodsThatDoNotAccessInstanceVariablesBetween: firstClass and: secondClass | repeatedSelectors repeatedMethodsThatDoNotAccessInstanceVariables | repeatedSelectors := firstClass localSelectors intersection: secondClass localSelectors. repeatedMethodsThatDoNotAccessInstanceVariables := repeatedSelectors select: [ :selector | | m1 m2| m1 := firstClass>>selector. m2 := secondClass>>selector. ((m1 sourceCode = m2 sourceCode) and: [ m1 hasInstVarRef not ]) and: [ m2 hasInstVarRef not ]]. ^repeatedMethodsThatDoNotAccessInstanceVariables.! ! !ClassTestCase methodsFor: 'tests' stamp: 'SebastianTleye 7/19/2013 12:50'! testTraitExplicitRequirementMethodsMustBeImplementedInTheClassOrInASuperclass self assertValidLintRule: RBExplicitRequirementMethodsRule new! ! !ClassTestCase methodsFor: 'tests' stamp: 'SebastianTleye 7/19/2013 14:30'! testMethodsOfTheClassShouldNotBeRepeatedInItsSuperclasses self assertValidLintRule: RBRepeteadMethodsInTheSuperclassRule new! ! !ClassTestCase methodsFor: 'tests' stamp: 'SebastianTleye 7/19/2013 13:45'! testLocalMethodsOfTheClassShouldNotBeRepeatedInItsTraits self assertValidLintRule: RBLocalMethodsOfAClassNotInItsTraitComposition new! ! !ClassTestCase methodsFor: 'utils' stamp: 'SebastianTleye 7/19/2013 15:29'! differentMethodsWithSameSelectorBetween: firstClass and: secondClass | repeatedSelectors differentMethodsWithSameSelector | repeatedSelectors := firstClass localSelectors intersection: secondClass localSelectors. differentMethodsWithSameSelector := repeatedSelectors select: [ :selector | | m1 m2| m1 := firstClass>>selector. m2 := secondClass>>selector. m1 sourceCode ~= m2 sourceCode]. ^differentMethodsWithSameSelector.! ! !ClassTestCase methodsFor: 'utils' stamp: 'SebastianTleye 7/19/2013 15:30'! repeatedMethodsThatDoNotAccessInstanceVariablesBetween: firstClass and: secondClass | repeatedSelectors repeatedMethodsThatDoNotAccessInstanceVariables | repeatedSelectors := firstClass localSelectors intersection: secondClass localSelectors. repeatedMethodsThatDoNotAccessInstanceVariables := repeatedSelectors select: [ :selector | | m1 m2| m1 := firstClass>>selector. m2 := secondClass>>selector. ((m1 sourceCode = m2 sourceCode) and: [ m1 hasInstVarRef not ]) and: [ m2 hasInstVarRef not ]]. ^repeatedMethodsThatDoNotAccessInstanceVariables.! ! !OpenToolTest methodsFor: 'test browse' stamp: 'SebastianTleye 7/22/2013 13:46'! testOpenBrowseOnTraitMethod | browser | browser := (TBehavior>>#name) browse. browser changed. browser close.! ! !OpenToolTest methodsFor: 'test browse' stamp: 'SebastianTleye 7/22/2013 13:46'! testOpenBrowseOnTraitMethod | browser | browser := (TBehavior>>#name) browse. browser changed. browser close.! ! !RadioButtonGroup methodsFor: 'initialization'! initialize "Initialization code for RadioButtonGroup" super initialize. buttons := OrderedCollection new.! ! !RadioButtonGroup methodsFor: 'initialization'! initialize "Initialization code for RadioButtonGroup" super initialize. buttons := OrderedCollection new.! ! !SearchableTree methodsFor: 'initialize' stamp: 'BenjaminVanRyseghem 4/18/2013 17:39'! initialize "Initialization code for FilteringTree" super initialize. roots := OrderedCollection new asValueHolder! ! !SearchableTree methodsFor: 'initialize' stamp: 'BenjaminVanRyseghem 4/18/2013 17:39'! initialize "Initialization code for FilteringTree" super initialize. roots := OrderedCollection new asValueHolder! ! !WidgetSetter methodsFor: 'initialization' stamp: 'BenjaminVanRyseghem 5/14/2013 19:27'! initialize "Initialization code for WidgetSetter" model := nil asValueHolder. model whenChangedDo: [ :m | | max | self updateTitle. apiSetters items: self retrieveItems. max := (apiSetters listItems collect: [ :e | self widthFor: e method ]) ifEmpty: [ 0 ] ifNotEmpty: [ :l | l max ]. apiSetters listItems do: [ :e | e selectorWidth: max ] ]. super initialize. self announcer weak on: WidgetBuilt do: [ self registerEvents ]! ! !WidgetSetter methodsFor: 'initialization' stamp: 'BenjaminVanRyseghem 5/14/2013 19:27'! initialize "Initialization code for WidgetSetter" model := nil asValueHolder. model whenChangedDo: [ :m | | max | self updateTitle. apiSetters items: self retrieveItems. max := (apiSetters listItems collect: [ :e | self widthFor: e method ]) ifEmpty: [ 0 ] ifNotEmpty: [ :l | l max ]. apiSetters listItems do: [ :e | e selectorWidth: max ] ]. super initialize. self announcer weak on: WidgetBuilt do: [ self registerEvents ]! ! !AbstractApiSetter methodsFor: 'initialize' stamp: 'BenjaminVanRyseghem 7/12/2012 20:35'! initialize "Initialization code for BooleanApiSetter" method := nil asValueHolder. model := nil asValueHolder. retrievingMethod := nil asValueHolder. isSetting := false. super initialize. self registerEvents! ! !AbstractApiSetter methodsFor: 'initialize' stamp: 'BenjaminVanRyseghem 7/12/2012 20:35'! initialize "Initialization code for BooleanApiSetter" method := nil asValueHolder. model := nil asValueHolder. retrievingMethod := nil asValueHolder. isSetting := false. super initialize. self registerEvents! ! !InputWidget methodsFor: 'initialize' stamp: 'BenjaminVanRyseghem 4/26/2013 13:58'! initialize "Initialization code for InputWidget" okAction := [ ] asValueHolder. value := '' asValueHolder. title := 'Title' asValueHolder. super initialize.! ! !InputWidget methodsFor: 'initialize' stamp: 'BenjaminVanRyseghem 4/26/2013 13:58'! initialize "Initialization code for InputWidget" okAction := [ ] asValueHolder. value := '' asValueHolder. title := 'Title' asValueHolder. super initialize.! ! !MessageBrowser methodsFor: 'initialization' stamp: 'BenjaminVanRyseghem 5/16/2013 18:14'! initialize "Initialization code for MessageBrowser" textConverterHolder := SourceMethodConverter new asValueHolder. model := AbstractTool new. maxClassSize = nil. searchedStringHolder := '' asValueHolder. titleHolder := super title asValueHolder. topologicSortHolder := true asValueHolder. super initialize. self windowIcon: self taskbarIcon. self registerToAnnouncements. self announcer weak on: WidgetBuilt do: [ self updateTitle. textModel text: textModel getText. ]! ! !MessageBrowser methodsFor: 'initialization' stamp: 'BenjaminVanRyseghem 5/16/2013 18:14'! initialize "Initialization code for MessageBrowser" textConverterHolder := SourceMethodConverter new asValueHolder. model := AbstractTool new. maxClassSize = nil. searchedStringHolder := '' asValueHolder. titleHolder := super title asValueHolder. topologicSortHolder := true asValueHolder. super initialize. self windowIcon: self taskbarIcon. self registerToAnnouncements. self announcer weak on: WidgetBuilt do: [ self updateTitle. textModel text: textModel getText. ]! ! !AbstractBasicWidget methodsFor: 'initialization' stamp: 'BenjaminVanRyseghem 5/16/2013 12:37'! initialize "Initialization code for AbstractBasicWidget" super initialize. helpHolder := nil asValueHolder. borderWidth := 0 asValueHolder. borderColor := Color transparent asValueHolder. enabledHolder := true asValueHolder. dragEnabled := false asValueHolder. dropEnabled := false asValueHolder. dragTransformationBlock := [ :item :source | item ] asValueHolder. wantDropBlock := [ :draggedItem :event :source | self dropEnabled ] asValueHolder. acceptDropBlock := [ :draggedItem :event :source | ] asValueHolder. transferBlock := [:passenger :source | super transferFor: passenger from: source ] asValueHolder. helpHolder whenChangedDo: [:string | self widget ifNotNil: [:w | w setBalloonText: string ]]. borderWidth whenChangedDo: [:int | self widget ifNotNil: [:w | w borderWidth: int ]]. borderColor whenChangedDo: [:color | self widget ifNotNil: [:w | w borderColor: color ]]. enabledHolder whenChangedDo: [:b | self widget ifNotNil: [:w | w enabled: b ]]. dragEnabled whenChangedDo: [:b | self widget ifNotNil: [:w | w dragEnabled: b ]]. dropEnabled whenChangedDo: [:b | self widget ifNotNil: [:w | w dropEnabled: b ]].! ! !AbstractBasicWidget methodsFor: 'initialization' stamp: 'BenjaminVanRyseghem 5/16/2013 12:37'! initialize "Initialization code for AbstractBasicWidget" super initialize. helpHolder := nil asValueHolder. borderWidth := 0 asValueHolder. borderColor := Color transparent asValueHolder. enabledHolder := true asValueHolder. dragEnabled := false asValueHolder. dropEnabled := false asValueHolder. dragTransformationBlock := [ :item :source | item ] asValueHolder. wantDropBlock := [ :draggedItem :event :source | self dropEnabled ] asValueHolder. acceptDropBlock := [ :draggedItem :event :source | ] asValueHolder. transferBlock := [:passenger :source | super transferFor: passenger from: source ] asValueHolder. helpHolder whenChangedDo: [:string | self widget ifNotNil: [:w | w setBalloonText: string ]]. borderWidth whenChangedDo: [:int | self widget ifNotNil: [:w | w borderWidth: int ]]. borderColor whenChangedDo: [:color | self widget ifNotNil: [:w | w borderColor: color ]]. enabledHolder whenChangedDo: [:b | self widget ifNotNil: [:w | w enabled: b ]]. dragEnabled whenChangedDo: [:b | self widget ifNotNil: [:w | w dragEnabled: b ]]. dropEnabled whenChangedDo: [:b | self widget ifNotNil: [:w | w dropEnabled: b ]].! ! !RadioButtonModel methodsFor: 'initialization' stamp: 'BenjaminVanRyseghem 7/18/2013 14:27'! initialize "initialization code for CheckBox" super initialize. actionWhenActivatedHolder := [] asValueHolder. actionWhenDesactivatedHolder := [] asValueHolder. enabledHolder := true asValueHolder. stateHolder := false asValueHolder. labelClickableHolder := true asValueHolder. labelHolder := '' asValueHolder. stateHolder whenChangedDo: [:bool | bool ifTrue: actionWhenActivatedHolder contents ifFalse: actionWhenDesactivatedHolder contents. self changed: #state ]. labelClickableHolder whenChangedDo: [:aBoolean | self changed: { #labelClickable: . aBoolean } ]. labelHolder whenChangedDo: [:label | self changed: { #label: . label } ]. ! ! !RadioButtonModel methodsFor: 'initialization' stamp: 'BenjaminVanRyseghem 7/18/2013 14:27'! initialize "initialization code for CheckBox" super initialize. actionWhenActivatedHolder := [] asValueHolder. actionWhenDesactivatedHolder := [] asValueHolder. enabledHolder := true asValueHolder. stateHolder := false asValueHolder. labelClickableHolder := true asValueHolder. labelHolder := '' asValueHolder. stateHolder whenChangedDo: [:bool | bool ifTrue: actionWhenActivatedHolder contents ifFalse: actionWhenDesactivatedHolder contents. self changed: #state ]. labelClickableHolder whenChangedDo: [:aBoolean | self changed: { #labelClickable: . aBoolean } ]. labelHolder whenChangedDo: [:label | self changed: { #label: . label } ]. ! ! !TabManagerModel methodsFor: 'initialize' stamp: 'BenjaminVanRyseghem 7/18/2013 14:50'! initialize "Initialization code for TabManagerModel" super initialize. tabs := OrderedCollection new asValueHolder. self myDependents: WeakSet new. tabs whenChangedDo: [ :new | self widget ifNotNil: [ :w | w tabs: new ] ].! ! !TabManagerModel methodsFor: 'initialize' stamp: 'BenjaminVanRyseghem 7/18/2013 14:50'! initialize "Initialization code for TabManagerModel" super initialize. tabs := OrderedCollection new asValueHolder. self myDependents: WeakSet new. tabs whenChangedDo: [ :new | self widget ifNotNil: [ :w | w tabs: new ] ].! ! !WindowModel methodsFor: 'initialize' stamp: 'BenjaminVanRyseghem 5/19/2013 13:27'! initialize "Initialization code for WindowModel" super initialize. model := nil asValueHolder. initialExtent := nil asValueHolder. title := self class title asValueHolder. isClosedHolder := false asValueHolder. model whenChangedDo: [:m | self updateTitle ].! ! !WindowModel methodsFor: 'initialize' stamp: 'BenjaminVanRyseghem 5/19/2013 13:27'! initialize "Initialization code for WindowModel" super initialize. model := nil asValueHolder. initialExtent := nil asValueHolder. title := self class title asValueHolder. isClosedHolder := false asValueHolder. model whenChangedDo: [:m | self updateTitle ].! ! !TabModel methodsFor: 'initialize' stamp: 'BenjaminVanRyseghem 6/9/2013 00:53'! initialize "Initialization code for TabModel" super initialize. label := '' asValueHolder. icon := self defaultIcon asValueHolder. morph := nil asValueHolder. retrievingBlock := nil asValueHolder. menu := nil asValueHolder. actions := OrderedCollection new asValueHolder. closeable := true asValueHolder. label whenChangedDo: [ :new | self widget ifNotNil: [ :w | w label: new ] ]. icon whenChangedDo: [ :new | self widget ifNotNil: [ :w | w icon: new ] ]. morph whenChangedDo: [ :new | self widget ifNotNil: [ :w | w morph: new ] ]. retrievingBlock whenChangedDo: [ :new | self widget ifNotNil: [ :w | w retrievingBlock: new ] ]. menu whenChangedDo: [ :new | self widget ifNotNil: [ :w | w menu: new ] ]. actions whenChangedDo: [ :new | self widget ifNotNil: [ :w | w actions: new ] ]. closeable whenChangedDo: [ :new | self widget ifNotNil: [ :w | w closeable: new ] ].! ! !TabModel methodsFor: 'initialize' stamp: 'BenjaminVanRyseghem 6/9/2013 00:53'! initialize "Initialization code for TabModel" super initialize. label := '' asValueHolder. icon := self defaultIcon asValueHolder. morph := nil asValueHolder. retrievingBlock := nil asValueHolder. menu := nil asValueHolder. actions := OrderedCollection new asValueHolder. closeable := true asValueHolder. label whenChangedDo: [ :new | self widget ifNotNil: [ :w | w label: new ] ]. icon whenChangedDo: [ :new | self widget ifNotNil: [ :w | w icon: new ] ]. morph whenChangedDo: [ :new | self widget ifNotNil: [ :w | w morph: new ] ]. retrievingBlock whenChangedDo: [ :new | self widget ifNotNil: [ :w | w retrievingBlock: new ] ]. menu whenChangedDo: [ :new | self widget ifNotNil: [ :w | w menu: new ] ]. actions whenChangedDo: [ :new | self widget ifNotNil: [ :w | w actions: new ] ]. closeable whenChangedDo: [ :new | self widget ifNotNil: [ :w | w closeable: new ] ].! ! !NewListModel methodsFor: 'initialize' stamp: 'ClementBera 5/3/2013 15:11'! initialize "Initialization code for NewListModel" super initialize. items := #() asValueHolder. deSelectOnReclick := false asValueHolder. draggedItemAtIndex := [ :index | self getRawItemAt: index ] asValueHolder. displayBlock := [ :object | object asStringOrText ] asValueHolder. headerHeight := 0 asValueHolder. headerTitle := nil asValueHolder. menuTitle := nil asValueHolder. menuHolder := nil asValueHolder. handlesDoubleClick := false asValueHolder. doubleClick := [ ] asValueHolder. iconHolder := [ nil ] asValueHolder. iconMaxSize := nil asValueHolder. keyStrokeAction := [ false ] asValueHolder. isMultipleSelection := false asValueHolder. unselectOnChange := false asValueHolder. sortingBlock := self defaultSortingBlock asValueHolder. filteringBlock := self defaultFilteringBlock asValueHolder. allowToSelect := true asValueHolder. listAnnouncer := Announcer new. headerClicked := [] asValueHolder. selectedIndex := 0 asValueHolder. selectedItem := nil asValueHolder. selectedIndexes := #() asValueHolder. selectedItems := #() asValueHolder. self registerEvents! ! !NewListModel methodsFor: 'initialize' stamp: 'ClementBera 5/3/2013 15:11'! initialize "Initialization code for NewListModel" super initialize. items := #() asValueHolder. deSelectOnReclick := false asValueHolder. draggedItemAtIndex := [ :index | self getRawItemAt: index ] asValueHolder. displayBlock := [ :object | object asStringOrText ] asValueHolder. headerHeight := 0 asValueHolder. headerTitle := nil asValueHolder. menuTitle := nil asValueHolder. menuHolder := nil asValueHolder. handlesDoubleClick := false asValueHolder. doubleClick := [ ] asValueHolder. iconHolder := [ nil ] asValueHolder. iconMaxSize := nil asValueHolder. keyStrokeAction := [ false ] asValueHolder. isMultipleSelection := false asValueHolder. unselectOnChange := false asValueHolder. sortingBlock := self defaultSortingBlock asValueHolder. filteringBlock := self defaultFilteringBlock asValueHolder. allowToSelect := true asValueHolder. listAnnouncer := Announcer new. headerClicked := [] asValueHolder. selectedIndex := 0 asValueHolder. selectedItem := nil asValueHolder. selectedIndexes := #() asValueHolder. selectedItems := #() asValueHolder. self registerEvents! ! !ButtonModel methodsFor: 'initialization' stamp: 'BenjaminVanRyseghem 7/18/2013 14:15'! initialize "Initialization code for ButtonComposableModel" super initialize. actionHolder := [] asValueHolder. labelHolder := '' asValueHolder. iconHolder := nil asValueHolder. stateHolder := true asValueHolder. enabledHolder := true asValueHolder. helpHolder := nil asValueHolder. actionPerformedHolder := nil asValueHolder. askBeforeChangingHolder := false asValueHolder. labelHolder whenChangedDo: [ self changed: #label ]. iconHolder whenChangedDo: [ self changed: #label ]. stateHolder whenChangedDo: [ self changed: #state ]. enabledHolder whenChangedDo: [ self changed: #enabled ]. askBeforeChangingHolder whenChangedDo: [:newValue | self changed: { #askBeforeChanging: . newValue} ]. self on: Character space asKeyCombination do: [ self action ].! ! !ButtonModel methodsFor: 'initialization' stamp: 'BenjaminVanRyseghem 7/18/2013 14:15'! initialize "Initialization code for ButtonComposableModel" super initialize. actionHolder := [] asValueHolder. labelHolder := '' asValueHolder. iconHolder := nil asValueHolder. stateHolder := true asValueHolder. enabledHolder := true asValueHolder. helpHolder := nil asValueHolder. actionPerformedHolder := nil asValueHolder. askBeforeChangingHolder := false asValueHolder. labelHolder whenChangedDo: [ self changed: #label ]. iconHolder whenChangedDo: [ self changed: #label ]. stateHolder whenChangedDo: [ self changed: #state ]. enabledHolder whenChangedDo: [ self changed: #enabled ]. askBeforeChangingHolder whenChangedDo: [:newValue | self changed: { #askBeforeChanging: . newValue} ]. self on: Character space asKeyCombination do: [ self action ].! ! !IconListModel methodsFor: 'initialization'! initialize "Initialization code for IconListModel" super initialize. iconHolder := [:item | nil ] asValueHolder.! ! !IconListModel methodsFor: 'initialization'! initialize "Initialization code for IconListModel" super initialize. iconHolder := [:item | nil ] asValueHolder.! ! !DropListModel methodsFor: 'initialization' stamp: 'SeanDeNigris 4/17/2013 22:21'! initialize "Initialization code for DropListModel" super initialize. listHolder := OrderedCollection new asValueHolder. selectionHolder := SelectionValueHolder new. listHolder whenChangedDo: [ self changed: #getList. self internalResetSelection. ]. selectionHolder whenChangedDo: [ self changed: #getIndex ]. self whenSelectedItemChanged: [:item | item value ]! ! !DropListModel methodsFor: 'initialization' stamp: 'SeanDeNigris 4/17/2013 22:21'! initialize "Initialization code for DropListModel" super initialize. listHolder := OrderedCollection new asValueHolder. selectionHolder := SelectionValueHolder new. listHolder whenChangedDo: [ self changed: #getList. self internalResetSelection. ]. selectionHolder whenChangedDo: [ self changed: #getIndex ]. self whenSelectedItemChanged: [:item | item value ]! ! !TreeNodeModel methodsFor: 'initialize' stamp: 'BenjaminVanRyseghem 4/17/2013 20:06'! initialize "Initialization code for TreeNodeModel" super initialize. item := nil asValueHolder.! ! !TreeNodeModel methodsFor: 'initialize' stamp: 'BenjaminVanRyseghem 4/17/2013 20:06'! initialize "Initialization code for TreeNodeModel" super initialize. item := nil asValueHolder.! ! !TextModel methodsFor: 'initialization' stamp: 'BenjaminVanRyseghem 4/26/2013 14:02'! initialize "Initialization code for TextComposableModel" super initialize. textHolder := '' asValueHolder. behaviorHolder := nil asValueHolder. aboutToStyleHolder := [ false ] asValueHolder. actionToPerformHolder := [ :text | ] asValueHolder. readSelectionHolder := [ 1 to: 0 ] asValueHolder. enabledHolder := true asValueHolder. actionPerformedHolder := '' asValueHolder. isCodeCompletionAllowedHolder := true asValueHolder. doItContext := nil asValueHolder. doItReceiver := nil asValueHolder. self registerEvents. self registerEventsForShout! ! !TextModel methodsFor: 'initialization' stamp: 'BenjaminVanRyseghem 4/26/2013 14:02'! initialize "Initialization code for TextComposableModel" super initialize. textHolder := '' asValueHolder. behaviorHolder := nil asValueHolder. aboutToStyleHolder := [ false ] asValueHolder. actionToPerformHolder := [ :text | ] asValueHolder. readSelectionHolder := [ 1 to: 0 ] asValueHolder. enabledHolder := true asValueHolder. actionPerformedHolder := '' asValueHolder. isCodeCompletionAllowedHolder := true asValueHolder. doItContext := nil asValueHolder. doItReceiver := nil asValueHolder. self registerEvents. self registerEventsForShout! ! !TextInputFieldModel methodsFor: 'initialization' stamp: 'PavelKrivanek 8/22/2012 17:10'! initialize "Initialization code for TextComposableModel" super initialize. ghostText := '' asValueHolder. acceptOnCR := true asValueHolder. autoAccept := false asValueHolder. entryCompletion := self defaultEntryCompletion asValueHolder. isEncrypted := false asValueHolder. ghostText whenChangedDo: [:txt | self widget ifNotNil: [:w | w ghostText: txt ]]. acceptOnCR whenChangedDo: [:bool | self widget ifNotNil: [:w | w acceptOnCR: bool ]]. autoAccept whenChangedDo: [:bool | self widget ifNotNil: [:w | w autoAccept: bool ]]. isEncrypted whenChangedDo: [:bool | self widget ifNotNil: [:w | w encrypted: bool ]].! ! !TextInputFieldModel methodsFor: 'initialization' stamp: 'PavelKrivanek 8/22/2012 17:10'! initialize "Initialization code for TextComposableModel" super initialize. ghostText := '' asValueHolder. acceptOnCR := true asValueHolder. autoAccept := false asValueHolder. entryCompletion := self defaultEntryCompletion asValueHolder. isEncrypted := false asValueHolder. ghostText whenChangedDo: [:txt | self widget ifNotNil: [:w | w ghostText: txt ]]. acceptOnCR whenChangedDo: [:bool | self widget ifNotNil: [:w | w acceptOnCR: bool ]]. autoAccept whenChangedDo: [:bool | self widget ifNotNil: [:w | w autoAccept: bool ]]. isEncrypted whenChangedDo: [:bool | self widget ifNotNil: [:w | w encrypted: bool ]].! ! !LabelModel methodsFor: 'initialization' stamp: 'BenjaminVanRyseghem 7/16/2012 18:07'! initialize "Initialization code for LabelModel" super initialize. textHolder := '' asValueHolder. enabledHolder := true asValueHolder. textHolder whenChangedDo: [ self changed: #getText ].! ! !LabelModel methodsFor: 'initialization' stamp: 'BenjaminVanRyseghem 7/16/2012 18:07'! initialize "Initialization code for LabelModel" super initialize. textHolder := '' asValueHolder. enabledHolder := true asValueHolder. textHolder whenChangedDo: [ self changed: #getText ].! ! !SliderModel methodsFor: 'initialize' stamp: 'BenjaminVanRyseghem 7/18/2013 14:34'! initialize "Initialization code for SliderModel" super initialize. max := 100 asValueHolder. min := 0 asValueHolder. quantum := 1 asValueHolder. value := 0 asValueHolder. absoluteValue := 0 asValueHolder. labelHolder := '' asValueHolder. isChanging := false. max whenChangedDo: [:m | self changed: { #max: . m } ]. min whenChangedDo: [:m | self changed: { #min: . m } ]. quantum whenChangedDo: [:m | self changed: { #quantum: . m } ]. value whenChangedDo: [:v | isChanging ifFalse: [ isChanging := true. self absoluteValue: ((v-self min)/(self max-self min)). self changed: { #scaledValue: . v }. isChanging := false ]. self changed: #value.]. absoluteValue whenChangedDo: [:v | isChanging ifFalse: [ isChanging := true. self value: (self min+(v*(self max-self min)) roundTo: self quantum). self changed: { #value: . v }. isChanging := false ]]. labelHolder whenChangedDo: [:v | self changed: #label ].! ! !SliderModel methodsFor: 'initialize' stamp: 'BenjaminVanRyseghem 7/18/2013 14:34'! initialize "Initialization code for SliderModel" super initialize. max := 100 asValueHolder. min := 0 asValueHolder. quantum := 1 asValueHolder. value := 0 asValueHolder. absoluteValue := 0 asValueHolder. labelHolder := '' asValueHolder. isChanging := false. max whenChangedDo: [:m | self changed: { #max: . m } ]. min whenChangedDo: [:m | self changed: { #min: . m } ]. quantum whenChangedDo: [:m | self changed: { #quantum: . m } ]. value whenChangedDo: [:v | isChanging ifFalse: [ isChanging := true. self absoluteValue: ((v-self min)/(self max-self min)). self changed: { #scaledValue: . v }. isChanging := false ]. self changed: #value.]. absoluteValue whenChangedDo: [:v | isChanging ifFalse: [ isChanging := true. self value: (self min+(v*(self max-self min)) roundTo: self quantum). self changed: { #value: . v }. isChanging := false ]]. labelHolder whenChangedDo: [:v | self changed: #label ].! ! !CheckBoxModel methodsFor: 'initialization' stamp: 'BenjaminVanRyseghem 7/18/2013 14:17'! initialize "initialization code for CheckBox" super initialize. actionWhenActivatedHolder := [] asValueHolder. actionWhenDesactivatedHolder := [] asValueHolder. enabledHolder := true asValueHolder. stateHolder := false asValueHolder. labelClickableHolder := true asValueHolder. labelHolder := '' asValueHolder. stateHolder whenChangedDo: [:bool | bool ifTrue: actionWhenActivatedHolder contents ifFalse: actionWhenDesactivatedHolder contents. self changed: #state ]. labelClickableHolder whenChangedDo: [:aBoolean | self changed: { #labelClickable: . aBoolean } ]. labelHolder whenChangedDo: [:label | self changed: { #label: . label } ].! ! !CheckBoxModel methodsFor: 'initialization' stamp: 'BenjaminVanRyseghem 7/18/2013 14:17'! initialize "initialization code for CheckBox" super initialize. actionWhenActivatedHolder := [] asValueHolder. actionWhenDesactivatedHolder := [] asValueHolder. enabledHolder := true asValueHolder. stateHolder := false asValueHolder. labelClickableHolder := true asValueHolder. labelHolder := '' asValueHolder. stateHolder whenChangedDo: [:bool | bool ifTrue: actionWhenActivatedHolder contents ifFalse: actionWhenDesactivatedHolder contents. self changed: #state ]. labelClickableHolder whenChangedDo: [:aBoolean | self changed: { #labelClickable: . aBoolean } ]. labelHolder whenChangedDo: [:label | self changed: { #label: . label } ].! ! !PanelMorphWithSplitters methodsFor: 'initialization'! initialize "Initialization code for PanelMorphWithSplitter" super initialize. paneMorphs := OrderedCollection new.! ! !PanelMorphWithSplitters methodsFor: 'initialization'! initialize "Initialization code for PanelMorphWithSplitter" super initialize. paneMorphs := OrderedCollection new.! ! !TokenTreeFilter methodsFor: 'initialization' stamp: 'BenjaminVanRyseghem 4/18/2013 17:01'! initialize "Initialization code for TokenTreeFilter" super initialize. token := ''.! ! !TokenTreeFilter methodsFor: 'initialization' stamp: 'BenjaminVanRyseghem 4/18/2013 17:01'! initialize "Initialization code for TokenTreeFilter" super initialize. token := ''.! ! !IntegerEditor methodsFor: 'initialize' stamp: 'BenjaminVanRyseghem 7/12/2012 19:36'! initialize "Initialization code for BlocEditor" super initialize. integer := 0 asValueHolder! ! !IntegerEditor methodsFor: 'initialize' stamp: 'BenjaminVanRyseghem 7/12/2012 19:36'! initialize "Initialization code for BlocEditor" super initialize. integer := 0 asValueHolder! ! !SubwidgetItem methodsFor: 'initialization' stamp: 'BenjaminVanRyseghem 7/11/2012 03:36'! initialize "Initialization code for SubwidgetItem" super initialize. model := nil asValueHolder. initialExtent := 400@25. validated := false asValueHolder.! ! !SubwidgetItem methodsFor: 'initialization' stamp: 'BenjaminVanRyseghem 7/11/2012 03:36'! initialize "Initialization code for SubwidgetItem" super initialize. model := nil asValueHolder. initialExtent := 400@25. validated := false asValueHolder.! ! !TreeModel methodsFor: 'as yet unclassified' stamp: 'BenjaminVanRyseghem 7/18/2013 14:00'! acceptDroppingMorph: draggedMorph event: event inMorph: source | item | item := source scrollerSubMorphFromPoint: event position. ^ self acceptDropBlock valueWithEnoughArguments: { draggedMorph. event. source. item }! ! !TreeModel methodsFor: 'initialize' stamp: 'BenjaminVanRyseghem 7/16/2013 11:13'! initialize "Initialization code for AlainTreeModel" super initialize. treeModel := SpecTreeModel model: self. childrenBlockHolder := [ {} ] asValueHolder. rootsHolder := {} asValueHolder. selectionHolder := {} asValueHolder. menuBlockHolder := [] asValueHolder. displayBlock := [:item | item asString ] asValueHolder. autoDeselection := true asValueHolder. autoMultiSelection := false asValueHolder. columnInset := 5 asValueHolder. doubleClick := [] asValueHolder. allowMenuOnNoItem := false asValueHolder. evenRowColor := Color veryLightGray muchLighter asValueHolder. isCheckList := false asValueHolder. keyStroke := [ :key | ] asValueHolder. multiSelection := false asValueHolder. oddRowColor := Color white asValueHolder. preferedPaneColor := Color white asValueHolder. resizerWidth := 2 asValueHolder. rowInset := 2 asValueHolder. iconBlock := [:e | ] asValueHolder. rootNodeHolder := [:item | DefaultSpecTreeNode with: item model: treeModel ] asValueHolder. columns := { MorphTreeColumn new rowMorphGetSelector: [:node | (self wrapItem: node item) asMorph ] } asValueHolder. isCheckList whenChangedDo: [ :boolean | self widget ifNotNil: [ :w | w isCheckList: boolean ] ]. "Since my nodes are already morphs, dragging them will actually extract them from their owner" dragTransformationBlock := [ :item :source | item copy ] asValueHolder. treeUpdated := nil asValueHolder. self registerEvents! ! !TreeModel methodsFor: 'as yet unclassified' stamp: 'BenjaminVanRyseghem 7/18/2013 14:00'! acceptDroppingMorph: draggedMorph event: event inMorph: source | item | item := source scrollerSubMorphFromPoint: event position. ^ self acceptDropBlock valueWithEnoughArguments: { draggedMorph. event. source. item }! ! !TreeModel methodsFor: 'initialize' stamp: 'BenjaminVanRyseghem 7/16/2013 11:13'! initialize "Initialization code for AlainTreeModel" super initialize. treeModel := SpecTreeModel model: self. childrenBlockHolder := [ {} ] asValueHolder. rootsHolder := {} asValueHolder. selectionHolder := {} asValueHolder. menuBlockHolder := [] asValueHolder. displayBlock := [:item | item asString ] asValueHolder. autoDeselection := true asValueHolder. autoMultiSelection := false asValueHolder. columnInset := 5 asValueHolder. doubleClick := [] asValueHolder. allowMenuOnNoItem := false asValueHolder. evenRowColor := Color veryLightGray muchLighter asValueHolder. isCheckList := false asValueHolder. keyStroke := [ :key | ] asValueHolder. multiSelection := false asValueHolder. oddRowColor := Color white asValueHolder. preferedPaneColor := Color white asValueHolder. resizerWidth := 2 asValueHolder. rowInset := 2 asValueHolder. iconBlock := [:e | ] asValueHolder. rootNodeHolder := [:item | DefaultSpecTreeNode with: item model: treeModel ] asValueHolder. columns := { MorphTreeColumn new rowMorphGetSelector: [:node | (self wrapItem: node item) asMorph ] } asValueHolder. isCheckList whenChangedDo: [ :boolean | self widget ifNotNil: [ :w | w isCheckList: boolean ] ]. "Since my nodes are already morphs, dragging them will actually extract them from their owner" dragTransformationBlock := [ :item :source | item copy ] asValueHolder. treeUpdated := nil asValueHolder. self registerEvents! ! !TreeModel class methodsFor: 'specs' stamp: 'BenjaminVanRyseghem 7/18/2013 15:11'! defaultSpec ^ {#TreeSpec. #model:. #(model treeModel). #initializeColumsFrom:. #(model). #hResizing:. #spaceFill. #vResizing:. #spaceFill. #autoDeselection:. #(model autoDeselection). #resizerWidth:. #(model resizerWidth). #columnInset:. #(model columnInset). #iconBlock:. #(model iconBlock). #rowInset:. #(model rowInset). #keystrokeActionSelector:. #keyStroke:. #preferedPaneColor:. #(model preferedPaneColor). #multiSelection:. #(model multiSelection). #autoMultiSelection:. #(model autoMultiSelection). #isCheckList:. #(model isCheckList). #doubleClickSelector:. #doubleClick. #getMenuSelector:. #menu:shifted:. #rowColorForEven:odd:. #(model evenRowColor). #(model oddRowColor). #buildContents }! ! !TreeModel class methodsFor: 'specs' stamp: 'BenjaminVanRyseghem 7/18/2013 15:11'! defaultSpec ^ {#TreeSpec. #model:. #(model treeModel). #initializeColumsFrom:. #(model). #hResizing:. #spaceFill. #vResizing:. #spaceFill. #autoDeselection:. #(model autoDeselection). #resizerWidth:. #(model resizerWidth). #columnInset:. #(model columnInset). #iconBlock:. #(model iconBlock). #rowInset:. #(model rowInset). #keystrokeActionSelector:. #keyStroke:. #preferedPaneColor:. #(model preferedPaneColor). #multiSelection:. #(model multiSelection). #autoMultiSelection:. #(model autoMultiSelection). #isCheckList:. #(model isCheckList). #doubleClickSelector:. #doubleClick. #getMenuSelector:. #menu:shifted:. #rowColorForEven:odd:. #(model evenRowColor). #(model oddRowColor). #buildContents }! ! IntegerApiSetter class removeSelector: #spec! ColorApiSetter class removeSelector: #spec! TextInputFieldModel class removeSelector: #title! TextModel removeSelector: #owner! MultiColumnListModel removeSelector: #getIndex! StApiSetter class removeSelector: #spec! BlockApiSetter class removeSelector: #spec! BooleanApiSetter class removeSelector: #spec! TestCase class removeSelector: #run! TestResource removeSelector: #initialize! TestAsserter removeSelector: #assert:equals:! TestAsserter removeSelector: #deny:! TestAsserter removeSelector: #deny:description:! TestAsserter removeSelector: #deny:description:resumable:! TestAsserter removeSelector: #executeShould:inScopeOf:! TestAsserter removeSelector: #should:raise:! TestAsserter removeSelector: #should:raise:description:! TestAsserter removeSelector: #shouldnt:raise:! TestAsserter removeSelector: #shouldnt:raise:description:! OCAbstractVariable removeSelector: #isLiteral! EmptyLayout removeSelector: #fieldSize! EmptyLayout removeSelector: #hasFields! EmptyLayout removeSelector: #hasSlots! HandMorph removeSelector: #simulateKeyStrokes:!