#DOCUMENTATION by cg
authorClaus Gittinger <cg@exept.de>
Thu, 26 Jan 2017 12:37:30 +0100
changeset 17282 2bf6b7f1118b
parent 17281 171a655831a6
child 17283 ccb8a7c686a7
#DOCUMENTATION by cg class: Tools::NewSystemBrowser added: #browseMenuClassesWithDocumentationToBeAdded #findClassesForWhich: changed: #browseMenu #findClassesWithoutClassMethod:
Tools__NewSystemBrowser.st
--- a/Tools__NewSystemBrowser.st	Thu Jan 26 12:26:08 2017 +0100
+++ b/Tools__NewSystemBrowser.st	Thu Jan 26 12:37:30 2017 +0100
@@ -6109,6 +6109,11 @@
                   showBusyCursorWhilePerforming: true
                 )
                (MenuItem
+                  label: 'With Documentation to be Added'
+                  itemValue: browseMenuClassesWithDocumentationToBeAdded
+                  showBusyCursorWhilePerforming: true
+                )
+               (MenuItem
                   label: 'Without Copyright'
                   itemValue: browseMenuClassesWithoutCopyright
                   showBusyCursorWhilePerforming: true
@@ -25751,6 +25756,25 @@
     "Modified: / 29-08-2013 / 12:23:44 / cg"
 !
 
+browseMenuClassesWithDocumentationToBeAdded
+    "searches for classes with either no documentation method,
+     or where the documentation method includes the string 'documentation to be added'"
+    
+    |searchBlock|
+
+    searchBlock := [
+                        self findClassesForWhich:[:cls |
+                            |m|
+                            
+                            (m := cls theMetaclass compiledMethodAt:#documentation) notNil
+                              and:[ (( m source ? '') includesString:'documentation to be added' caseSensitive:false)
+                              and:[ "self halt." true ]]
+                        ].
+                   ].
+
+    self spawnClassBrowserForSearch:searchBlock sortBy:nil in:#newBuffer label:'Classes with documentation to be added'
+!
+
 browseMenuClassesWithFilter:aFilterBlock label:aLabelString
     |searchBlock|
 
@@ -27399,22 +27423,28 @@
     ^ nil
 !
 
-findClassesWithoutClassMethod:selector
+findClassesForWhich:aBlock
     |classes|
 
     classes := IdentitySet new.
     environment allClassesDo:[:eachClass |
-        (eachClass isMeta not
-        and:[eachClass isLoaded
-        and:[eachClass isNameSpace not
-        and:[(eachClass class includesSelector:selector) not]]])
-        ifTrue:[
+        (aBlock value:eachClass) ifTrue:[
              classes add:eachClass
         ].
     ].
     ^ classes asOrderedCollection
 !
 
+findClassesWithoutClassMethod:selector
+    ^ self findClassesForWhich:
+        [:eachClass |
+            (eachClass isMeta not
+              and:[eachClass isLoaded
+              and:[eachClass isNameSpace not
+              and:[(eachClass class includesSelector:selector) not]]])
+        ].
+!
+
 pickViewAndBrowseApplicationClass
     "let user click on a view, then browse its appliction class"