aspect holder setup code cleanup
authorClaus Gittinger <cg@exept.de>
Mon, 10 Mar 2008 10:20:58 +0100
changeset 8005 f1c55e88b558
parent 8004 03ecc253b64a
child 8006 cdc85821cae2
aspect holder setup code cleanup
NewSystemBrowser.st
Tools__NewSystemBrowser.st
--- a/NewSystemBrowser.st	Mon Mar 10 10:03:33 2008 +0100
+++ b/NewSystemBrowser.st	Mon Mar 10 10:20:58 2008 +0100
@@ -11000,13 +11000,9 @@
 !
 
 doEnableRefactoringSupport
-    |holder|
-
-    (holder := builder bindingAt:#doEnableRefactoringSupport) isNil ifTrue:[
-        holder := self canUseRefactoringSupport asValue.
-        builder aspectAt:#doEnableRefactoringSupport put:holder.
-    ].
-    ^ holder
+    ^ builder 
+        valueAspectFor:#doEnableRefactoringSupport
+        computeInitialValueWith:[ self canUseRefactoringSupport ]
 !
 
 doLoadRefactoringSupport
@@ -12056,13 +12052,7 @@
 !
 
 methodVisibilityHolder
-    |holder|
-
-    (holder := builder bindingAt:#methodVisibilityHolder) isNil ifTrue:[
-        holder := #class asValue.
-        builder aspectAt:#methodVisibilityHolder put: holder.
-    ].
-    ^ holder
+    ^ builder valueAspectFor:#methodVisibilityHolder initialValue:#class
 !
 
 selectedEditorNoteBookTabIndexHolder
@@ -12110,13 +12100,7 @@
 !
 
 showClassVarsInVariableList
-    |holder|
-
-    (holder := builder bindingAt:#showClassVarsInVariableList) isNil ifTrue:[
-        holder := false asValue.
-        builder aspectAt:#showClassVarsInVariableList put: holder
-    ].
-    ^ holder
+    ^ builder valueAspectFor:#showClassVarsInVariableList initialValue:false
 !
 
 showMethodComplexity
@@ -12195,13 +12179,7 @@
 !
 
 sortVariablesByName
-    |holder|
-
-    (holder := builder bindingAt:#sortVariablesByName) isNil ifTrue:[
-        holder := false asValue.
-        builder aspectAt:#sortVariablesByName put: holder
-    ].
-    ^ holder
+    ^ builder valueAspectFor:#sortVariablesByName initialValue:false
 !
 
 toolBarVisibleHolder
@@ -13854,13 +13832,9 @@
 !
 
 hasSingleResourceMethodSelectedHolder
-    |holder|
-
-    (holder := builder bindingAt:#hasSingleResourceMethodSelectedHolder) isNil ifTrue:[
-        holder := self hasSingleResourceMethodSelected asValue.
-        builder aspectAt:#hasSingleResourceMethodSelectedHolder put:holder.
-    ].
-    ^ holder.
+    ^ builder 
+        valueAspectFor:#hasSingleResourceMethodSelectedHolder
+        computeInitialValueWith:[ self hasSingleResourceMethodSelected ]
 !
 
 hasSingleVariableSelected
@@ -41455,7 +41429,7 @@
 !NewSystemBrowser class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libtool/Attic/NewSystemBrowser.st,v 1.1192 2008-03-03 09:39:18 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libtool/Attic/NewSystemBrowser.st,v 1.1193 2008-03-10 09:20:58 cg Exp $'
 ! !
 
 NewSystemBrowser initialize!
--- a/Tools__NewSystemBrowser.st	Mon Mar 10 10:03:33 2008 +0100
+++ b/Tools__NewSystemBrowser.st	Mon Mar 10 10:20:58 2008 +0100
@@ -11000,13 +11000,9 @@
 !
 
 doEnableRefactoringSupport
-    |holder|
-
-    (holder := builder bindingAt:#doEnableRefactoringSupport) isNil ifTrue:[
-        holder := self canUseRefactoringSupport asValue.
-        builder aspectAt:#doEnableRefactoringSupport put:holder.
-    ].
-    ^ holder
+    ^ builder 
+        valueAspectFor:#doEnableRefactoringSupport
+        computeInitialValueWith:[ self canUseRefactoringSupport ]
 !
 
 doLoadRefactoringSupport
@@ -12056,13 +12052,7 @@
 !
 
 methodVisibilityHolder
-    |holder|
-
-    (holder := builder bindingAt:#methodVisibilityHolder) isNil ifTrue:[
-        holder := #class asValue.
-        builder aspectAt:#methodVisibilityHolder put: holder.
-    ].
-    ^ holder
+    ^ builder valueAspectFor:#methodVisibilityHolder initialValue:#class
 !
 
 selectedEditorNoteBookTabIndexHolder
@@ -12110,13 +12100,7 @@
 !
 
 showClassVarsInVariableList
-    |holder|
-
-    (holder := builder bindingAt:#showClassVarsInVariableList) isNil ifTrue:[
-        holder := false asValue.
-        builder aspectAt:#showClassVarsInVariableList put: holder
-    ].
-    ^ holder
+    ^ builder valueAspectFor:#showClassVarsInVariableList initialValue:false
 !
 
 showMethodComplexity
@@ -12195,13 +12179,7 @@
 !
 
 sortVariablesByName
-    |holder|
-
-    (holder := builder bindingAt:#sortVariablesByName) isNil ifTrue:[
-        holder := false asValue.
-        builder aspectAt:#sortVariablesByName put: holder
-    ].
-    ^ holder
+    ^ builder valueAspectFor:#sortVariablesByName initialValue:false
 !
 
 toolBarVisibleHolder
@@ -13854,13 +13832,9 @@
 !
 
 hasSingleResourceMethodSelectedHolder
-    |holder|
-
-    (holder := builder bindingAt:#hasSingleResourceMethodSelectedHolder) isNil ifTrue:[
-        holder := self hasSingleResourceMethodSelected asValue.
-        builder aspectAt:#hasSingleResourceMethodSelectedHolder put:holder.
-    ].
-    ^ holder.
+    ^ builder 
+        valueAspectFor:#hasSingleResourceMethodSelectedHolder
+        computeInitialValueWith:[ self hasSingleResourceMethodSelected ]
 !
 
 hasSingleVariableSelected
@@ -41455,7 +41429,7 @@
 !NewSystemBrowser class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libtool/Tools__NewSystemBrowser.st,v 1.1192 2008-03-03 09:39:18 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libtool/Tools__NewSystemBrowser.st,v 1.1193 2008-03-10 09:20:58 cg Exp $'
 ! !
 
 NewSystemBrowser initialize!