*** empty log message ***
authorClaus Gittinger <cg@exept.de>
Mon, 14 Feb 2000 15:47:52 +0100
changeset 2608 c3260d4c3061
parent 2607 fa77c15f43bc
child 2609 41920e69990a
*** empty log message ***
AbstractLauncherApplication.st
--- a/AbstractLauncherApplication.st	Mon Feb 14 13:51:59 2000 +0100
+++ b/AbstractLauncherApplication.st	Mon Feb 14 15:47:52 2000 +0100
@@ -3375,6 +3375,7 @@
         s nextPutLine:'  BRFormatter spaceAroundTemporaries: ' , (BRFormatter spaceAroundTemporaries storeString) , '.'.
         s nextPutLine:'  BRFormatter emptyLineAfterTemporaries: ' , (BRFormatter emptyLineAfterTemporaries storeString) , '.'.
         s nextPutLine:'  BRFormatter cStyleBlocks: ' , (BRFormatter cStyleBlocks storeString) , '.'.
+        s nextPutLine:'  BRFormatter blockArgumentsOnNewLine: ' , (BRFormatter blockArgumentsOnNewLine storeString) , '.'.
         s nextPutLine:'  BRFormatter maxLengthForSingleLineBlocks: ' , (BRFormatter maxLengthForSingleLineBlocks storeString) , '.'.
         s nextPutLine:'].'.
     ].
@@ -4860,12 +4861,14 @@
 formattingConfigurationDialogFor:requestor
     |dialog frame exampleView y 
      resources exampleText formattedText reformatAction
+     reformatLocked
      oldUserPreferences
      b resetList components
      resetListBox currentUserPrefs 
      tabIndent  
      spaceAroundTemporaries emptyLineAfterTemporaries 
-     spaceAfterReturnToken spaceAfterKeywordSelector cStyleBlocks 
+     spaceAfterReturnToken spaceAfterKeywordSelector cStyleBlocks
+     blockArgumentsOnNewLine
      maxLengthForSingleLineBlocks resetValue bindings|
 
     BRFormatter isNil ifTrue:[
@@ -4924,46 +4927,52 @@
 '.
 
     formattedText := '' asValue.
+    reformatLocked := false.
 
     reformatAction := [ |tree
                          s_tabIndent s_spaceAroundTemporaries s_emptyLineAfterTemporaries
                          s_spaceAfterReturnToken s_spaceAfterKeywordSelector s_cStyleBlocks
-                         s_maxLengthForSingleLineBlocks|
-
-                        "/
-                        "/ temporary change the BRFormatters settings ...
-                        "/
-                        s_tabIndent := BRFormatter tabIndent.
-                        s_spaceAroundTemporaries := BRFormatter spaceAroundTemporaries.
-                        s_emptyLineAfterTemporaries := BRFormatter emptyLineAfterTemporaries.
-                        s_spaceAfterReturnToken := BRFormatter spaceAfterReturnToken.
-                        s_spaceAfterKeywordSelector := BRFormatter spaceAfterKeywordSelector.
-                        s_cStyleBlocks := BRFormatter cStyleBlocks.
-                        s_maxLengthForSingleLineBlocks := BRFormatter maxLengthForSingleLineBlocks.
-
-                        BRFormatter 
-                            tabIndent:tabIndent value;
-                            spaceAroundTemporaries:spaceAroundTemporaries value;
-                            emptyLineAfterTemporaries:emptyLineAfterTemporaries value;
-                            spaceAfterReturnToken:spaceAfterReturnToken value;
-                            spaceAfterKeywordSelector:spaceAfterKeywordSelector value;
-                            cStyleBlocks:cStyleBlocks value;
-                            maxLengthForSingleLineBlocks:maxLengthForSingleLineBlocks value.
-
-                        tree := BRParser 
-                                    parseMethod:exampleText
-                                    onError: [:aString :position | nil].
-
-                        formattedText value:tree printString.
-
-                        BRFormatter 
-                            tabIndent:s_tabIndent;
-                            spaceAroundTemporaries:s_spaceAroundTemporaries;
-                            emptyLineAfterTemporaries:s_emptyLineAfterTemporaries;
-                            spaceAfterReturnToken:s_spaceAfterReturnToken;
-                            spaceAfterKeywordSelector:s_spaceAfterKeywordSelector;
-                            cStyleBlocks:s_cStyleBlocks;
-                            maxLengthForSingleLineBlocks:s_maxLengthForSingleLineBlocks.
+                         s_maxLengthForSingleLineBlocks s_blockArgumentsOnNewLine|
+
+                        reformatLocked ifFalse:[
+                            "/
+                            "/ temporary change the BRFormatters settings ...
+                            "/
+                            s_tabIndent := BRFormatter tabIndent.
+                            s_spaceAroundTemporaries := BRFormatter spaceAroundTemporaries.
+                            s_emptyLineAfterTemporaries := BRFormatter emptyLineAfterTemporaries.
+                            s_spaceAfterReturnToken := BRFormatter spaceAfterReturnToken.
+                            s_spaceAfterKeywordSelector := BRFormatter spaceAfterKeywordSelector.
+                            s_cStyleBlocks := BRFormatter cStyleBlocks.
+                            s_blockArgumentsOnNewLine := BRFormatter blockArgumentsOnNewLine.
+                            s_maxLengthForSingleLineBlocks := BRFormatter maxLengthForSingleLineBlocks.
+
+                            BRFormatter 
+                                tabIndent:tabIndent value;
+                                spaceAroundTemporaries:spaceAroundTemporaries value;
+                                emptyLineAfterTemporaries:emptyLineAfterTemporaries value;
+                                spaceAfterReturnToken:spaceAfterReturnToken value;
+                                spaceAfterKeywordSelector:spaceAfterKeywordSelector value;
+                                cStyleBlocks:cStyleBlocks value;
+                                blockArgumentsOnNewLine:blockArgumentsOnNewLine value;
+                                maxLengthForSingleLineBlocks:maxLengthForSingleLineBlocks value.
+
+                            tree := BRParser 
+                                        parseMethod:exampleText
+                                        onError: [:aString :position | nil].
+
+                            formattedText value:tree printString.
+
+                            BRFormatter 
+                                tabIndent:s_tabIndent;
+                                spaceAroundTemporaries:s_spaceAroundTemporaries;
+                                emptyLineAfterTemporaries:s_emptyLineAfterTemporaries;
+                                spaceAfterReturnToken:s_spaceAfterReturnToken;
+                                spaceAfterKeywordSelector:s_spaceAfterKeywordSelector;
+                                cStyleBlocks:s_cStyleBlocks;
+                                blockArgumentsOnNewLine:s_blockArgumentsOnNewLine;
+                                maxLengthForSingleLineBlocks:s_maxLengthForSingleLineBlocks.
+                          ].
                       ].
 
     bindings := IdentityDictionary new.
@@ -4995,6 +5004,10 @@
     cStyleBlocks onChangeEvaluate:reformatAction. 
     bindings at:#cStyleBlocks put:cStyleBlocks.
 
+    blockArgumentsOnNewLine := BRFormatter blockArgumentsOnNewLine asValue.
+    blockArgumentsOnNewLine onChangeEvaluate:reformatAction. 
+    bindings at:#blockArgumentsOnNewLine put:blockArgumentsOnNewLine.
+
     maxLengthForSingleLineBlocks := BRFormatter maxLengthForSingleLineBlocks asValue.
     maxLengthForSingleLineBlocks onChangeEvaluate:reformatAction. 
     bindings at:#maxLengthForSingleLineBlocks put:maxLengthForSingleLineBlocks.
@@ -5005,24 +5018,30 @@
         [
             resetValue value == 1 ifTrue:[
                 "/ ST/X defaults
-                tabIndent setValue: 4.
-                spaceAfterReturnToken setValue: true.
-                spaceAfterKeywordSelector setValue: false.
-                spaceAroundTemporaries setValue: false.
-                emptyLineAfterTemporaries setValue: true.
-                cStyleBlocks setValue: true.
-                maxLengthForSingleLineBlocks setValue: 20.
+                reformatLocked := true.
+                tabIndent value: 4.
+                spaceAfterReturnToken value: true.
+                spaceAfterKeywordSelector value: false.
+                spaceAroundTemporaries value: false.
+                emptyLineAfterTemporaries value: true.
+                cStyleBlocks value: true.
+                blockArgumentsOnNewLine value:false.
+                maxLengthForSingleLineBlocks value: 20.
+                reformatLocked := false.
                 reformatAction value.
             ].
             resetValue value == 2 ifTrue:[
                 "/ BRParser defaults
-                tabIndent setValue: 8.
-                spaceAfterReturnToken setValue: false.
-                spaceAfterKeywordSelector setValue: true.
-                spaceAroundTemporaries setValue: true.
-                emptyLineAfterTemporaries setValue: false.
-                cStyleBlocks setValue: false.
-                maxLengthForSingleLineBlocks setValue: 20.
+                reformatLocked := true.
+                tabIndent value: 8.
+                spaceAfterReturnToken value: false.
+                spaceAfterKeywordSelector value: true.
+                spaceAroundTemporaries value: true.
+                emptyLineAfterTemporaries value: false.
+                cStyleBlocks value: false.
+                blockArgumentsOnNewLine value:false.
+                maxLengthForSingleLineBlocks value: 20.
+                reformatLocked := false.
                 reformatAction value.
             ].
             resetValue value:nil. "/ to force default label
@@ -5050,6 +5069,7 @@
             spaceAfterReturnToken:spaceAfterReturnToken value;
             spaceAfterKeywordSelector:spaceAfterKeywordSelector value;
             cStyleBlocks:cStyleBlocks value;
+            blockArgumentsOnNewLine:blockArgumentsOnNewLine value;
             maxLengthForSingleLineBlocks:maxLengthForSingleLineBlocks value.
     ] ifFalse: [
         (UserPreferences reset; current) declareAllFrom: oldUserPreferences
@@ -5257,7 +5277,7 @@
           #name: 'Formatting parameters'
           #min: #(#Point 10 10)
           #max: #(#Point 1280 1024)
-          #bounds: #(#Rectangle 13 23 609 606)
+          #bounds: #(#Rectangle 10 406 606 989)
         )
         #component: 
        #(#SpecCollection
@@ -5289,7 +5309,7 @@
                  #(#LabelSpec
                     #label: 'Max length for single line blocks:'
                     #name: 'Label1'
-                    #layout: #(#LayoutFrame 185 0.0 115 0 66 0.7 141 0)
+                    #layout: #(#LayoutFrame 185 0.0 127 0 66 0.7 153 0)
                     #level: 0
                     #adjust: #right
                   )
@@ -5340,7 +5360,7 @@
                   )
                  #(#InputFieldSpec
                     #name: 'editField'
-                    #layout: #(#LayoutFrame 74 0.7 81 0 -38 1.0 107 0)
+                    #layout: #(#LayoutFrame 74 0.7 93 0 -38 1.0 119 0)
                     #level: -1
                     #tabable: true
                     #model: #tabIndent
@@ -5355,13 +5375,13 @@
                  #(#LabelSpec
                     #label: 'Indent:'
                     #name: 'label'
-                    #layout: #(#LayoutFrame 242 0.0 81 0 66 0.7 107 0)
+                    #layout: #(#LayoutFrame 242 0.0 93 0 66 0.7 119 0)
                     #level: 0
                     #adjust: #right
                   )
                  #(#InputFieldSpec
                     #name: 'EntryField1'
-                    #layout: #(#LayoutFrame 74 0.7 115 0 -38 1.0 141 0)
+                    #layout: #(#LayoutFrame 74 0.7 127 0 -38 1.0 153 0)
                     #level: -1
                     #tabable: true
                     #model: #maxLengthForSingleLineBlocks
@@ -5376,12 +5396,21 @@
                  #(#PopUpListSpec
                     #label: 'Reset to...'
                     #name: 'PopUpList1'
-                    #layout: #(#LayoutFrame 2 0 117 0 127 0 139 0)
+                    #layout: #(#LayoutFrame 2 0 129 0 127 0 151 0)
                     #tabable: true
                     #model: #resetValue
                     #menu: #resetList
                     #useIndex: true
                   )
+                 #(#CheckBoxSpec
+                    #label: 'Block args on new line'
+                    #name: 'CheckBox5'
+                    #layout: #(#LayoutFrame 267 0 59 0 567 0 88 0)
+                    #level: 0
+                    #tabable: true
+                    #model: #blockArgumentsOnNewLine
+                    #translateLabel: true
+                  )
                  )
                
               )
@@ -5423,12 +5452,10 @@
          
         )
       )
-
-    "Modified: / 11.2.2000 / 09:52:57 / cg"
 ! !
 
 !AbstractLauncherApplication class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libtool/AbstractLauncherApplication.st,v 1.100 2000-02-11 13:19:03 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libtool/AbstractLauncherApplication.st,v 1.101 2000-02-14 14:47:52 cg Exp $'
 ! !