Changeset 49 for trunk/IDE/Forms


Ignore:
Timestamp:
Mar 4, 2012, 5:26:20 PM (13 years ago)
Author:
chronos
Message:
  • Added: Compiled target code now can be browsed using Target project navigation.
Location:
trunk/IDE/Forms
Files:
3 added
4 edited

Legend:

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

    r48 r49  
    9999    Top = 26
    100100    Width = 200
    101     ActivePage = TabSheetCompiledProject
     101    ActivePage = TabSheetTargetProject
    102102    Align = alRight
    103103    TabIndex = 2
     
    110110      Caption = 'Code Tree'
    111111    end
    112     object TabSheetCompiledProject: TTabSheet
     112    object TabSheetTargetProject: TTabSheet
    113113      Caption = 'Target project'
    114114    end
     
    579579    object MenuItem9: TMenuItem
    580580      Caption = 'Help'
     581      object MenuItem33: TMenuItem
     582        Action = AHelp
     583      end
    581584      object MenuItem10: TMenuItem
    582585        Action = AHomepage
     
    584587      object MenuItem11: TMenuItem
    585588        Action = AAbout
    586         Bitmap.Data = {
    587           36040000424D3604000000000000360000002800000010000000100000000100
    588           2000000000000004000064000000640000000000000000000000000000000000
    589           0000000000000000000000000000000000000000000000000000000000000000
    590           0000000000000000000000000000000000000000000000000000000000000000
    591           00000000000000000000916429FF855A24FF885015FF824A1DFF7E4719FF7944
    592           17FF583C0EFF49340DFF00000000000000000000000000000000000000000000
    593           000000000000A1692CFFC08858FFE0C9B4FFF7F1ECFFFEFDFCFFFEFDFCFFF5F0
    594           ECFFDCC9B8FF9E7857FF473108FF000000000000000000000000000000000000
    595           0000B2702BFFDBAB80FFF8EFE7FFE2BBA6FFCC7E56FFC15823FFC05722FFC97F
    596           56FFDEBAA7FFF2EBE7FFB39376FF483108FF000000000000000000000000B677
    597           34FFD6996BFFF9F0E7FFDDA488FFC75013FFC04E11FFDCA688FFFFFEFEFFB549
    598           11FFB64A10FFD59E82FFF3ECE7FF9A7352FF49340DFF0000000000000000B479
    599           3AFFEFD6C1FFEDC5B2FFDD5A1AFFD55617FFD25313FFD87D4DFFE3A686FFBB4C
    600           11FFB34A12FFB64A10FFDEB9A6FFDCC9B8FF563C0DFF0000000000000000CD7F
    601           45FFFCF4EDFFEC9772FFE86021FFE05A1DFFDB5819FFEDAA89FFFFFEFEFFC84E
    602           12FFB94C11FFB34C13FFC77B53FFF6F0ECFF7A4319FF0000000000000000CD81
    603           47FFFFFEFEFFF87A46FFF96829FFF66525FFF16020FFF18653FFFFFEFEFFF0BF
    604           A8FFC55A24FFB64C15FFB75724FFFEFEFDFF7F481AFF0000000000000000CD84
    605           4EFFFFFEFEFFFC814CFFFF7031FFFF6B2CFFFD6928FFF86523FFF49265FFFDF5
    606           F1FFF4D4C5FFC65018FFBA5927FFFEFEFDFF834A1CFF0000000000000000D183
    607           4CFFFCF7F1FFFAA582FFFF733AFFFF844EFFFFAE8AFFFE6C2DFFF76727FFF192
    608           68FFFFFEFEFFE98354FFD78560FFF8F1ECFF81551FFF0000000000000000C483
    609           41FFF0DAC3FFFAD1C0FFFF7940FFFF986EFFFFFEFEFFFFC9B2FFFD9164FFFAC6
    610           AFFFFEF5F1FFF5773DFFEDC5B2FFE4CBB3FF905D21FF0000000000000000C484
    611           45FFDCA277FFFCF4EDFFFABFA6FFFF7A43FFFFBB9EFFFFF6F3FFFFFEFEFFFEED
    612           E5FFFA9970FFF3B69CFFF8F0E6FFBB8B56FF986426FF00000000000000000000
    613           0000C48443FFE5B999FFFCF4EDFFFBD2C1FFFAA887FFFD8757FFFD8454FFF8A5
    614           82FFF7CEBDFFFAF1E7FFD2A77AFFA36A2AFF0000000000000000000000000000
    615           000000000000C58442FFDCA277FFF3DAC7FFFCF7F1FFFFFEFEFFFFFEFEFFFCF4
    616           EDFFF1D6C0FFC7935DFFA66F33FF000000000000000000000000000000000000
    617           00000000000000000000C58444FFC28342FFD89C6DFFD69668FFD49463FFD696
    618           68FFB2793CFFB1783BFF00000000000000000000000000000000000000000000
    619           0000000000000000000000000000000000000000000000000000000000000000
    620           0000000000000000000000000000000000000000000000000000
    621         }
    622589      end
    623590    end
     
    633600      ImageIndex = 10
    634601      OnExecute = AProjectNewExecute
     602      ShortCut = 16462
    635603    end
    636604    object AProjectOpen: TAction
     
    640608      ImageIndex = 7
    641609      OnExecute = AProjectOpenExecute
     610      ShortCut = 16463
    642611    end
    643612    object AProjectSave: TAction
     
    673642      ImageIndex = 4
    674643      OnExecute = AExitExecute
     644      ShortCut = 16499
    675645    end
    676646    object ARun: TAction
     
    682652    object AAbout: TAction
    683653      Caption = 'About...'
    684       ImageIndex = 5
    685654      OnExecute = AAboutExecute
    686655    end
     
    697666      Category = 'View'
    698667      Caption = 'Object inspector'
     668      ShortCut = 122
    699669    end
    700670    object AViewSourceEditor: TAction
     
    732702      Category = 'Run'
    733703      Caption = 'Stop'
     704      ImageIndex = 0
    734705      ShortCut = 16497
    735706    end
     
    737708      Category = 'Run'
    738709      Caption = 'Pause'
     710      ImageIndex = 8
    739711    end
    740712    object AReset: TAction
     
    761733      Caption = 'Run to cursor'
    762734      ShortCut = 115
     735    end
     736    object AHelp: TAction
     737      Caption = 'Help'
     738      ImageIndex = 5
     739      ShortCut = 112
    763740    end
    764741  end
  • trunk/IDE/Forms/UFormMain.lrt

    r48 r49  
    22TFORMMAIN.TABSHEETPROJECT.CAPTION=Project
    33TFORMMAIN.TABSHEETCODETREE.CAPTION=Code Tree
    4 TFORMMAIN.TABSHEETCOMPILEDPROJECT.CAPTION=Target project
     4TFORMMAIN.TABSHEETTARGETPROJECT.CAPTION=Target project
    55TFORMMAIN.TABSHEETMESSAGES.CAPTION=Messages
    66TFORMMAIN.TABSHEETBREAKPOINTS.CAPTION=Breakpoints
     
    4545TFORMMAIN.ASTEPOUT.CAPTION=Step out
    4646TFORMMAIN.ARUNTOCURSOR.CAPTION=Run to cursor
     47TFORMMAIN.AHELP.CAPTION=Help
  • trunk/IDE/Forms/UFormMain.pas

    r48 r49  
    2828  TFormMain = class(TForm)
    2929    ABuild: TAction;
     30    AHelp: TAction;
    3031    ARunToCursor: TAction;
    3132    AStepOut: TAction;
     
    8283    MenuItem31: TMenuItem;
    8384    MenuItem32: TMenuItem;
     85    MenuItem33: TMenuItem;
    8486    MenuItemProducer: TMenuItem;
    8587    MenuItem3: TMenuItem;
     
    103105    TabSheetMessages: TTabSheet;
    104106    TabSheetBreakpoints: TTabSheet;
    105     TabSheetCompiledProject: TTabSheet;
     107    TabSheetTargetProject: TTabSheet;
    106108    TabSheetSource: TTabSheet;
    107109    TabSheetTarget: TTabSheet;
     
    150152    procedure ProjectOpen(FileName: string);
    151153    procedure UpdateMenu;
     154    procedure UpdateToolbar;
    152155  public
    153156    ReopenLastOpenedFile: Boolean;
     
    172175  UFormMessages, UFormSourceCode, UFormProject, UCommon, UFormAbout, UFormOptions,
    173176  UFormTargets, UTarget, UAnalyzer, UProducer, UExecutor, UFormProjectNew,
    174   UProjectTemplates;
     177  UProjectTemplates, UFormTargetProject;
    175178
    176179resourcestring
     
    239242      Compiler.SourceFiles.Clear;
    240243      Project.Files.DumpFileList(Compiler.SourceFiles);
    241       Compiler.TargetFolder := ExtractFileDir(Project.FileName);
     244      TargetProject.FileName := ExtractFileDir(Project.FileName) + DirectorySeparator +
     245        Compiler.CompiledFolder + DirectorySeparator + Compiler.Target.Name +
     246        DirectorySeparator + 'Target.tppr';
     247      Compiler.TargetFolder := ExtractFileDir(TargetProject.FileName);
    242248      Compiler.Compile;
     249      TargetProject.Files.LoadFromList(Compiler.TargetFiles);
     250      FormTargetProject.UpdateInterface;
    243251    end;
    244252    FormProject.TreeViewProjectChange(Self, FormProject.TreeViewProject.Selected);
     
    332340
    333341  UpdateMenu;
     342  UpdateToolbar;
    334343  FormSourceCode.UpdateInterface;
     344  FormTargetCode.UpdateInterface;
    335345  FormProject.UpdateInterface;
    336346end;
     
    350360  FormProject.Align := alClient;
    351361  FormProject.Show;
     362  FormTargetProject.ManualDock(TabSheetTargetProject, nil, alClient);
     363  FormTargetProject.Align := alClient;
     364  FormTargetProject.Show;
    352365  FormCodeTree.ManualDock(TabSheetCodeTree, nil, alClient);
    353366  FormCodeTree.Align := alClient;
     
    473486end;
    474487
     488procedure TFormMain.UpdateToolbar;
     489var
     490  I: Integer;
     491begin
     492  for I := 0 to ToolBar1.ButtonCount - 1 do
     493    TToolButton(ToolBar1.Buttons[I]).Hint := TToolButton(ToolBar1.Buttons[I]).Caption;
     494end;
     495
    475496procedure TFormMain.FormClose(Sender: TObject; var Action: TCloseAction);
    476497begin
  • trunk/IDE/Forms/UFormTargetCode.pas

    r46 r49  
    88  Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, SynEdit,
    99  SynHighlighterMulti, SynHighlighterVB, SynHighlighterPas, SynHighlighterCpp,
    10   SynHighlighterXML;
     10  SynHighlighterXML, UProject;
    1111
    1212type
     
    2020    SynXMLSyn1: TSynXMLSyn;
    2121  private
    22     { private declarations }
     22    FProjectFile: TProjectFile;
     23    procedure SetProjectFile(AValue: TProjectFile);
    2324  public
    24     { public declarations }
    25   end;
     25    procedure UpdateInterface;
     26    property ProjectFile: TProjectFile read FProjectFile write SetProjectFile;
     27  end;
    2628
    2729var
     
    3234{$R *.lfm}
    3335
     36uses
     37  UFormMain;
     38
     39procedure TFormTargetCode.SetProjectFile(AValue: TProjectFile);
     40begin
     41  if FProjectFile = AValue then Exit;
     42  FProjectFile := AValue;
     43  if Assigned(AValue) then
     44    SynEdit1.Lines.Assign(FProjectFile.Source)
     45    else SynEdit1.ClearAll;
     46end;
     47
     48procedure TFormTargetCode.UpdateInterface;
     49begin
     50  SynEdit1.Enabled := FormMain.Project.Active;
     51  if not FormMain.Project.Active then SynEdit1.ClearAll;
     52end;
     53
     54
    3455end.
    3556
Note: See TracChangeset for help on using the changeset viewer.