Faculty of Information Technology
Software Engineering Group

Ticket #125: issue_125_patch_1_of_1_r9417c310265a.patch

File issue_125_patch_1_of_1_r9417c310265a.patch, 1.6 KB (added by Patrik Svestka, 3 years ago)

Copy the whole String in libtool

  • InspectorView.st

    # HG changeset patch
    # User Patrik Svestka <patrik.svestka@gmail.com>
    # Date 1488966539 -3600
    #      Wed Mar 08 10:48:59 2017 +0100
    # Branch jv
    # Node ID 9417c310265a04aff456fa0bb0d3ad84976cb763
    # Parent  a294c60caf42b68bfcbb6fd4a7623f5354e48200
    Issue #125: When a Collection contains spaces in a collection only partial key is copied in Tools::Inspector2
    
    Fix in `InspectorView >> #selectedKeyName`
    Copies the whole key from 1 character till the end.
    
    The previous implementation copied only to the first space (copyUpTo:(Character space)) which is incorrect
    when the actual value contains spaces.  Results in only partial copy.
    
    (note: Tried to mimic the previous behaviour using regexp (the current StX implementation is old and missing some
    important features) and PEG (did not figure out how to correctly write it in PEG) but failed).
    https://swing.fit.cvut.cz/projects/stx-jv/ticket/125
    
    diff -r a294c60caf42 -r 9417c310265a InspectorView.st
    a b  
    40714071            "/ careful: pseudo entries may have spaces in-between
    40724072            (sel startsWith:'-') ifFalse:[
    40734073                "/ clip off the value-info string
    4074                 sel := sel copyUpTo:(Character space).
     4074                sel := sel copyFrom: 1. "/copies everything from the start to the end
    40754075            ].
    40764076            ^ sel
    40774077        ].
    40784078    ].
    40794079    ^ nil
     4080
     4081    "Modified: / 08-03-2017 / 10:14:51 / svestkap"
    40804082!
    40814083
    40824084suppressPseudoSlots
     
    43144316
    43154317version_CVS
    43164318    ^ '$Header$'
     4319!
     4320
     4321version_HG
     4322
     4323    ^ '$Changeset: <not expanded> $'
    43174324! !
    43184325
    43194326