Tools__CodeView2.st
changeset 18342 5a5b35dd776d
parent 18190 41c70f47bd2b
child 18346 4f8e9d971ef6
equal deleted inserted replaced
18341:35e3b3db76c8 18342:5a5b35dd776d
  1556     "Modified: / 06-10-2011 / 14:14:20 / cg"
  1556     "Modified: / 06-10-2011 / 14:14:20 / cg"
  1557 !
  1557 !
  1558 
  1558 
  1559 linesModifiedFrom: start to: end
  1559 linesModifiedFrom: start to: end
  1560 
  1560 
  1561     services do: [:each |
  1561     services do:[:each |
  1562         each isEnabled ifTrue: [
  1562         each isEnabled ifTrue: [
  1563             each linesModifiedFrom: start to: end
  1563             each linesModifiedFrom: start to: end
  1564         ]
  1564         ]
  1565     ].
  1565     ].
  1566 
  1566 
  1567     "Created: / 06-07-2011 / 17:12:58 / jv"
  1567     "Created: / 06-07-2011 / 17:12:58 / jv"
  1568     "Modified: / 06-10-2011 / 14:13:44 / cg"
  1568     "Modified: / 06-10-2011 / 14:13:44 / cg"
       
  1569     "Modified (format): / 22-08-2018 / 09:23:04 / Claus Gittinger"
  1569 !
  1570 !
  1570 
  1571 
  1571 scrollDown: nLines in: view
  1572 scrollDown: nLines in: view
  1572 
  1573 
  1573     view == textView 
  1574     view == textView 
  3928 !
  3929 !
  3929 
  3930 
  3930 basicWithoutRedrawInsertLines:lines from:start to:end before:lineNr
  3931 basicWithoutRedrawInsertLines:lines from:start to:end before:lineNr
  3931     super basicWithoutRedrawInsertLines:lines from:start to:end before:lineNr.
  3932     super basicWithoutRedrawInsertLines:lines from:start to:end before:lineNr.
  3932     self updateReallyModified.
  3933     self updateReallyModified.
       
  3934     
       
  3935     codeView linesInsertedFrom:lineNr to:lineNr+(end-start).
       
  3936 
       
  3937     "Modified: / 22-08-2018 / 09:26:03 / Claus Gittinger"
  3933 !
  3938 !
  3934 
  3939 
  3935 basicWithoutRedrawInsertStringWithoutCRs:aString atLine:lineNr col:colNr
  3940 basicWithoutRedrawInsertStringWithoutCRs:aString atLine:lineNr col:colNr
  3936     super basicWithoutRedrawInsertStringWithoutCRs:aString atLine:lineNr col:colNr.
  3941     super basicWithoutRedrawInsertStringWithoutCRs:aString atLine:lineNr col:colNr.
  3937     self updateReallyModified.
  3942     self updateReallyModified.
       
  3943     codeView linesInsertedFrom:lineNr to:lineNr.
       
  3944 
       
  3945     "Modified: / 22-08-2018 / 09:27:20 / Claus Gittinger"
  3938 !
  3946 !
  3939 
  3947 
  3940 insertLines:someText from:start to:end before:lineNr
  3948 insertLines:someText from:start to:end before:lineNr
  3941 
  3949 
  3942     "/JV@2011-12-20: HACK, the super implementation should
  3950     "/JV@2011-12-20: HACK, the super implementation should
  4157 
  4165 
  4158 notifyLinesDeletedFrom: startLine to: endLine
  4166 notifyLinesDeletedFrom: startLine to: endLine
  4159 
  4167 
  4160     self updateReallyModified.
  4168     self updateReallyModified.
  4161     suppressNotifications ifTrue:[^self].
  4169     suppressNotifications ifTrue:[^self].
       
  4170     
  4162     codeView linesDeletedFrom: startLine to: endLine.
  4171     codeView linesDeletedFrom: startLine to: endLine.
  4163     suppressNotifications := true.
  4172     suppressNotifications := true.
  4164 
  4173 
  4165     "Created: / 28-06-2011 / 09:12:04 / Jan Vrany <jan.vrany@fit.cvut.cz>"
  4174     "Created: / 28-06-2011 / 09:12:04 / Jan Vrany <jan.vrany@fit.cvut.cz>"
  4166     "Modified: / 06-07-2011 / 17:47:05 / jv"
  4175     "Modified: / 06-07-2011 / 17:47:05 / jv"
  4167     "Modified: / 07-10-2011 / 19:20:39 / Jan Vrany <jan.vrany@fit.cvut.cz>"
  4176     "Modified: / 07-10-2011 / 19:20:39 / Jan Vrany <jan.vrany@fit.cvut.cz>"
       
  4177     "Modified (format): / 22-08-2018 / 09:23:22 / Claus Gittinger"
  4168 !
  4178 !
  4169 
  4179 
  4170 notifyLinesInsertedFrom: startLine to: endLine
  4180 notifyLinesInsertedFrom: startLine to: endLine
  4171 
  4181 
  4172     self updateReallyModified.
  4182     self updateReallyModified.
  4173     suppressNotifications ifTrue:[^self].
  4183     suppressNotifications ifTrue:[^self].
       
  4184 
  4174     codeView linesInsertedFrom: startLine to: endLine.
  4185     codeView linesInsertedFrom: startLine to: endLine.
  4175     suppressNotifications := true.
  4186     suppressNotifications := true.
  4176 
  4187 
  4177     "Created: / 28-06-2011 / 09:12:14 / Jan Vrany <jan.vrany@fit.cvut.cz>"
  4188     "Created: / 28-06-2011 / 09:12:14 / Jan Vrany <jan.vrany@fit.cvut.cz>"
  4178     "Modified: / 06-07-2011 / 17:47:20 / jv"
  4189     "Modified: / 06-07-2011 / 17:47:20 / jv"
  4179     "Modified: / 07-10-2011 / 19:20:49 / Jan Vrany <jan.vrany@fit.cvut.cz>"
  4190     "Modified: / 07-10-2011 / 19:20:49 / Jan Vrany <jan.vrany@fit.cvut.cz>"
       
  4191     "Modified (format): / 22-08-2018 / 09:21:08 / Claus Gittinger"
  4180 !
  4192 !
  4181 
  4193 
  4182 notifyLinesModifiedFrom: startLine to: endLine
  4194 notifyLinesModifiedFrom: startLine to: endLine
  4183 
  4195 
  4184     self updateReallyModified.
  4196     self updateReallyModified.
  4185     suppressNotifications ifTrue:[^self].
  4197     suppressNotifications ifTrue:[^self].
       
  4198     
  4186     codeView linesModifiedFrom: startLine to: endLine.
  4199     codeView linesModifiedFrom: startLine to: endLine.
  4187     suppressNotifications := true.
  4200     suppressNotifications := true.
  4188 
  4201 
  4189     "Modified: / 06-07-2011 / 17:47:20 / jv"
  4202     "Modified: / 06-07-2011 / 17:47:20 / jv"
  4190     "Created: / 16-09-2011 / 15:12:33 / Jan Vrany <jan.vrany@fit.cvut.cz>"
  4203     "Created: / 16-09-2011 / 15:12:33 / Jan Vrany <jan.vrany@fit.cvut.cz>"
       
  4204     "Modified (format): / 22-08-2018 / 09:23:25 / Claus Gittinger"
  4191 ! !
  4205 ! !
  4192 
  4206 
  4193 !CodeView2::TextView methodsFor:'private'!
  4207 !CodeView2::TextView methodsFor:'private'!
  4194 
  4208 
  4195 isTextDifferentFromOriginalSource
  4209 isTextDifferentFromOriginalSource
  4359     "is there is a syntax element at position?
  4373     "is there is a syntax element at position?
  4360      If so, return the element; otherwise, return nil"
  4374      If so, return the element; otherwise, return nil"
  4361 
  4375 
  4362     |syntaxElements el|
  4376     |syntaxElements el|
  4363 
  4377 
  4364     syntaxElements := codeView syntaxElements.
  4378     (syntaxElements := codeView syntaxElements) isEmptyOrNil ifTrue:[^ nil].
  4365     syntaxElements isEmptyOrNil ifTrue:[^ nil].
  4379 
  4366     el := syntaxElements detect:[:el | position between:el start and:el stop] ifNone:nil.
  4380     el := syntaxElements detect:[:el | position between:el start and:el stop] ifNone:nil.
  4367     el isNil ifTrue:[^ nil].
  4381     el isNil ifTrue:[^ nil].
  4368     ^ el.
  4382     ^ el.
  4369 
  4383 
  4370     "Created: / 08-03-2012 / 14:21:52 / cg"
  4384     "Created: / 08-03-2012 / 14:21:52 / cg"
       
  4385     "Modified: / 22-08-2018 / 08:13:04 / Claus Gittinger"
  4371 !
  4386 !
  4372 
  4387 
  4373 syntaxElementForSelectedVariable
  4388 syntaxElementForSelectedVariable
  4374     "is there is a syntax element for a variable under the cursor?
  4389     "is there is a syntax element for a variable under the cursor?
  4375      If so, return the element; otherwise, return nil"
  4390      If so, return the element; otherwise, return nil"