Changeset 62
- Timestamp:
- Oct 15, 2010, 7:09:49 AM (14 years ago)
- Location:
- branches/Transpascal
- Files:
-
- 4 added
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/Transpascal/Forms/UCodeForm.lfm
r61 r62 69 69 Priority = 0 70 70 end> 71 Highlighter = SynPasSyn1 71 72 Keystrokes = < 72 73 item -
branches/Transpascal/Forms/UMainForm.lfm
r61 r62 1 1 object MainForm: TMainForm 2 Left = 1 143 Height = 50 44 Top = 1 225 Width = 8612 Left = 142 3 Height = 501 4 Top = 113 5 Width = 695 6 6 Caption = 'Transpascal IDE' 7 ClientHeight = 5048 ClientWidth = 8617 ClientHeight = 482 8 ClientWidth = 695 9 9 Font.Height = -11 10 10 Font.Name = 'Tahoma' … … 20 20 Left = 0 21 21 Height = 5 22 Top = 4 8023 Width = 86122 Top = 477 23 Width = 695 24 24 Align = alBottom 25 25 ResizeAnchor = akBottom … … 27 27 object DockPanel: TPanel 28 28 Left = 0 29 Height = 45 429 Height = 451 30 30 Top = 26 31 Width = 86131 Width = 695 32 32 Align = alClient 33 33 BevelOuter = bvNone … … 38 38 Height = 26 39 39 Top = 0 40 Width = 86140 Width = 695 41 41 Caption = 'ToolBar1' 42 42 TabOrder = 2 … … 47 47 Width = 100 48 48 ItemHeight = 13 49 ItemIndex = 1 50 Items.Strings = ( 51 'Pascal' 52 'C' 53 'AS8051' 54 'XML' 55 ) 56 Style = csDropDownList 49 57 TabOrder = 0 50 Text = 'C omboBox1'58 Text = 'C' 51 59 end 52 60 object Button1: TButton -
branches/Transpascal/Forms/UMainForm.pas
r61 r62 9 9 Dialogs, StdCtrls, UCompiler, UProducerAsm8051, 10 10 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; 12 13 13 14 const … … 51 52 procedure Splitter2CanResize(Sender: TObject; var NewSize: Integer; 52 53 var Accept: Boolean); 53 procedure TreeViewProjectChange(Sender: TObject; Node: TTreeNode);54 54 private 55 55 procedure LoadErrorMessages; 56 56 procedure UpdateProjectTree; 57 57 procedure UpdateProjectGroup(Node: TTreeNode; Group: TProjectGroup); 58 function GetSource(Name: string; Source: TStringList): Boolean;59 58 procedure DockInit; 60 59 public 61 60 Project: TProject; 62 ProducerControl: TControl;63 61 Compiler: TCompiler; 62 function GetSource(Name: string; Source: TStringList): Boolean; 64 63 end; 65 64 … … 80 79 I: Integer; 81 80 begin 82 ProducerControl.Free;83 81 if ComboBox1.ItemIndex = 0 then begin 84 82 Compiler.Producer.Free; … … 96 94 Compiler.Producer.Free; 97 95 Compiler.Producer := TProducerTreeView.Create; 98 ProducerControl := TTreeView.Create(Self);99 ProducerControl.Parent := DockPanel;100 ProducerControl.Align := alClient;101 // TProducerTreeView(Compiler.Producer).TreeView := TTreeView(ProducerControl);102 96 end; 103 97 … … 107 101 with TProjectFile(Project.Items[0]) do begin 108 102 Compiler.Compile(Parent.GetDir + Name, Source); 109 end;110 111 if ComboBox1.ItemIndex = 0 then begin112 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 else118 if ComboBox1.ItemIndex = 1 then begin119 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 else125 if ComboBox1.ItemIndex = 2 then begin126 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 else132 if ComboBox1.ItemIndex = 3 then begin133 103 end; 134 104 … … 219 189 var 220 190 Container1: TCoolDockConjoinForm; 191 Container2: TCoolDockConjoinForm; 221 192 begin 222 193 ProjectManager.ManualDock(DockPanel, nil, alLeft); … … 228 199 Container1.ManualDock(DockPanel, nil, alRight); 229 200 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 232 210 MessagesForm.ManualDock(Container1.Panel, nil, alBottom); 233 211 MessagesForm.Show; 234 212 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 235 221 ProjectManager.Parent.Parent.Width := 200; 236 Co deForm.Parent.Parent.Height := MainForm.Height;222 Container2.Parent.Parent.Height := MainForm.Height; 237 223 end; 238 224 -
branches/Transpascal/Forms/UProjectManager.pas
r61 r62 1 1 unit UProjectManager; 2 3 {$mode objfpc}{$H+}4 2 5 3 interface … … 30 28 31 29 uses 32 UMainForm, UCodeForm ;30 UMainForm, UCodeForm, UCompiledForm, UCodeTreeForm, UProducerTreeView; 33 31 34 32 { TProjectManager } … … 45 43 FileName := Compiler.CompiledFolder + DirectorySeparator + 46 44 Compiler.Producer.ClassName + DirectorySeparator + ExtractFileNameOnly(TProjectFile(Node.Data).Name) + Compiler.Producer.FileExtension; 47 if ProducerControl is TMemo then48 45 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); 53 58 end; 54 59 end; -
branches/Transpascal/Transpascal.lpi
r61 r62 46 46 </Item4> 47 47 </RequiredPackages> 48 <Units Count=" 29">48 <Units Count="32"> 49 49 <Unit0> 50 50 <Filename Value="Transpascal.lpr"/> 51 51 <IsPartOfProject Value="True"/> 52 52 <UnitName Value="Transpascal"/> 53 <EditorIndex Value=" 4"/>53 <EditorIndex Value="10"/> 54 54 <WindowIndex Value="0"/> 55 55 <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"/> 59 60 </Unit0> 60 61 <Unit1> … … 65 66 <ResourceBaseClass Value="Form"/> 66 67 <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"/> 73 76 </Unit1> 74 77 <Unit2> … … 79 82 <TopLine Value="1"/> 80 83 <CursorPos X="1" Y="6"/> 81 <UsageCount Value="165"/> 84 <UsageCount Value="166"/> 85 <DefaultSyntaxHighlighter Value="Delphi"/> 82 86 </Unit2> 83 87 <Unit3> … … 88 92 <CursorPos X="46" Y="759"/> 89 93 <UsageCount Value="164"/> 94 <DefaultSyntaxHighlighter Value="Delphi"/> 90 95 </Unit3> 91 96 <Unit4> … … 96 101 <CursorPos X="40" Y="11"/> 97 102 <UsageCount Value="164"/> 103 <DefaultSyntaxHighlighter Value="Delphi"/> 98 104 </Unit4> 99 105 <Unit5> … … 211 217 <TopLine Value="1"/> 212 218 <CursorPos X="6" Y="1"/> 213 <UsageCount Value="37"/> 219 <UsageCount Value="38"/> 220 <DefaultSyntaxHighlighter Value="Delphi"/> 214 221 </Unit19> 215 222 <Unit20> … … 233 240 <Filename Value="Compiler\UCompiler.pas"/> 234 241 <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"/> 238 246 <UsageCount Value="10"/> 247 <Loaded Value="True"/> 239 248 </Unit22> 240 249 <Unit23> … … 249 258 <Filename Value="Compiler\Analyze\UParser.pas"/> 250 259 <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"/> 254 264 <UsageCount Value="10"/> 265 <Loaded Value="True"/> 255 266 </Unit24> 256 267 <Unit25> … … 271 282 <EditorIndex Value="2"/> 272 283 <WindowIndex Value="0"/> 273 <TopLine Value=" 22"/>274 <CursorPos X=" 18" Y="41"/>275 <UsageCount Value="2 1"/>284 <TopLine Value="38"/> 285 <CursorPos X="9" Y="57"/> 286 <UsageCount Value="22"/> 276 287 <Loaded Value="True"/> 277 288 <LoadedDesigner Value="True"/> 289 <DefaultSyntaxHighlighter Value="Delphi"/> 278 290 </Unit26> 279 291 <Unit27> … … 287 299 <TopLine Value="7"/> 288 300 <CursorPos X="32" Y="16"/> 289 <UsageCount Value="2 1"/>301 <UsageCount Value="22"/> 290 302 <Loaded Value="True"/> 291 303 <LoadedDesigner Value="True"/> 304 <DefaultSyntaxHighlighter Value="Delphi"/> 292 305 </Unit27> 293 306 <Unit28> … … 297 310 <ResourceBaseClass Value="Form"/> 298 311 <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"/> 299 328 <WindowIndex Value="0"/> 300 329 <TopLine Value="1"/> 301 330 <CursorPos X="1" Y="1"/> 302 331 <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> 304 361 </Units> 305 <JumpHistory Count=" 10" HistoryIndex="9">362 <JumpHistory Count="29" HistoryIndex="28"> 306 363 <Position1> 307 <Filename Value="Forms\U CodeForm.pas"/>308 <Caret Line=" 16" Column="10" TopLine="1"/>364 <Filename Value="Forms\UProjectManager.pas"/> 365 <Caret Line="9" Column="11" TopLine="1"/> 309 366 </Position1> 310 367 <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"/> 313 370 </Position2> 314 371 <Position3> 315 372 <Filename Value="Forms\UProjectManager.pas"/> 316 <Caret Line=" 13" Column="9" TopLine="1"/>373 <Caret Line="43" Column="16" TopLine="30"/> 317 374 </Position3> 318 375 <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"/> 321 378 </Position4> 322 379 <Position5> 323 380 <Filename Value="Forms\UProjectManager.pas"/> 324 <Caret Line="3 4" Column="1" TopLine="29"/>381 <Caret Line="35" Column="22" TopLine="22"/> 325 382 </Position5> 326 383 <Position6> 327 384 <Filename Value="Forms\UProjectManager.pas"/> 328 <Caret Line=" 31" Column="13" TopLine="24"/>385 <Caret Line="47" Column="22" TopLine="33"/> 329 386 </Position6> 330 387 <Position7> 331 <Filename Value="Forms\U ProjectManager.pas"/>332 <Caret Line=" 9" Column="11" TopLine="1"/>388 <Filename Value="Forms\UCompiledForm.pas"/> 389 <Caret Line="1" Column="1" TopLine="1"/> 333 390 </Position7> 334 391 <Position8> 335 392 <Filename Value="Forms\UProjectManager.pas"/> 336 <Caret Line=" 32" Column="23" TopLine="21"/>393 <Caret Line="47" Column="1" TopLine="32"/> 337 394 </Position8> 338 395 <Position9> 339 396 <Filename Value="Forms\UProjectManager.pas"/> 340 <Caret Line="4 3" Column="16" TopLine="30"/>397 <Caret Line="48" Column="22" TopLine="32"/> 341 398 </Position9> 342 399 <Position10> 343 400 <Filename Value="Forms\UProjectManager.pas"/> 344 <Caret Line=" 41" Column="19" TopLine="21"/>401 <Caret Line="32" Column="38" TopLine="19"/> 345 402 </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> 346 479 </JumpHistory> 347 480 </ProjectOptions> … … 353 486 <UnitOutputDirectory Value="lib\$(TargetCPU)-$(TargetOS)"/> 354 487 </SearchPaths> 488 <Parsing> 489 <SyntaxOptions> 490 <SyntaxMode Value="Delphi"/> 491 </SyntaxOptions> 492 </Parsing> 355 493 <CodeGeneration> 356 494 <Checks> … … 382 520 </CompilerOptions> 383 521 <Debugging> 384 <BreakPoints Count=" 1">522 <BreakPoints Count="2"> 385 523 <Item1> 386 524 <Source Value="USourceCode.pas"/> 387 525 <Line Value="723"/> 388 526 </Item1> 527 <Item2> 528 <Source Value="Forms\UProjectManager.pas"/> 529 <Line Value="57"/> 530 </Item2> 389 531 </BreakPoints> 390 532 <Exceptions Count="3"> -
branches/Transpascal/Transpascal.lpr
r61 r62 10 10 UMainForm in 'UMainForm.pas' {MainForm}, 11 11 UTextSource in 'UTextSource.pas', UProject, TranspascalCompiler, 12 UProjectManager, UCodeForm, UMessagesForm ;12 UProjectManager, UCodeForm, UMessagesForm, UCompiledForm, UCodeTreeForm; 13 13 14 14 {$R *.res} … … 24 24 Application.CreateForm(TCodeForm, CodeForm); 25 25 Application.CreateForm(TMessagesForm, MessagesForm); 26 Application.CreateForm(TCompiledForm, CompiledForm); 27 Application.CreateForm(TCodeTreeForm, CodeTreeForm); 26 28 Application.Run; 27 29 end.
Note:
See TracChangeset
for help on using the changeset viewer.