Changeset 43


Ignore:
Timestamp:
Feb 29, 2012, 8:23:19 PM (12 years ago)
Author:
chronos
Message:
  • Added: Debugging actions to Run menu.
Location:
trunk
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/Compiler/UExecutor.pas

    r41 r43  
    99
    1010type
     11  TRunState = (rsStopped, rsPaused, rsRunning);
     12
     13  { TExecutor }
     14
    1115  TExecutor = class
     16  private
     17    FRunState: TRunState;
     18    procedure SetRunState(AValue: TRunState);
     19  public
    1220    procedure Run; virtual; abstract;
    1321    procedure Pause; virtual; abstract;
     
    1826    procedure StepOut; virtual; abstract;
    1927    procedure RunToCursor(Pos: Integer); virtual; abstract;
     28    property State: TRunState read FRunState write SetRunState;
    2029  end;
    2130
    2231implementation
    2332
     33{ TExecutor }
     34
     35procedure TExecutor.SetRunState(AValue: TRunState);
     36begin
     37  if FRunState=AValue then Exit;
     38  FRunState:=AValue;
     39end;
     40
    2441end.
    2542
  • trunk/IDE/Forms/UMainForm.lfm

    r42 r43  
    7474      Top = 2
    7575      Action = ARun
     76    end
     77    object ToolButton9: TToolButton
     78      Left = 172
     79      Top = 2
     80      Action = APause
     81    end
     82    object ToolButton10: TToolButton
     83      Left = 195
     84      Top = 2
     85      Action = AStop
    7686    end
    7787  end
     
    395405    object MenuItem7: TMenuItem
    396406      Caption = 'Run'
     407      object MenuItemProducer: TMenuItem
     408        Caption = 'Target'
     409      end
    397410      object MenuItem8: TMenuItem
    398411        Action = ABuild
     
    433446          0000000000000000000000000000000000000000000000000000
    434447        }
     448      end
     449      object MenuItem27: TMenuItem
     450        Caption = '-'
    435451      end
    436452      object MenuItem14: TMenuItem
     
    473489        }
    474490      end
    475       object MenuItemProducer: TMenuItem
    476         Caption = 'Target'
     491      object MenuItem25: TMenuItem
     492        Action = APause
     493      end
     494      object MenuItem26: TMenuItem
     495        Action = AStop
     496      end
     497      object MenuItem32: TMenuItem
     498        Action = AReset
     499      end
     500      object MenuItem28: TMenuItem
     501        Action = AStepIn
     502      end
     503      object MenuItem29: TMenuItem
     504        Action = AStepOver
     505      end
     506      object MenuItem30: TMenuItem
     507        Action = AStepOut
     508      end
     509      object MenuItem31: TMenuItem
     510        Action = ARunToCursor
    477511      end
    478512    end
     
    633667      ImageIndex = 12
    634668      OnExecute = ABuildExecute
    635       ShortCut = 120
     669      ShortCut = 16504
    636670    end
    637671    object AExit: TAction
     
    641675    end
    642676    object ARun: TAction
     677      Category = 'Run'
    643678      Caption = 'Run'
    644679      ImageIndex = 13
     680      ShortCut = 120
    645681    end
    646682    object AAbout: TAction
     
    692728      Caption = 'Targets'
    693729      OnExecute = AViewTargetsExecute
     730    end
     731    object AStop: TAction
     732      Category = 'Run'
     733      Caption = 'Stop'
     734      ShortCut = 16497
     735    end
     736    object APause: TAction
     737      Category = 'Run'
     738      Caption = 'Pause'
     739    end
     740    object AReset: TAction
     741      Category = 'Run'
     742      Caption = 'Reset'
     743    end
     744    object AStepOver: TAction
     745      Category = 'Run'
     746      Caption = 'Step over'
     747      ShortCut = 119
     748    end
     749    object AStepIn: TAction
     750      Category = 'Run'
     751      Caption = 'Step in'
     752      ShortCut = 118
     753    end
     754    object AStepOut: TAction
     755      Category = 'Run'
     756      Caption = 'Step out'
     757      ShortCut = 8311
     758    end
     759    object ARunToCursor: TAction
     760      Category = 'Run'
     761      Caption = 'Run to cursor'
     762      ShortCut = 115
    694763    end
    695764  end
  • trunk/IDE/Forms/UMainForm.lrt

    r42 r43  
    1212TMAINFORM.MENUITEM7.CAPTION=Run
    1313TMAINFORM.MENUITEMPRODUCER.CAPTION=Target
     14TMAINFORM.MENUITEM27.CAPTION=-
    1415TMAINFORM.MENUITEM15.CAPTION=View
    1516TMAINFORM.MENUITEM22.CAPTION=-
     
    3738TMAINFORM.AVIEWCOMPILEDSORUCE.CAPTION=Compiled source
    3839TMAINFORM.AVIEWTARGETS.CAPTION=Targets
     40TMAINFORM.ASTOP.CAPTION=Stop
     41TMAINFORM.APAUSE.CAPTION=Pause
     42TMAINFORM.ARESET.CAPTION=Reset
     43TMAINFORM.ASTEPOVER.CAPTION=Step over
     44TMAINFORM.ASTEPIN.CAPTION=Step in
     45TMAINFORM.ASTEPOUT.CAPTION=Step out
     46TMAINFORM.ARUNTOCURSOR.CAPTION=Run to cursor
  • trunk/IDE/Forms/UMainForm.pas

    r42 r43  
    2929  TMainForm = class(TForm)
    3030    ABuild: TAction;
     31    ARunToCursor: TAction;
     32    AStepOut: TAction;
     33    AStepIn: TAction;
     34    AStepOver: TAction;
     35    AReset: TAction;
     36    APause: TAction;
     37    AStop: TAction;
    3138    AViewTargets: TAction;
    3239    AViewCompiledSoruce: TAction;
     
    6875    MenuItem23: TMenuItem;
    6976    MenuItem24: TMenuItem;
     77    MenuItem25: TMenuItem;
     78    MenuItem26: TMenuItem;
     79    MenuItem27: TMenuItem;
     80    MenuItem28: TMenuItem;
     81    MenuItem29: TMenuItem;
     82    MenuItem30: TMenuItem;
     83    MenuItem31: TMenuItem;
     84    MenuItem32: TMenuItem;
    7085    MenuItemProducer: TMenuItem;
    7186    MenuItem3: TMenuItem;
     
    94109    ToolBar1: TToolBar;
    95110    ToolButton1: TToolButton;
     111    ToolButton10: TToolButton;
    96112    ToolButton2: TToolButton;
    97113    ToolButton3: TToolButton;
     
    101117    ToolButton7: TToolButton;
    102118    ToolButton8: TToolButton;
     119    ToolButton9: TToolButton;
    103120    procedure AAboutExecute(Sender: TObject);
    104121    procedure AExitExecute(Sender: TObject);
     
    156173uses
    157174  UMessagesForm, UCodeForm, UProjectManager, UCommon, UAboutForm, UFormOptions,
    158   UFormTargets, UTarget, UAnalyzer, UProducer;
     175  UFormTargets, UTarget, UAnalyzer, UProducer, UExecutor;
    159176
    160177resourcestring
     
    302319  CodeForm.UpdateInterface;
    303320  ProjectManager.UpdateInterface;
     321  APause.Enabled := Project.Active and Assigned(Compiler.Target) and
     322    Assigned(Compiler.Target.Executor) and (Compiler.Target.Executor.State = rsRunning);
     323  ARun.Enabled := Project.Active and Assigned(Compiler.Target) and
     324    Assigned(Compiler.Target.Executor) and ((Compiler.Target.Executor.State = rsStopped) or
     325    (Compiler.Target.Executor.State = rsPaused));
     326  AStop.Enabled := Project.Active and Assigned(Compiler.Target) and
     327    Assigned(Compiler.Target.Executor) and ((Compiler.Target.Executor.State = rsRunning) or
     328    (Compiler.Target.Executor.State = rsPaused));
     329  AStepIn.Enabled := Project.Active and Assigned(Compiler.Target) and
     330    Assigned(Compiler.Target.Executor) and ((Compiler.Target.Executor.State = rsRunning) or
     331    (Compiler.Target.Executor.State = rsPaused));
     332  AStepOut.Enabled := AStepIn.Enabled;
     333  AStepOver.Enabled := AStepIn.Enabled;
     334  ARunToCursor.Enabled := AStepIn.Enabled;
    304335end;
    305336
  • trunk/IDE/Languages/Transpascal.cs.po

    r42 r43  
    133133msgstr "Domovská stránka"
    134134
     135#: tmainform.apause.caption
     136msgid "Pause"
     137msgstr ""
     138
    135139#: tmainform.aprojectclose.caption
    136140msgid "Close"
     
    168172msgid "Save project with custom name"
    169173msgstr "Uložit projekt s vlastním jménem"
     174
     175#: tmainform.areset.caption
     176msgid "Reset"
     177msgstr ""
    170178
    171179#: tmainform.arun.caption
     
    174182msgstr "Spustit"
    175183
     184#: tmainform.aruntocursor.caption
     185msgid "Run to cursor"
     186msgstr ""
     187
     188#: tmainform.astepin.caption
     189msgid "Step in"
     190msgstr ""
     191
     192#: tmainform.astepout.caption
     193msgid "Step out"
     194msgstr ""
     195
     196#: tmainform.astepover.caption
     197msgid "Step over"
     198msgstr ""
     199
     200#: tmainform.astop.caption
     201msgid "Stop"
     202msgstr ""
     203
    176204#: tmainform.aviewcodetree.caption
    177205msgid "Code tree"
     
    232260#: tmainform.menuitem22.caption
    233261msgctxt "tmainform.menuitem22.caption"
     262msgid "-"
     263msgstr "-"
     264
     265#: tmainform.menuitem27.caption
     266msgctxt "tmainform.menuitem27.caption"
    234267msgid "-"
    235268msgstr "-"
  • trunk/IDE/Languages/Transpascal.po

    r42 r43  
    125125msgstr ""
    126126
     127#: tmainform.apause.caption
     128msgid "Pause"
     129msgstr ""
     130
    127131#: tmainform.aprojectclose.caption
    128132msgid "Close"
     
    159163#: tmainform.aprojectsaveas.hint
    160164msgid "Save project with custom name"
     165msgstr ""
     166
     167#: tmainform.areset.caption
     168msgid "Reset"
    161169msgstr ""
    162170
     
    166174msgstr ""
    167175
     176#: tmainform.aruntocursor.caption
     177msgid "Run to cursor"
     178msgstr ""
     179
     180#: tmainform.astepin.caption
     181msgid "Step in"
     182msgstr ""
     183
     184#: tmainform.astepout.caption
     185msgid "Step out"
     186msgstr ""
     187
     188#: tmainform.astepover.caption
     189msgid "Step over"
     190msgstr ""
     191
     192#: tmainform.astop.caption
     193msgid "Stop"
     194msgstr ""
     195
    168196#: tmainform.aviewcodetree.caption
    169197msgid "Code tree"
     
    227255msgstr ""
    228256
     257#: tmainform.menuitem27.caption
     258msgctxt "TMAINFORM.MENUITEM27.CAPTION"
     259msgid "-"
     260msgstr ""
     261
    229262#: tmainform.menuitem7.caption
    230263msgctxt "tmainform.menuitem7.caption"
  • trunk/IDE/UApplicationInfo.pas

    r41 r43  
    5353  Name := 'Transpascal IDE';
    5454  Identification := 1;
    55   ReleaseDate := EncodeDate(2012, 2, 28);
     55  ReleaseDate := EncodeDate(2012, 2, 29);
    5656  MajorVersion := 0;
    5757  MinorVersion := 1;
Note: See TracChangeset for help on using the changeset viewer.