Changeset 62


Ignore:
Timestamp:
Oct 15, 2010, 7:09:49 AM (14 years ago)
Author:
george
Message:
  • Added: Windows for Code tree and compiled code.
Location:
branches/Transpascal
Files:
4 added
6 edited

Legend:

Unmodified
Added
Removed
  • branches/Transpascal/Forms/UCodeForm.lfm

    r61 r62  
    6969        Priority = 0
    7070      end>
     71    Highlighter = SynPasSyn1
    7172    Keystrokes = <   
    7273      item
  • branches/Transpascal/Forms/UMainForm.lfm

    r61 r62  
    11object MainForm: TMainForm
    2   Left = 114
    3   Height = 504
    4   Top = 122
    5   Width = 861
     2  Left = 142
     3  Height = 501
     4  Top = 113
     5  Width = 695
    66  Caption = 'Transpascal IDE'
    7   ClientHeight = 504
    8   ClientWidth = 861
     7  ClientHeight = 482
     8  ClientWidth = 695
    99  Font.Height = -11
    1010  Font.Name = 'Tahoma'
     
    2020    Left = 0
    2121    Height = 5
    22     Top = 480
    23     Width = 861
     22    Top = 477
     23    Width = 695
    2424    Align = alBottom
    2525    ResizeAnchor = akBottom
     
    2727  object DockPanel: TPanel
    2828    Left = 0
    29     Height = 454
     29    Height = 451
    3030    Top = 26
    31     Width = 861
     31    Width = 695
    3232    Align = alClient
    3333    BevelOuter = bvNone
     
    3838    Height = 26
    3939    Top = 0
    40     Width = 861
     40    Width = 695
    4141    Caption = 'ToolBar1'
    4242    TabOrder = 2
     
    4747      Width = 100
    4848      ItemHeight = 13
     49      ItemIndex = 1
     50      Items.Strings = (
     51        'Pascal'
     52        'C'
     53        'AS8051'
     54        'XML'
     55      )
     56      Style = csDropDownList
    4957      TabOrder = 0
    50       Text = 'ComboBox1'
     58      Text = 'C'
    5159    end
    5260    object Button1: TButton
  • branches/Transpascal/Forms/UMainForm.pas

    r61 r62  
    99  Dialogs, StdCtrls, UCompiler, UProducerAsm8051,
    1010  UProducerC, ComCtrls, ExtCtrls, SynEdit, SynHighlighterPas, UProducerTreeView,
    11   UProducerPascal, Contnrs, UProject, FileUtil, Menus, ActnList, UCoolDocking;
     11  UProducerPascal, Contnrs, UProject, FileUtil, Menus, ActnList, UCoolDocking,
     12  UCompiledForm, UCodeTreeForm;
    1213
    1314const
     
    5152    procedure Splitter2CanResize(Sender: TObject; var NewSize: Integer;
    5253      var Accept: Boolean);
    53     procedure TreeViewProjectChange(Sender: TObject; Node: TTreeNode);
    5454  private
    5555    procedure LoadErrorMessages;
    5656    procedure UpdateProjectTree;
    5757    procedure UpdateProjectGroup(Node: TTreeNode; Group: TProjectGroup);
    58     function GetSource(Name: string; Source: TStringList): Boolean;
    5958    procedure DockInit;
    6059  public
    6160    Project: TProject;
    62     ProducerControl: TControl;
    6361    Compiler: TCompiler;
     62    function GetSource(Name: string; Source: TStringList): Boolean;
    6463  end;
    6564
     
    8079  I: Integer;
    8180begin
    82   ProducerControl.Free;
    8381  if ComboBox1.ItemIndex = 0 then begin
    8482    Compiler.Producer.Free;
     
    9694    Compiler.Producer.Free;
    9795    Compiler.Producer := TProducerTreeView.Create;
    98     ProducerControl := TTreeView.Create(Self);
    99     ProducerControl.Parent := DockPanel;
    100     ProducerControl.Align := alClient;
    101 //    TProducerTreeView(Compiler.Producer).TreeView := TTreeView(ProducerControl);
    10296  end;
    10397
     
    107101  with TProjectFile(Project.Items[0]) do begin
    108102    Compiler.Compile(Parent.GetDir + Name, Source);
    109   end;
    110 
    111   if ComboBox1.ItemIndex = 0 then begin
    112     ProducerControl := TMemo.Create(Self);
    113     ProducerControl.Parent := DockPanel;
    114     ProducerControl.Align := alClient;
    115     ProducerControl.Font.Name := 'Courier New';
    116     TMemo(ProducerControl).ScrollBars := ssAutoBoth;
    117   end else
    118   if ComboBox1.ItemIndex = 1 then begin
    119     ProducerControl := TMemo.Create(Self);
    120     ProducerControl.Parent := DockPanel;
    121     ProducerControl.Align := alClient;
    122     ProducerControl.Font.Name := 'Courier New';
    123     TMemo(ProducerControl).ScrollBars := ssAutoBoth;
    124   end else
    125   if ComboBox1.ItemIndex = 2 then begin
    126     ProducerControl := TMemo.Create(Self);
    127     ProducerControl.Parent := DockPanel;
    128     ProducerControl.Align := alClient;
    129     ProducerControl.Font.Name := 'Courier New';
    130     TMemo(ProducerControl).ScrollBars := ssAutoBoth;
    131   end else
    132   if ComboBox1.ItemIndex = 3 then begin
    133103  end;
    134104
     
    219189var
    220190  Container1: TCoolDockConjoinForm;
     191  Container2: TCoolDockConjoinForm;
    221192begin
    222193  ProjectManager.ManualDock(DockPanel, nil, alLeft);
     
    228199  Container1.ManualDock(DockPanel, nil, alRight);
    229200
    230   CodeForm.ManualDock(Container1.Panel, nil, alTop);
    231   CodeForm.Show;
     201  CodeTreeForm.ManualDock(DockPanel, nil, alLeft);
     202  CodeTreeForm.Show;
     203  Container1.Parent.Parent.Width := MainForm.Width;
     204
     205  Container2 := TCoolDockManager(DockPanel.DockManager).CreateContainer(alRight);
     206  Container2.Caption := 'Panel';
     207  Container2.Name := 'Tools2';
     208  Container2.ManualDock(Container1.Panel, nil, alRight);
     209
    232210  MessagesForm.ManualDock(Container1.Panel, nil, alBottom);
    233211  MessagesForm.Show;
    234212
     213  CodeForm.ManualDock(Container2.Panel, nil, alTop);
     214  CodeForm.Show;
     215
     216  CompiledForm.ManualDock(Container2.Panel, nil, alTop);
     217  CompiledForm.Show;
     218
     219  TCoolDockManager(Container2.Panel.DockManager).DockStyle := dsTabs;
     220
    235221  ProjectManager.Parent.Parent.Width := 200;
    236   CodeForm.Parent.Parent.Height := MainForm.Height;
     222  Container2.Parent.Parent.Height := MainForm.Height;
    237223end;
    238224
  • branches/Transpascal/Forms/UProjectManager.pas

    r61 r62  
    11unit UProjectManager;
    2 
    3 {$mode objfpc}{$H+}
    42
    53interface
     
    3028
    3129uses
    32   UMainForm, UCodeForm;
     30  UMainForm, UCodeForm, UCompiledForm, UCodeTreeForm, UProducerTreeView;
    3331
    3432{ TProjectManager }
     
    4543      FileName := Compiler.CompiledFolder + DirectorySeparator +
    4644        Compiler.Producer.ClassName + DirectorySeparator + ExtractFileNameOnly(TProjectFile(Node.Data).Name) + Compiler.Producer.FileExtension;
    47       if ProducerControl is TMemo then
    4845        if FileExists(FileName) then
    49         TMemo(ProducerControl).Lines.LoadFromFile(FileName) else
    50           TMemo(ProducerControl).Lines.Clear;
    51       //if ProducerControl is TTreeView then
    52       //  TTreeView(ProducerControl).Assign(TProjectFile(Node.Data).ProducedCode);
     46        CompiledForm.SynEdit1.Lines.LoadFromFile(FileName) else
     47          CompiledForm.SynEdit1.Lines.Clear;
     48
     49      // Load code tree view
     50      Compiler.Producer.Free;
     51      Compiler.Producer := TProducerTreeView.Create;
     52      Compiler.Init;
     53      Compiler.Parser.OnGetSource := GetSource;
     54      with TProjectFile(Project.Items[0]) do begin
     55        Compiler.Compile(Parent.GetDir + Name, Source);
     56      end;
     57      //CodeTreeForm.TreeView1.Assign(TProducerTreeView(Compiler.Producer).TreeView);
    5358    end;
    5459  end;
  • branches/Transpascal/Transpascal.lpi

    r61 r62  
    4646      </Item4>
    4747    </RequiredPackages>
    48     <Units Count="29">
     48    <Units Count="32">
    4949      <Unit0>
    5050        <Filename Value="Transpascal.lpr"/>
    5151        <IsPartOfProject Value="True"/>
    5252        <UnitName Value="Transpascal"/>
    53         <EditorIndex Value="4"/>
     53        <EditorIndex Value="10"/>
    5454        <WindowIndex Value="0"/>
    5555        <TopLine Value="2"/>
    56         <CursorPos X="35" Y="24"/>
    57         <UsageCount Value="165"/>
    58         <Loaded Value="True"/>
     56        <CursorPos X="55" Y="27"/>
     57        <UsageCount Value="166"/>
     58        <Loaded Value="True"/>
     59        <DefaultSyntaxHighlighter Value="Delphi"/>
    5960      </Unit0>
    6061      <Unit1>
     
    6566        <ResourceBaseClass Value="Form"/>
    6667        <UnitName Value="UMainForm"/>
    67         <EditorIndex Value="3"/>
    68         <WindowIndex Value="0"/>
    69         <TopLine Value="175"/>
    70         <CursorPos X="1" Y="176"/>
    71         <UsageCount Value="165"/>
    72         <Loaded Value="True"/>
     68        <EditorIndex Value="7"/>
     69        <WindowIndex Value="0"/>
     70        <TopLine Value="82"/>
     71        <CursorPos X="14" Y="62"/>
     72        <UsageCount Value="166"/>
     73        <Loaded Value="True"/>
     74        <LoadedDesigner Value="True"/>
     75        <DefaultSyntaxHighlighter Value="Delphi"/>
    7376      </Unit1>
    7477      <Unit2>
     
    7982        <TopLine Value="1"/>
    8083        <CursorPos X="1" Y="6"/>
    81         <UsageCount Value="165"/>
     84        <UsageCount Value="166"/>
     85        <DefaultSyntaxHighlighter Value="Delphi"/>
    8286      </Unit2>
    8387      <Unit3>
     
    8892        <CursorPos X="46" Y="759"/>
    8993        <UsageCount Value="164"/>
     94        <DefaultSyntaxHighlighter Value="Delphi"/>
    9095      </Unit3>
    9196      <Unit4>
     
    96101        <CursorPos X="40" Y="11"/>
    97102        <UsageCount Value="164"/>
     103        <DefaultSyntaxHighlighter Value="Delphi"/>
    98104      </Unit4>
    99105      <Unit5>
     
    211217        <TopLine Value="1"/>
    212218        <CursorPos X="6" Y="1"/>
    213         <UsageCount Value="37"/>
     219        <UsageCount Value="38"/>
     220        <DefaultSyntaxHighlighter Value="Delphi"/>
    214221      </Unit19>
    215222      <Unit20>
     
    233240        <Filename Value="Compiler\UCompiler.pas"/>
    234241        <UnitName Value="UCompiler"/>
    235         <WindowIndex Value="0"/>
    236         <TopLine Value="1"/>
    237         <CursorPos X="26" Y="14"/>
     242        <EditorIndex Value="3"/>
     243        <WindowIndex Value="0"/>
     244        <TopLine Value="44"/>
     245        <CursorPos X="3" Y="50"/>
    238246        <UsageCount Value="10"/>
     247        <Loaded Value="True"/>
    239248      </Unit22>
    240249      <Unit23>
     
    249258        <Filename Value="Compiler\Analyze\UParser.pas"/>
    250259        <UnitName Value="UParser"/>
    251         <WindowIndex Value="0"/>
    252         <TopLine Value="1"/>
    253         <CursorPos X="1" Y="1"/>
     260        <EditorIndex Value="5"/>
     261        <WindowIndex Value="0"/>
     262        <TopLine Value="65"/>
     263        <CursorPos X="32" Y="78"/>
    254264        <UsageCount Value="10"/>
     265        <Loaded Value="True"/>
    255266      </Unit24>
    256267      <Unit25>
     
    271282        <EditorIndex Value="2"/>
    272283        <WindowIndex Value="0"/>
    273         <TopLine Value="22"/>
    274         <CursorPos X="18" Y="41"/>
    275         <UsageCount Value="21"/>
     284        <TopLine Value="38"/>
     285        <CursorPos X="9" Y="57"/>
     286        <UsageCount Value="22"/>
    276287        <Loaded Value="True"/>
    277288        <LoadedDesigner Value="True"/>
     289        <DefaultSyntaxHighlighter Value="Delphi"/>
    278290      </Unit26>
    279291      <Unit27>
     
    287299        <TopLine Value="7"/>
    288300        <CursorPos X="32" Y="16"/>
    289         <UsageCount Value="21"/>
     301        <UsageCount Value="22"/>
    290302        <Loaded Value="True"/>
    291303        <LoadedDesigner Value="True"/>
     304        <DefaultSyntaxHighlighter Value="Delphi"/>
    292305      </Unit27>
    293306      <Unit28>
     
    297310        <ResourceBaseClass Value="Form"/>
    298311        <UnitName Value="UMessagesForm"/>
     312        <EditorIndex Value="8"/>
     313        <WindowIndex Value="0"/>
     314        <TopLine Value="1"/>
     315        <CursorPos X="1" Y="1"/>
     316        <UsageCount Value="22"/>
     317        <Loaded Value="True"/>
     318        <DefaultSyntaxHighlighter Value="Delphi"/>
     319      </Unit28>
     320      <Unit29>
     321        <Filename Value="Forms\UCompiledForm.pas"/>
     322        <IsPartOfProject Value="True"/>
     323        <ComponentName Value="CompiledForm"/>
     324        <HasResources Value="True"/>
     325        <ResourceBaseClass Value="Form"/>
     326        <UnitName Value="UCompiledForm"/>
     327        <EditorIndex Value="6"/>
    299328        <WindowIndex Value="0"/>
    300329        <TopLine Value="1"/>
    301330        <CursorPos X="1" Y="1"/>
    302331        <UsageCount Value="21"/>
    303       </Unit28>
     332        <Loaded Value="True"/>
     333        <LoadedDesigner Value="True"/>
     334        <DefaultSyntaxHighlighter Value="Delphi"/>
     335      </Unit29>
     336      <Unit30>
     337        <Filename Value="Forms\UCodeTreeForm.pas"/>
     338        <IsPartOfProject Value="True"/>
     339        <ComponentName Value="CodeTreeForm"/>
     340        <ResourceBaseClass Value="Form"/>
     341        <UnitName Value="UCodeTreeForm"/>
     342        <EditorIndex Value="9"/>
     343        <WindowIndex Value="0"/>
     344        <TopLine Value="1"/>
     345        <CursorPos X="1" Y="1"/>
     346        <UsageCount Value="20"/>
     347        <Loaded Value="True"/>
     348        <LoadedDesigner Value="True"/>
     349        <DefaultSyntaxHighlighter Value="Delphi"/>
     350      </Unit30>
     351      <Unit31>
     352        <Filename Value="Compiler\Produce\UProducerTreeView.pas"/>
     353        <UnitName Value="UProducerTreeView"/>
     354        <EditorIndex Value="4"/>
     355        <WindowIndex Value="0"/>
     356        <TopLine Value="351"/>
     357        <CursorPos X="3" Y="355"/>
     358        <UsageCount Value="10"/>
     359        <Loaded Value="True"/>
     360      </Unit31>
    304361    </Units>
    305     <JumpHistory Count="10" HistoryIndex="9">
     362    <JumpHistory Count="29" HistoryIndex="28">
    306363      <Position1>
    307         <Filename Value="Forms\UCodeForm.pas"/>
    308         <Caret Line="16" Column="10" TopLine="1"/>
     364        <Filename Value="Forms\UProjectManager.pas"/>
     365        <Caret Line="9" Column="11" TopLine="1"/>
    309366      </Position1>
    310367      <Position2>
    311         <Filename Value="Transpascal.lpr"/>
    312         <Caret Line="9" Column="35" TopLine="1"/>
     368        <Filename Value="Forms\UProjectManager.pas"/>
     369        <Caret Line="32" Column="23" TopLine="21"/>
    313370      </Position2>
    314371      <Position3>
    315372        <Filename Value="Forms\UProjectManager.pas"/>
    316         <Caret Line="13" Column="9" TopLine="1"/>
     373        <Caret Line="43" Column="16" TopLine="30"/>
    317374      </Position3>
    318375      <Position4>
    319         <Filename Value="Transpascal.lpr"/>
    320         <Caret Line="27" Column="1" TopLine="2"/>
     376        <Filename Value="Forms\UProjectManager.pas"/>
     377        <Caret Line="41" Column="19" TopLine="21"/>
    321378      </Position4>
    322379      <Position5>
    323380        <Filename Value="Forms\UProjectManager.pas"/>
    324         <Caret Line="34" Column="1" TopLine="29"/>
     381        <Caret Line="35" Column="22" TopLine="22"/>
    325382      </Position5>
    326383      <Position6>
    327384        <Filename Value="Forms\UProjectManager.pas"/>
    328         <Caret Line="31" Column="13" TopLine="24"/>
     385        <Caret Line="47" Column="22" TopLine="33"/>
    329386      </Position6>
    330387      <Position7>
    331         <Filename Value="Forms\UProjectManager.pas"/>
    332         <Caret Line="9" Column="11" TopLine="1"/>
     388        <Filename Value="Forms\UCompiledForm.pas"/>
     389        <Caret Line="1" Column="1" TopLine="1"/>
    333390      </Position7>
    334391      <Position8>
    335392        <Filename Value="Forms\UProjectManager.pas"/>
    336         <Caret Line="32" Column="23" TopLine="21"/>
     393        <Caret Line="47" Column="1" TopLine="32"/>
    337394      </Position8>
    338395      <Position9>
    339396        <Filename Value="Forms\UProjectManager.pas"/>
    340         <Caret Line="43" Column="16" TopLine="30"/>
     397        <Caret Line="48" Column="22" TopLine="32"/>
    341398      </Position9>
    342399      <Position10>
    343400        <Filename Value="Forms\UProjectManager.pas"/>
    344         <Caret Line="41" Column="19" TopLine="21"/>
     401        <Caret Line="32" Column="38" TopLine="19"/>
    345402      </Position10>
     403      <Position11>
     404        <Filename Value="Forms\UProjectManager.pas"/>
     405        <Caret Line="48" Column="37" TopLine="32"/>
     406      </Position11>
     407      <Position12>
     408        <Filename Value="Forms\UProjectManager.pas"/>
     409        <Caret Line="49" Column="1" TopLine="32"/>
     410      </Position12>
     411      <Position13>
     412        <Filename Value="Forms\UMainForm.pas"/>
     413        <Caret Line="62" Column="1" TopLine="49"/>
     414      </Position13>
     415      <Position14>
     416        <Filename Value="Forms\UMainForm.pas"/>
     417        <Caret Line="95" Column="1" TopLine="81"/>
     418      </Position14>
     419      <Position15>
     420        <Filename Value="Forms\UMainForm.pas"/>
     421        <Caret Line="96" Column="1" TopLine="83"/>
     422      </Position15>
     423      <Position16>
     424        <Filename Value="Forms\UMainForm.pas"/>
     425        <Caret Line="106" Column="1" TopLine="103"/>
     426      </Position16>
     427      <Position17>
     428        <Filename Value="Forms\UCodeForm.pas"/>
     429        <Caret Line="16" Column="32" TopLine="7"/>
     430      </Position17>
     431      <Position18>
     432        <Filename Value="Forms\UMainForm.pas"/>
     433        <Caret Line="216" Column="70" TopLine="201"/>
     434      </Position18>
     435      <Position19>
     436        <Filename Value="Forms\UCodeTreeForm.pas"/>
     437        <Caret Line="1" Column="1" TopLine="1"/>
     438      </Position19>
     439      <Position20>
     440        <Filename Value="Forms\UMainForm.pas"/>
     441        <Caret Line="196" Column="18" TopLine="185"/>
     442      </Position20>
     443      <Position21>
     444        <Filename Value="Forms\UMainForm.pas"/>
     445        <Caret Line="93" Column="50" TopLine="73"/>
     446      </Position21>
     447      <Position22>
     448        <Filename Value="Forms\UProjectManager.pas"/>
     449        <Caret Line="32" Column="72" TopLine="14"/>
     450      </Position22>
     451      <Position23>
     452        <Filename Value="Forms\UProjectManager.pas"/>
     453        <Caret Line="55" Column="43" TopLine="40"/>
     454      </Position23>
     455      <Position24>
     456        <Filename Value="Forms\UMainForm.pas"/>
     457        <Caret Line="100" Column="39" TopLine="79"/>
     458      </Position24>
     459      <Position25>
     460        <Filename Value="Forms\UProjectManager.pas"/>
     461        <Caret Line="3" Column="1" TopLine="1"/>
     462      </Position25>
     463      <Position26>
     464        <Filename Value="Forms\UProjectManager.pas"/>
     465        <Caret Line="18" Column="43" TopLine="1"/>
     466      </Position26>
     467      <Position27>
     468        <Filename Value="Forms\UProjectManager.pas"/>
     469        <Caret Line="54" Column="27" TopLine="38"/>
     470      </Position27>
     471      <Position28>
     472        <Filename Value="Forms\UProjectManager.pas"/>
     473        <Caret Line="57" Column="80" TopLine="38"/>
     474      </Position28>
     475      <Position29>
     476        <Filename Value="Forms\UProjectManager.pas"/>
     477        <Caret Line="55" Column="23" TopLine="38"/>
     478      </Position29>
    346479    </JumpHistory>
    347480  </ProjectOptions>
     
    353486      <UnitOutputDirectory Value="lib\$(TargetCPU)-$(TargetOS)"/>
    354487    </SearchPaths>
     488    <Parsing>
     489      <SyntaxOptions>
     490        <SyntaxMode Value="Delphi"/>
     491      </SyntaxOptions>
     492    </Parsing>
    355493    <CodeGeneration>
    356494      <Checks>
     
    382520  </CompilerOptions>
    383521  <Debugging>
    384     <BreakPoints Count="1">
     522    <BreakPoints Count="2">
    385523      <Item1>
    386524        <Source Value="USourceCode.pas"/>
    387525        <Line Value="723"/>
    388526      </Item1>
     527      <Item2>
     528        <Source Value="Forms\UProjectManager.pas"/>
     529        <Line Value="57"/>
     530      </Item2>
    389531    </BreakPoints>
    390532    <Exceptions Count="3">
  • branches/Transpascal/Transpascal.lpr

    r61 r62  
    1010  UMainForm in 'UMainForm.pas' {MainForm},
    1111  UTextSource in 'UTextSource.pas', UProject, TranspascalCompiler,
    12 UProjectManager, UCodeForm, UMessagesForm;
     12UProjectManager, UCodeForm, UMessagesForm, UCompiledForm, UCodeTreeForm;
    1313
    1414{$R *.res}
     
    2424  Application.CreateForm(TCodeForm, CodeForm);
    2525  Application.CreateForm(TMessagesForm, MessagesForm);
     26  Application.CreateForm(TCompiledForm, CompiledForm);
     27  Application.CreateForm(TCodeTreeForm, CodeTreeForm);
    2628  Application.Run;
    2729end.
Note: See TracChangeset for help on using the changeset viewer.