qiyitang71 / jpf-visual

JPF Visual
1 stars 1 forks source link

Expand/collapse transition summary #2

Closed qiyitang71 closed 7 years ago

qiyitang71 commented 7 years ago

Original report by Artho Cyrille (Bitbucket: 557058:d037361a-d6a1-4cae-80e0-7b1940bbc779, GitHub: cyrille-artho).


  1. In each row/swimlane: Expanded version with transition summary (now) becomes collapsed version.

  2. When a user clicks the [+/-] button in a cell representing a transition range, the row with cell representing a transition (with a summary) should be replaced with the details, the source code of the transition(s).

The entire row will then show the full transition source code, (currently) as output by the JPF console reporter.

When clicking at the expanded description, the summary appears again.

Example:

To show where the code belongs to, perhaps a simple short vertical line in the middle of the column of the right thread, will do. Example with Tr. 0 - 2 expanded:


Tr. | main | Thread-1 | Thread-2 | ...

[-] | gov.nasa.jpf.vm.choice.ThreadChoiceFromSet {id:"ROOT" ,1/1,isCascaded:false} [3157 insn w/o sources] oldclassic.java:46 : Event new_event1 = new Event(); oldclassic.java:58 : class Event { [1 insn w/o sources] oldclassic.java:59 : int count = 0; oldclassic.java:46 : Event new_event1 = new Event(); oldclassic.java:47 : Event new_event2 = new Event(); oldclassic.java:58 : class Event {

qiyitang71 commented 7 years ago

Original comment by Artho Cyrille (Bitbucket: 557058:d037361a-d6a1-4cae-80e0-7b1940bbc779, GitHub: cyrille-artho).


Very good implementation so far!

  1. The transitions should be shown in the collapsed state by default.
  2. There is some extra white space at the bottom of the expanded transitions, mostly if the source code is quite long. I'm not sure how easy it is to get the exact dimensions.
  3. Expanding a (large) collapsed transition often results in a second "internal" scroll bar, which disappears again when scrolling the entire canvas. It would be good if this could be avoided.
  4. Showing the thread numbers is a very good idea! Probably they could be shown in bold text with a slightly larger font.
  5. Do not show the ellipsis ("...") if the transition summary is only one or two lines long.
qiyitang71 commented 7 years ago

Original comment by Artho Cyrille (Bitbucket: 557058:d037361a-d6a1-4cae-80e0-7b1940bbc779, GitHub: cyrille-artho).


Great, everything works as described above. The older version showed the transition numbers in the collapsed format. Is it possible to show them again in the current version?

qiyitang71 commented 7 years ago

Original comment by Qiyi Tang (Bitbucket: 557058:2fa1148b-f902-41e5-ac1b-c0f7bdf50d33, GitHub: qiyitang71).


Hi yes, please check the if it is OK.

qiyitang71 commented 7 years ago

Original comment by Artho Cyrille (Bitbucket: 557058:d037361a-d6a1-4cae-80e0-7b1940bbc779, GitHub: cyrille-artho).


Implemented