Ticket #165: libtool_fix_1_of_1_rev_b5bcb51d114a_Issue__165__Not_all_spaces_are_created_equal.patch

File libtool_fix_1_of_1_rev_b5bcb51d114a_Issue__165__Not_all_spaces_are_created_equal.patch, 9.1 KB (added by patrik.svestka@…, 7 years ago)

Adding new trimBlankLines option

  • AbstractSettingsApplication.st

    # HG changeset patch
    # User Patrik Svestka <patrik.svestka@gmail.com>
    # Date 1504788656 -7200
    #      Thu Sep 07 14:50:56 2017 +0200
    # Branch jv
    # Node ID b5bcb51d114a046a7867abab235ee90f99c97d2a
    # Parent  6d0aaaa2ec779a7824d2fa0978fbfcd8073d4f38
    Issue #165: Not all spaces are created equal
    
    When only empty spaces are on a line and you perform backspace from line below it
    you will delete all whitespaces if trimBlankLines is set to true; if false then
    these whitespaces will be retained.
    
    https://swing.fit.cvut.cz/projects/stx-jv/ticket/165
    
    diff -r 6d0aaaa2ec77 -r b5bcb51d114a AbstractSettingsApplication.st
    a b  
    122122                showAcceptCancelBarInBrowser useCodeView2InTools
    123123                autoIndentInCodeView immediateCodeCompletion
    124124                codeCompletionOnControlKey codeCompletionOnTabKey
    125                 selectionExtensionMode'
     125                selectionExtensionMode trimBlankLines'
    126126        classVariableNames:''
    127127        poolDictionaries:''
    128128        privateIn:AbstractSettingsApplication
     
    48244824
    48254825    ^ super flyByHelpSpec addPairsFrom:#(
    48264826
    4827 "/#resetToDefault
    4828 "/'Reset fonts back to original default values (as specified in the window style-file and OS settings)'
    4829 "/
    4830 "/#changeToHighContrast
    4831 "/'Change settings for higher contrast. Useful for presentations and outdor operation'
    4832 "/
    4833 "/#changeToBigFonts
    4834 "/'Change settings for bigger fonts. Useful for presentations'
    4835 "/
    4836 "/#changeToHugeFonts
    4837 "/'Change settings for huge fonts. Useful for presentations'
    4838 "/
    4839 "/#changeToSTXLook
    4840 "/'Change settings for an ST/X-like look (fixed-width code fonts)'
    4841 "/
    4842 "/#changeToSqueakLook
    4843 "/'Change settings for a Squeak-like look (variable fonts)'
    4844 "/
    4845 "/#changeToVisualAgeLook
    4846 "/'Change settings for a VisualAge-like look (bold variable fonts)'
    4847 
    4848 #immediateCodeCompletion
    4849 'Show code completion suggestions as you type.\This is an experimental feature, please disable it if you encounter problems.'
     4827#alwaysPasteFileContents
     4828'When pasting a file (from the Filebrowser or Explorer), always paste the file''s contents\without asking. If off, a dialog appears to ask the name or the contents of the file should be pasted'
     4829
     4830#autoIndentInCodeView
     4831'Automatically position the cursor to a reasonably indented position when pressing the return key.\This affects editors which show code'
    48504832
    48514833#codeCompletionOnControlKey
    48524834'Show code completion suggestions when you hit the CTRL key, and the character before the cursor is non-blank.\This is an experimental feature, please disable it if you encounter problems.\(CTRL-Space still works as usual, even if this is disabled)'
     
    48574839#codeCompletionViewKeyboardNavigationNeedsModifier
    48584840'If on, cursor up/down are only passed to the floating completion view,\if a shift- or control modifier is pressed.\Check this, if you find it annoying, that cursor up/down is intercepted by a floating completion view.'
    48594841
    4860 #alwaysPasteFileContents
    4861 'When pasting a file (from the Filebrowser or Explorer), always paste the file''s contents\without asking. If off, a dialog appears to ask the name or the contents of the file should be pasted'
    4862 
    4863 #autoIndentInCodeView
    4864 'Automatically position the cursor to a reasonably indented position when pressing the return key.\This affects editors which show code'
    4865 
    48664842#extendedWordSelectMode
    48674843'Controls if underlines will be treated as part of the word or not when selecting a word.\Many programming languages (including ST/X, but excluding Squeak and old ST80)\treat underline like a letter in identifiers'
    48684844
     4845#immediateCodeCompletion
     4846'Show code completion suggestions as you type.\This is an experimental feature, please disable it if you encounter problems.'
     4847
    48694848#searchBoxIsModal
    48704849'If off, a text search box is non-modal, and can be left floating beside an editor to mix search and edit operations.\If modal, it behaves as usual, blocking interaction with the editor while open'
    48714850
    48724851#selectAllWhenClickingBeyondEnd
    48734852'If on, a click beyond (i.e. below) the end of the text selects the whole text.\If off, use quadruple-click to select all (triple-click to select a full line)'
    48744853
     4854#selectionExtensionModelStandard
     4855'Standard behavior - most text editors and text widgets behave like this.'
     4856
     4857#selectionExtensionModelTraditional
     4858'Traditional ST/X behavior (better but not standard).\Shift-End moves end of selection (if it is on the same line).\Shift-Home moves start of selection (if it is on the same line)'
     4859
    48754860#showAcceptCancelBar
    48764861'Display an green-red-yellow accept-cancel bar to the left of the text.\Press green to accept, red to cancel, and yellow to compare against the original version.'
    48774862
     
    48814866#st80EditMode
    48824867'Enable the ST-80 line-end/text-end cursor behavior.\There, the cursor cannot be positioned beyond the end of text, and cursor movement leads to the next/previous line.\This is similar to the behavior of other editors, such as "vi" or "emacs".\If off, the page is treated like a piece of paper, where any position can be reached immediately ("Rand-Editor" behavior)'
    48834868
    4884 
    48854869#startTextDragWithCTRL
    48864870'Press CTRL to drag the selected text into another view'
    48874871
    48884872#tabStops4
    48894873'Controls if tab stops are multiples of 4 or 8 while editing.\Notice that this only affects the cursor positioning while editing, and that tabs are never part of the text internally.\The external (file-) representation always uses tab stops in multiples of 8.\Thus, when saving, one leading tab is generated for every 8 leading spaces,\and when reading a file, each tab is replaced by 8 spaces.\For ST/X, using multiple of 4 is recommended (the whole system was written in this style)'
    48904874
     4875#trimBlankLines
     4876'Trims all the white-spaces at the line (when no other character is present).\An example: If true, and have one line with all white-spaces and go to one line below it and press backspace.\It will delete all the white-spaces above.'
     4877
    48914878#useNewCodeView2
    48924879'Use the new advanced CodeView2, which supports line numbers, advanced variable and selector highlighting,\and other useful programmer features'
    48934880
    48944881#whitespaceWordSelectMode
    48954882'Controls if non-whitespace separators (such as fullstop, parentheses etc.) are treated as separator when selecting a word via double-click.\If off, only whitespace is treated as such. Useful when editing plain text, or code written in Lisp or Scheme'
    48964883
    4897 #selectionExtensionModelStandard
    4898 'Standard behavior - most text editors and text widgets behave like this.'
    4899 
    4900 #selectionExtensionModelTraditional
    4901 'Traditional ST/X behavior (better but not standard).\Shift-End moves end of selection (if it is on the same line).\Shift-Home moves start of selection (if it is on the same line)'
    4902 
    49034884)
    4904 
    4905     "Created: / 17-03-2012 / 11:37:51 / cg"
    4906     "Modified: / 27-03-2014 / 10:19:17 / Jan Vrany <jan.vrany@fit.cvut.cz>"
    49074885! !
    49084886
    49094887!AbstractSettingsApplication::EditSettingsAppl class methodsFor:'image specs'!
     
    49404918         name: 'Editor Settings'
    49414919         flags: 1
    49424920         min: (Point 10 10)
    4943          bounds: (Rectangle 0 0 658 543)
     4921         bounds: (Rectangle 0 0 658 803)
    49444922       )
    49454923       component:
    49464924      (SpecCollection
     
    49484926          (VerticalPanelViewSpec
    49494927             name: 'VerticalPanel1'
    49504928             layout: (LayoutFrame 0 0 0 0 0 1 0 1)
     4929             activeHelpKey: trimBlankLines
    49514930             horizontalLayout: fit
    49524931             verticalLayout: top
    49534932             horizontalSpace: 3
     
    50785057                   translateLabel: true
    50795058                   extent: (Point 658 30)
    50805059                 )
     5060                (CheckBoxSpec
     5061                   label: 'Trim blank lines (removes all white spaces at once)'
     5062                   name: 'trimBlankLines'
     5063                   activeHelpKey: trimBlankLines
     5064                   model: trimBlankLines
     5065                   translateLabel: true
     5066                   extent: (Point 658 22)
     5067                 )
    50815068                (DividerSpec
    50825069                   name: 'Separator3'
    50835070                   extent: (Point 658 4)
     
    51995186         #codeCompletionOnTabKey
    52005187         #codeCompletionViewKeyboardNavigationNeedsModifier
    52015188         #selectionExtensionMode
     5189         #trimBlankLines     
    52025190    )
    52035191
    52045192    "Modified: / 07-03-2012 / 14:33:40 / cg"
    52055193    "Modified: / 27-03-2014 / 10:10:25 / Jan Vrany <jan.vrany@fit.cvut.cz>"
     5194    "Modified: / 05-09-2017 / 14:45:24 / svestkap"
    52065195! !
    52075196
    52085197!AbstractSettingsApplication::EditSettingsAppl methodsFor:'aspects'!
     
    52235212         #codeCompletionOnTabKey
    52245213         #codeCompletionViewKeyboardNavigationNeedsModifier
    52255214         #selectionExtensionMode
     5215         #trimBlankLines
    52265216    )
    52275217
    52285218    "Modified: / 07-03-2012 / 14:33:40 / cg"
    52295219    "Modified: / 27-03-2014 / 10:10:25 / Jan Vrany <jan.vrany@fit.cvut.cz>"
     5220    "Modified: / 05-09-2017 / 13:45:23 / svestkap"
    52305221!
    52315222
    52325223autoIndentInCodeView
     
    53545345    ^ tabsIs4.
    53555346!
    53565347
     5348trimBlankLines
     5349    trimBlankLines isNil ifTrue:[
     5350        trimBlankLines := true asValue.
     5351        trimBlankLines onChangeSend:#updateModifiedChannel to:self.
     5352    ].
     5353    ^ trimBlankLines
     5354
     5355    "Modified: / 05-09-2017 / 14:44:04 / svestkap"
     5356!
     5357
    53575358useCodeView2InTools
    53585359    useCodeView2InTools isNil ifTrue:[
    53595360        useCodeView2InTools := ValueHolder new.