#UI_ENHANCEMENT by cg
authorClaus Gittinger <cg@exept.de>
Sat, 25 Nov 2017 13:21:48 +0100
changeset 17785 f5d785876b85
parent 17784 ce86bb77b36f
child 17786 c553d145e7e3
#UI_ENHANCEMENT by cg class: Tools::NewSystemBrowser changed: #delayedUpdateCodeWithAutoSearch:checkModified: #setAcceptActionForProjectComment accepting package documentation
Tools__NewSystemBrowser.st
--- a/Tools__NewSystemBrowser.st	Sat Nov 25 13:21:24 2017 +0100
+++ b/Tools__NewSystemBrowser.st	Sat Nov 25 13:21:48 2017 +0100
@@ -24460,8 +24460,8 @@
                         projectDef notNil ifTrue:[
                             code := projectDef commentOrDocumentationString.
                         ].
-                        self codeAspect:nil.
-"/                        self setAcceptActionForProjectComment.
+                        self codeAspect:#packageDocumentation.
+                        self setAcceptActionForProjectComment.
                     ] ifFalse:[
                         (selectedClassCategory := self theSingleSelectedCategory) notNil ifTrue:[
                             packages := ((Smalltalk allClassesInCategory:selectedClassCategory) collect:#package) asSet.
@@ -24493,6 +24493,7 @@
                                     ].    
                                 ].    
                                 s nextPutLine:'"'.
+                                self codeAspect:nil.
                             ].
                         ].    
                         "/ really nothing selected
@@ -24554,7 +24555,7 @@
 
     "Created: / 29-08-2006 / 13:59:06 / cg"
     "Modified: / 23-07-2014 / 12:03:06 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-    "Modified: / 25-11-2017 / 11:38:23 / cg"
+    "Modified: / 25-11-2017 / 13:11:26 / cg"
 !
 
 delayedVariableSelectionChanged
@@ -63220,17 +63221,27 @@
 setAcceptActionForProjectComment
     "tell the codeView what to do on accept"
 
-    self setAcceptAction:[:code |  |package project|
-                                package := self theSingleSelectedProject.
-                                project := Project projectWithId:package.
-                                project isNil ifTrue:[
-                                    self warn:'No such project.'
-                                ] ifFalse:[
-                                    project comment:(code asString string).
-                                    navigationState modified:false.
-                                    navigationState realModifiedState:false.
-                                ].
-                          ].
+    self 
+        setAcceptAction:[:code |  
+            |package project codeLines|
+
+            package := self theSingleSelectedProject.
+            package notNil ifTrue:[
+                package := package asPackageId.
+                project := package projectDefinitionClass.
+                project isNil ifTrue:[
+                    self warn:'No project definition class: %1' with:package projectDefinitionClassName.
+                ] ifFalse:[
+                    codeLines := code asStringCollection withoutLeadingAndTrailingBlankLines.
+                    
+                    project compile:('documentation\"\' withCRs,(codeLines asString string),'"' withCRs) categorized:#documentation.
+                    navigationState modified:false.
+                    navigationState realModifiedState:false.
+                ].
+            ].
+        ].
+
+    "Modified: / 25-11-2017 / 13:19:32 / cg"
 !
 
 setDoitActionForClass