Faculty of Information Technology
Software Engineering Group

Opened 6 years ago

Last modified 6 years ago

#132 new defect

Variable highlighting should be consistent when selecting via mouse

Reported by: Patrik Svestka Owned by:
Priority: major Milestone:
Component: default Keywords:
Cc: Also affects CVS HEAD (eXept version): no

Description

There is a nice functionality. When you double click on a variable all the instances are selected - this does not currently work correctly. It shows only some of the variables (when assigning value to a variable).

More on the screenshots

Attachments (2)

selecting_variable_1.jpg (165.7 KB) - added by Patrik Svestka 6 years ago.
Selected varible but those assigned are not shown
selecting_variable_2.jpg (164.1 KB) - added by Patrik Svestka 6 years ago.
When you click on the assigment nothing other is selected

Download all attachments as: .zip

Change History (5)

Changed 6 years ago by Patrik Svestka

Attachment: selecting_variable_1.jpg added

Selected varible but those assigned are not shown

Changed 6 years ago by Patrik Svestka

Attachment: selecting_variable_2.jpg added

When you click on the assigment nothing other is selected

comment:1 Changed 6 years ago by Jan Vrany

May I have the code shown on screenshot in verbatim so I can copy-paste it to a running system and eventually turn in into a test case? Thanks.

comment:2 in reply to:  1 Changed 6 years ago by Patrik Svestka

Replying to jan vrany:

May I have the code shown on screenshot in verbatim so I can copy-paste it to a running system and eventually turn in into a test case? Thanks.

Nearly identical code is at the https://swing.fit.cvut.cz/projects/stx-jv/ticket/126#comment:5. It suffers from the same issue.

comment:3 Changed 6 years ago by Patrik Svestka

Ah, found even nearly the original:

 "/Smalltalk versionString'6.2.5.2131'

maxCharBuffer := 3273.
charToDisplay := 4095.
contents := String new: charToDisplay.
tempContents := String new.
aCollection := OrderedCollection new.

iterrations := (charToDisplay / maxCharBuffer) floor + 1.       

[iterrations > 0] whileTrue: [
    aCollection add: ((70 + iterrations) asCharacter).
    iterrations := iterrations - 1.
  ].

aCollection do: [:aLetter|
  charToDisplay > maxCharBuffer ifTrue: [
      tempContents := contents copyFrom:1 to:maxCharBuffer.
      tempContents replaceAll: Character space with: aLetter. 
      charToDisplay := charToDisplay - maxCharBuffer.
    ] ifFalse: [
        t := tempContents.
        contents copyFrom:(maxCharBuffer+1) to:charToDisplay. 
        tempContents := contents copyFrom:(maxCharBuffer+1) to:(maxCharBuffer + charToDisplay).
        tempContents replaceAll: Character space with: aLetter.
        contents := t, tempContents.
       ].
  ].

top := StandardSystemView new.
top extent:300@200.

textView := EditTextView new.
textView origin:0.0 @ 0.0 corner:1.0 @ 1.0.
top addSubView:textView.

textView contents: contents.

top open.   

Note: See TracTickets for help on using tickets.