Project

General

Profile

Revision 64

changed layout of debugger view, added some sort of logic for not showing evals on tooltips for keywords,
add debugger restart logic, fixed some icon assignments, fixed off by one line error in breakpoint activation

View differences:

cSplatCodeMax.pkg
47 47
    Integer iVoid
48 48
  
49 49
    Get AddImage "brkp_obj.ico"     To iVoid // bit 1 // seems the first image is ignored as a margin image
50
    Get AddImage "inst_ptr.ico"     To iVoid // bit 2
50
    Get AddImage "inst_ptr_top.ico" To iVoid // bit 2
51 51
    Get AddImage "brkp_obj.ico"     To iVoid // bit 3
52
    Get AddImage "inst_ptr_top.ico" To iVoid // bit 4
52
    Get AddImage "inst_ptr.ico"     To iVoid // bit 4
53 53
  End_Procedure
54 54
End_Class
55 55

  
......
426 426
    Boolean bIsProperty
427 427
    Boolean bIsProcedure
428 428
    Boolean bIsObject
429
    Boolean bIsKeyword
430
    Boolean bPaused
429 431
    Boolean bOK
430 432
    
431 433
    // Does not always return what we need
......
438 440
        Move ""    To sResult
439 441
        Move ""    To sType
440 442
        Move False To bIsObject
441
        Get IsVariableProperty of hoDebugger sWord To bIsProperty
442
        If (bIsProperty) Begin
443
          Get ObjectForProperty sWord llLine llColumn to sTargetObject
444
          Move (sWord+"("+sTargetObject+")") To sWord
445
          Move "Property " To sType
446
        End
447
        Else Begin
448
          Get IsVariableProcedure Of hoDebugger sWord To bIsProcedure
449
          If (bIsProcedure) Begin
450
            Move "Procedure " To sType
451
          End
452
          Else Begin
453
            If (lowercase(sWord)="self") Begin
454
              Move "Object " To sType
455
              Move True     To bIsObject
443
        Get pbProgramPaused    Of hoDebugger To bPaused
444
        If (bPaused) Begin
445
          Get IsLanguageKeyword of hoDebugger sWord To bIsKeyword //
446
          If (bIsKeyword=false) Begin
447
            Get IsVariableProperty of hoDebugger sWord To bIsProperty
448
            If (bIsProperty) Begin
449
              Get ObjectForProperty sWord llLine llColumn to sTargetObject
450
              Move (sWord+"("+sTargetObject+")") To sWord
451
              Move "Property " To sType
456 452
            End
457
          End
458
        End
459
        Move ("Evaluating "+sType+"'"+sWord+"' results in"+character(10)) To llTipText
460
        If (bIsProcedure) Begin
461
          Move "Not evaluating methods." To sResult
462
        End
463
        Else Begin
464
          Get ComEval of hoDebugger sWord (&sResult) to bOK
465
        End
466
        If (bOK) Begin
467
          If (bIsObject) Begin
468
            Move sResult To sObjectID
469
            Move ""      To sObjectName
470
            Get ComEval of hoDebugger ("name("+sObjectID+")") (&sObjectName) to bOK
453
            Else Begin
454
              Get IsVariableProcedure Of hoDebugger sWord To bIsProcedure
455
              If (bIsProcedure) Begin
456
                Move "Procedure " To sType
457
              End
458
              Else Begin
459
                If (lowercase(sWord)="self") Begin
460
                  Move "Object " To sType
461
                  Move True     To bIsObject
462
                End
463
              End
464
            End
465
            Move ("Evaluating "+sType+"'"+sWord+"' results in"+character(10)) To llTipText
466
            If (bIsProcedure) Begin
467
              Move "Not evaluating methods." To sResult
468
            End
469
            Else Begin
470
              Get ComEval of hoDebugger sWord (&sResult) to bOK
471
            End
471 472
            If (bOK) Begin
472
              Move (sResult+" ("+sObjectName+") ") To sResult
473
              If (bIsObject) Begin
474
                Move sResult To sObjectID
475
                Move ""      To sObjectName
476
                Get ComEval of hoDebugger ("name("+sObjectID+")") (&sObjectName) to bOK
477
                If (bOK) Begin
478
                  Move (sResult+" ("+sObjectName+") ") To sResult
479
                End
480
              End
481
              Move (sResult+character(10)+character(10)+"Eval OK") To sResult
473 482
            End
483
            Else Begin
484
              Move (sResult+character(10)+character(10)+"Eval Failed") To sResult
485
            End
474 486
          End
475
          Move (sResult+character(10)+character(10)+"Eval OK") To sResult
487
          Else Begin
488
            Move ("Keyword "+sWord) To sResult
489
          End
476 490
        End
477 491
        Else Begin
478
          Move (sResult+character(10)+character(10)+"Eval Failed") To sResult
492
          Move sWord To sResult
479 493
        End
480 494
        Move (sResult+", line="+trim(llLine+1)*", column="+Trim(llColumn+1)) To sResult
481 495
      End
......
550 564
  
551 565
  Procedure doOpenSourceFileAtLine String sFileName Integer iLine
552 566
    Integer eBkLineColor
567
    Integer iTopMostLine
553 568
    Boolean bVisible
554 569
    Boolean bScrollup
555 570
    
556 571
    Move false to bScrollup
557 572
    Send doOpenSourceFile sFileName
558
    Set piCurrentLine To iLine
559
    If (iLine>10) Begin
560
      Move (iLine-4) To iLine // scroll up a bit so we can see context
573
    Set piCurrentLine to iLine
574
    Move iLine to iTopMostLine
575
    If (iLine>5) Begin
576
      Move (iLine-4) to iTopMostLine // scroll up a bit so we can see context
561 577
      Move true to bScrollup
562 578
    End
563
    Send ComSetTopIndex 0 iLine
564
    If (bScrollup) Move (iLine+3) to iLine
579
    Send ComSetTopIndex 0 iTopMostLine
580
    If (iLine>=0) Begin
581
        Send ComSetMarginImages (iLine-1) ICO_Inst_ptr //ICO_Brkp_obj// 2
582
        //Set psFilename     of oCodeMax To sFileName
583
        // Make it visible to the user where we are
584
        //Move True to bVisible
585
        //Send ComSelectLine of oCodeMax iLine bVisible
586
        Move (RGB(223,253,193)) to eBkLineColor
587
        Send ComSetLineColor (iLine-1) eBkLineColor //clYellow
588
    End
565 589
    
566
    Send ComSetMarginImages iLine ICO_Inst_ptr //ICO_Brkp_obj// 2
567
    //Set psFilename     of oCodeMax To sFileName
568
    // Make it visible to the user where we are
569
    //Move True to bVisible
570
    //Send ComSelectLine of oCodeMax iLine bVisible
571
    Move (RGB(223,253,193)) To eBkLineColor
572
    Send ComSetLineColor iLine eBkLineColor //clYellow
573
    
574 590
    Send UpdateStatusHelp
575 591
    
576 592
//    Send ComSetLineColor iLine clRed

Also available in: Unified diff