Changeset 50 for trunk/IDE


Ignore:
Timestamp:
Apr 5, 2012, 2:03:52 PM (13 years ago)
Author:
chronos
Message:
  • Modified: Interpretter execution partial implementation.
Location:
trunk/IDE
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/IDE/Forms/UFormMain.lfm

    r49 r50  
    55  Width = 695
    66  Caption = 'Transpascal IDE'
    7   ClientHeight = 476
     7  ClientHeight = 482
    88  ClientWidth = 695
    99  Font.Height = -11
    1010  Font.Name = 'Tahoma'
    11   Menu = MainMenu1
     11  Menu = MainMenu
    1212  OnClose = FormClose
    1313  OnCreate = FormCreate
     
    2020    Left = 0
    2121    Height = 5
    22     Top = 471
     22    Top = 477
    2323    Width = 695
    2424    Align = alBottom
     
    8888  object Splitter1: TSplitter
    8989    Left = 490
    90     Height = 339
     90    Height = 345
    9191    Top = 26
    9292    Width = 5
     
    9696  object PageControlRight: TPageControl
    9797    Left = 495
    98     Height = 339
     98    Height = 345
    9999    Top = 26
    100100    Width = 200
     
    117117    Left = 0
    118118    Height = 101
    119     Top = 370
     119    Top = 376
    120120    Width = 695
    121121    ActivePage = TabSheetMessages
     
    135135    Left = 0
    136136    Height = 5
    137     Top = 365
     137    Top = 371
    138138    Width = 695
    139139    Align = alBottom
     
    142142  object PageControlMain: TPageControl
    143143    Left = 0
    144     Height = 339
     144    Height = 345
    145145    Top = 26
    146146    Width = 490
     
    156156    end
    157157  end
    158   object MainMenu1: TMainMenu
     158  object MainMenu: TMainMenu
    159159    Images = ImageList1
    160160    left = 115
     
    491491      object MenuItem25: TMenuItem
    492492        Action = APause
     493        Bitmap.Data = {
     494          36040000424D3604000000000000360000002800000010000000100000000100
     495          2000000000000004000064000000640000000000000000000000000000000000
     496          0000000000000000000000000000000000000000000000000000000000000000
     497          0000000000000000000000000000000000000000000000000000000000000000
     498          0000000000000000000000000000000000000000000000000000000000000000
     499          0000000000000000000000000000000000000000000000000000000000000000
     500          0000000000008A2C0FBF842A0EFF7C260BFF7A250AFF00000000000000008A2C
     501          0FBF842A0EFF7C260BFF7A250AFF000000000000000000000000000000000000
     502          000000000000993414BFCF6F50FFDA886DFF7F270BFF00000000000000009934
     503          14BFCF6F50FFDA886DFF7F270BFF000000000000000000000000000000000000
     504          000000000000AA3A18BFD37558FFDC8B71FF8A2C0FFF0000000000000000AA3A
     505          18BFD37558FFDC8B71FF8A2C0FFF000000000000000000000000000000000000
     506          000000000000B5401DBFD57C61FFDE9077FF993414FF0000000000000000B540
     507          1DBFD57C61FFDE9077FF993414FF000000000000000000000000000000000000
     508          000000000000BF4A27C0D9856BFFDF957EFFAA3A18FF0000000000000000BF4A
     509          27C0D9856BFFDF957EFFAA3A18FF000000000000000000000000000000000000
     510          000000000000B95435BFE29984FFE29A85FFB5401DFF0000000000000000B954
     511          35BFE29984FFE29A85FFB5401DFF000000000000000000000000000000000000
     512          000000000000C86A4DBFE7A590FFE5A18BFFBF4A27FF0000000000000000C86A
     513          4DBFE7A590FFE5A18BFFBF4A27FF000000000000000000000000000000000000
     514          000000000000CD6849BFE19881FFE8A793FFC45432FF0000000000000000CD68
     515          49BFE19881FFE8A793FFC45432FF000000000000000000000000000000000000
     516          000000000000D27457BFE5A18BFFEBAF9AFFC95E3EFF0000000000000000D274
     517          57BFE5A18BFFEBAF9AFFC95E3EFF000000000000000000000000000000000000
     518          000000000000D57C61BFE8A793FFEDB6A3FFCD6849FF0000000000000000D57C
     519          61BFE8A793FFEDB6A3FFCD6849FF000000000000000000000000000000000000
     520          000000000000D9866CBFEBB09DFFF0BBABFFD27457FF0000000000000000D986
     521          6CBFEBB09DFFF0BBABFFD27457FF000000000000000000000000000000000000
     522          000000000000DE9077BFDA8A70FFD88367FFD57C61FF0000000000000000DE90
     523          77BFDA8A70FFD88367FFD57C61FF000000000000000000000000000000000000
     524          0000000000000000000000000000000000000000000000000000000000000000
     525          0000000000000000000000000000000000000000000000000000000000000000
     526          0000000000000000000000000000000000000000000000000000000000000000
     527          0000000000000000000000000000000000000000000000000000
     528        }
    493529      end
    494530      object MenuItem26: TMenuItem
    495531        Action = AStop
     532        Bitmap.Data = {
     533          36040000424D3604000000000000360000002800000010000000100000000100
     534          2000000000000004000064000000640000000000000000000000000000000000
     535          0000000000000000000000000000000000000000000000000000000000000000
     536          0000000000000000000000000000000000000000000000000000000000000000
     537          0000000000000000000000000000000000000000000000000000000000000000
     538          0000000000000000000000000000000000000000000000000000000000000000
     539          0000000000000000000000000000000000000000000000000000000000000000
     540          0000000000000000000000000000000000000000000000000000000000000000
     541          0000000000000000000000000000000000000000000000000000000000000000
     542          0000000000000000000000000000000000000000000000000000000000000000
     543          000000000000000000000000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000
     544          FFFF0000FFFF0000FFFF00000000000000000000000000000000000000000000
     545          000000000000000000000000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000
     546          FFFF0000FFFF0000FFFF00000000000000000000000000000000000000000000
     547          000000000000000000000000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000
     548          FFFF0000FFFF0000FFFF00000000000000000000000000000000000000000000
     549          000000000000000000000000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000
     550          FFFF0000FFFF0000FFFF00000000000000000000000000000000000000000000
     551          000000000000000000000000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000
     552          FFFF0000FFFF0000FFFF00000000000000000000000000000000000000000000
     553          000000000000000000000000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000
     554          FFFF0000FFFF0000FFFF00000000000000000000000000000000000000000000
     555          000000000000000000000000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000
     556          FFFF0000FFFF0000FFFF00000000000000000000000000000000000000000000
     557          000000000000000000000000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000
     558          FFFF0000FFFF0000FFFF00000000000000000000000000000000000000000000
     559          0000000000000000000000000000000000000000000000000000000000000000
     560          0000000000000000000000000000000000000000000000000000000000000000
     561          0000000000000000000000000000000000000000000000000000000000000000
     562          0000000000000000000000000000000000000000000000000000000000000000
     563          0000000000000000000000000000000000000000000000000000000000000000
     564          0000000000000000000000000000000000000000000000000000000000000000
     565          0000000000000000000000000000000000000000000000000000000000000000
     566          0000000000000000000000000000000000000000000000000000
     567        }
    496568      end
    497569      object MenuItem32: TMenuItem
     
    581653      object MenuItem33: TMenuItem
    582654        Action = AHelp
     655        Bitmap.Data = {
     656          36040000424D3604000000000000360000002800000010000000100000000100
     657          2000000000000004000064000000640000000000000000000000000000000000
     658          0000000000000000000000000000000000000000000000000000000000000000
     659          0000000000000000000000000000000000000000000000000000000000000000
     660          00000000000000000000916429FF855A24FF885015FF824A1DFF7E4719FF7944
     661          17FF583C0EFF49340DFF00000000000000000000000000000000000000000000
     662          000000000000A1692CFFC08858FFE0C9B4FFF7F1ECFFFEFDFCFFFEFDFCFFF5F0
     663          ECFFDCC9B8FF9E7857FF473108FF000000000000000000000000000000000000
     664          0000B2702BFFDBAB80FFF8EFE7FFE2BBA6FFCC7E56FFC15823FFC05722FFC97F
     665          56FFDEBAA7FFF2EBE7FFB39376FF483108FF000000000000000000000000B677
     666          34FFD6996BFFF9F0E7FFDDA488FFC75013FFC04E11FFDCA688FFFFFEFEFFB549
     667          11FFB64A10FFD59E82FFF3ECE7FF9A7352FF49340DFF0000000000000000B479
     668          3AFFEFD6C1FFEDC5B2FFDD5A1AFFD55617FFD25313FFD87D4DFFE3A686FFBB4C
     669          11FFB34A12FFB64A10FFDEB9A6FFDCC9B8FF563C0DFF0000000000000000CD7F
     670          45FFFCF4EDFFEC9772FFE86021FFE05A1DFFDB5819FFEDAA89FFFFFEFEFFC84E
     671          12FFB94C11FFB34C13FFC77B53FFF6F0ECFF7A4319FF0000000000000000CD81
     672          47FFFFFEFEFFF87A46FFF96829FFF66525FFF16020FFF18653FFFFFEFEFFF0BF
     673          A8FFC55A24FFB64C15FFB75724FFFEFEFDFF7F481AFF0000000000000000CD84
     674          4EFFFFFEFEFFFC814CFFFF7031FFFF6B2CFFFD6928FFF86523FFF49265FFFDF5
     675          F1FFF4D4C5FFC65018FFBA5927FFFEFEFDFF834A1CFF0000000000000000D183
     676          4CFFFCF7F1FFFAA582FFFF733AFFFF844EFFFFAE8AFFFE6C2DFFF76727FFF192
     677          68FFFFFEFEFFE98354FFD78560FFF8F1ECFF81551FFF0000000000000000C483
     678          41FFF0DAC3FFFAD1C0FFFF7940FFFF986EFFFFFEFEFFFFC9B2FFFD9164FFFAC6
     679          AFFFFEF5F1FFF5773DFFEDC5B2FFE4CBB3FF905D21FF0000000000000000C484
     680          45FFDCA277FFFCF4EDFFFABFA6FFFF7A43FFFFBB9EFFFFF6F3FFFFFEFEFFFEED
     681          E5FFFA9970FFF3B69CFFF8F0E6FFBB8B56FF986426FF00000000000000000000
     682          0000C48443FFE5B999FFFCF4EDFFFBD2C1FFFAA887FFFD8757FFFD8454FFF8A5
     683          82FFF7CEBDFFFAF1E7FFD2A77AFFA36A2AFF0000000000000000000000000000
     684          000000000000C58442FFDCA277FFF3DAC7FFFCF7F1FFFFFEFEFFFFFEFEFFFCF4
     685          EDFFF1D6C0FFC7935DFFA66F33FF000000000000000000000000000000000000
     686          00000000000000000000C58444FFC28342FFD89C6DFFD69668FFD49463FFD696
     687          68FFB2793CFFB1783BFF00000000000000000000000000000000000000000000
     688          0000000000000000000000000000000000000000000000000000000000000000
     689          0000000000000000000000000000000000000000000000000000
     690        }
    583691      end
    584692      object MenuItem10: TMenuItem
     
    648756      Caption = 'Run'
    649757      ImageIndex = 13
     758      OnExecute = ARunExecute
    650759      ShortCut = 120
    651760    end
     
    703812      Caption = 'Stop'
    704813      ImageIndex = 0
     814      OnExecute = AStopExecute
    705815      ShortCut = 16497
    706816    end
     
    709819      Caption = 'Pause'
    710820      ImageIndex = 8
     821      OnExecute = APauseExecute
    711822    end
    712823    object AReset: TAction
    713824      Category = 'Run'
    714825      Caption = 'Reset'
     826      OnExecute = AResetExecute
    715827    end
    716828    object AStepOver: TAction
    717829      Category = 'Run'
    718830      Caption = 'Step over'
     831      OnExecute = AStepOverExecute
    719832      ShortCut = 119
    720833    end
     
    722835      Category = 'Run'
    723836      Caption = 'Step in'
     837      OnExecute = AStepInExecute
    724838      ShortCut = 118
    725839    end
     
    727841      Category = 'Run'
    728842      Caption = 'Step out'
     843      OnExecute = AStepOutExecute
    729844      ShortCut = 8311
    730845    end
     
    732847      Category = 'Run'
    733848      Caption = 'Run to cursor'
     849      OnExecute = ARunToCursorExecute
    734850      ShortCut = 115
    735851    end
  • trunk/IDE/Forms/UFormMain.pas

    r49 r50  
    5757    DebugLog1: TDebugLog;
    5858    ImageList1: TImageList;
    59     MainMenu1: TMainMenu;
     59    MainMenu: TMainMenu;
    6060    MenuItem1: TMenuItem;
    6161    MenuItem10: TMenuItem;
     
    122122    procedure AExitExecute(Sender: TObject);
    123123    procedure AHomepageExecute(Sender: TObject);
     124    procedure APauseExecute(Sender: TObject);
    124125    procedure AProjectCloseExecute(Sender: TObject);
    125126    procedure AProjectNewExecute(Sender: TObject);
     
    128129    procedure AProjectSaveExecute(Sender: TObject);
    129130    procedure ABuildExecute(Sender: TObject);
     131    procedure AResetExecute(Sender: TObject);
     132    procedure ARunExecute(Sender: TObject);
     133    procedure ARunToCursorExecute(Sender: TObject);
     134    procedure AStepInExecute(Sender: TObject);
     135    procedure AStepOutExecute(Sender: TObject);
     136    procedure AStepOverExecute(Sender: TObject);
     137    procedure AStopExecute(Sender: TObject);
    130138    procedure AViewCodeTreeExecute(Sender: TObject);
    131139    procedure AViewCompiledSoruceExecute(Sender: TObject);
     
    254262end;
    255263
     264procedure TFormMain.AResetExecute(Sender: TObject);
     265begin
     266  Compiler.Target.Executor.Reset;
     267end;
     268
     269procedure TFormMain.ARunExecute(Sender: TObject);
     270begin
     271  ABuildExecute(Self);
     272  Compiler.Target.Executor.Run;
     273end;
     274
     275procedure TFormMain.ARunToCursorExecute(Sender: TObject);
     276begin
     277  Compiler.Target.Executor.RunToCursor(0); // determine position
     278end;
     279
     280procedure TFormMain.AStepInExecute(Sender: TObject);
     281begin
     282  Compiler.Target.Executor.StepIn;
     283end;
     284
     285procedure TFormMain.AStepOutExecute(Sender: TObject);
     286begin
     287  Compiler.Target.Executor.StepOut;
     288end;
     289
     290procedure TFormMain.AStepOverExecute(Sender: TObject);
     291begin
     292  Compiler.Target.Executor.StepOver;
     293end;
     294
     295procedure TFormMain.AStopExecute(Sender: TObject);
     296begin
     297  Compiler.Target.Executor.Stop;
     298end;
     299
    256300procedure TFormMain.AViewCodeTreeExecute(Sender: TObject);
    257301begin
     
    591635end;
    592636
     637procedure TFormMain.APauseExecute(Sender: TObject);
     638begin
     639  Compiler.Target.Executor.Pause;
     640end;
     641
    593642procedure TFormMain.AProjectNewExecute(Sender: TObject);
    594643var
  • trunk/IDE/UProject.pas

    r49 r50  
    8383    Packages: TProjectPackageList;
    8484    BuildConfigs: TProjectBuildConfigList;
     85    MainSource: TProjectFile;
    8586    procedure LoadFromFile(FileName: string);
    8687    procedure SaveToFile(FileName: string);
     
    343344  I: Integer;
    344345  Text: string;
     346  MainSourceName: string;
    345347begin
    346348  try
     
    352354    if Assigned(NewNode) then
    353355      Files.LoadFromXMLNode(NewNode);
     356
     357    NewNode := Doc.DocumentElement.FindNode('MainSource');
     358    if Assigned(NewNode) then begin
     359      MainSourceName := UTF8Encode(NewNode.TextSource);
     360
     361    end;
     362
    354363    NewNode := Doc.DocumentElement.FindNode('Packages');
    355364    if Assigned(NewNode) then
     
    375384    AppendChild(RootNode);
    376385    with RootNode do begin
     386      NewNode := CreateElement('MainSource');
     387      NewNode.TextContent := UTF8Decode(MainSource.FileName);
     388      AppendChild(NewNode);
     389
    377390      NewNode := CreateElement('Files');
    378391      Files.SaveToXMLNode(NewNode);
Note: See TracChangeset for help on using the changeset viewer.