- Timestamp:
- Nov 9, 2010, 2:08:55 PM (14 years ago)
- Location:
- trunk
- Files:
-
- 5 added
- 11 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Compiler/Analyze/UAnalyzerPascal.pas
r20 r21 79 79 SInvalidAssignmentValue = 'Invalid assignment "%s".'; 80 80 SParamDiffers = 'Declaration of parametr "%s" differs.'; 81 SNotRecordOrClass = '"%s" not record or class'; 81 82 82 83 implementation … … 257 258 if Assigned(UseFunction) then begin 258 259 // Record or class functions 259 ParseExpressionFunctionCall(SourceCode, Expressions, FunctionCall); 260 NewExpression := TExpression.Create; 261 NewExpression.CommonBlock := SourceCode.CommonBlock; 262 NewExpression.NodeType := ntFunction; 263 NewExpression.FunctionCall := FunctionCall; 260 if ParseExpressionFunctionCall(SourceCode, Expressions, FunctionCall) then begin 261 NewExpression := TExpression.Create; 262 NewExpression.CommonBlock := SourceCode.CommonBlock; 263 NewExpression.NodeType := ntFunction; 264 NewExpression.FunctionCall := FunctionCall; 265 end; 264 266 end; 265 267 end; … … 336 338 var 337 339 UseFunction: TFunction; 340 UseType: TType; 338 341 NewExpression: TExpression; 339 342 I: Integer; … … 544 547 if Section = cbsConstant then begin 545 548 ParseConstant(Constants); 546 end else begin 549 end else 550 if NextToken = 'initialization' then Break 551 else if NextToken = 'finalization' then Break 552 else begin 547 553 ErrorMessage(SInvalidConstruction, [NextToken]); 548 554 ReadToken; … … 676 682 UseFunction.Name := UseName; 677 683 UseFunction.FunctionType := FunctionType; 684 UseFunction.Exported := Exported; 678 685 Add(UseFunction); 686 UseFunction.Parent.Order.Add(UseFunction); 679 687 ValidParams := False; 680 688 end; … … 690 698 NewValueType := Parent.Types.Search(TypeName); 691 699 if not Assigned(NewValueType) then 692 ErrorMessage(SUndefinedType, [TypeName], -1) ;693 (*else700 ErrorMessage(SUndefinedType, [TypeName], -1) 701 else 694 702 begin 695 703 ResultType := NewValueType; 696 with TVariable( Parent.Variables.Items[Parent.Variables.Add(704 with TVariable(Variables.Items[Variables.Add( 697 705 TVariable.Create)]) do 698 706 begin … … 700 708 ValueType := NewValueType; 701 709 end; 702 end; *)710 end; 703 711 end; 704 712 Expect(';'); … … 1254 1262 TTypeArray(NewType).IndexType := TypeList.Parent.Types.Search(UseName); 1255 1263 if not Assigned(TTypeArray(NewType).IndexType) then 1256 ErrorMessage(SUndefinedType, [UseName], -1) else 1257 TTypeArray(NewType).IndexType := UseType; 1264 ErrorMessage(SUndefinedType, [UseName], -1); 1258 1265 end else 1259 1266 if NextTokenType = ttConstantNumber then begin -
trunk/Compiler/Produce/UProducerPascal.pas
r19 r21 454 454 Section: TCommonBlockSection; 455 455 begin 456 Inc(Indetation); 456 457 with CommonBlock do begin 457 458 for I := 0 to Order.Count - 1 do begin … … 459 460 if Section <> cbsType then begin 460 461 EmitLn; 462 Dec(Indetation); 461 463 EmitLn('type'); 464 Inc(Indetation); 462 465 end; 463 466 Emit(TType(Order[I]).Name + ' = '); … … 469 472 if Section <> cbsVariable then begin 470 473 EmitLn; 474 Dec(Indetation); 471 475 EmitLn('var'); 476 Inc(Indetation); 472 477 end; 473 478 GenerateVariable(TVariable(Order[I])); … … 477 482 if Section <> cbsConstant then begin 478 483 EmitLn; 484 Dec(Indetation); 479 485 EmitLn('const'); 486 Inc(Indetation); 480 487 end; 481 488 GenerateConstant(TConstant(Order[I])); … … 488 495 GenerateBeginEnd(Code); 489 496 end; 497 Dec(Indetation); 490 498 end; 491 499 -
trunk/Demos/Structure
-
Property svn:ignore
set to
Compiled
-
Property svn:ignore
set to
-
trunk/Demos/Structure/Project.pas
r15 r21 1 1 program Project; 2 2 3 uses System , Crt;3 uses System; 4 4 5 5 type 6 7 TPercent = 0..100; 8 6 9 TPoint = record 7 10 X: Integer; -
trunk/Demos/Structure/System.pas
r15 r21 3 3 interface 4 4 5 const 6 nil = 0; 7 5 8 type 6 Void = type; 7 Ordinal = type(Void); 8 Float = type(Void); 9 TType = type; 10 Void = type(TType); 11 Ordinal = type(TType); 12 Float = type(TType); 9 13 Boolean = (False, True); 10 14 … … 30 34 31 35 String = array of Char; 32 Pointer = ^Void; 33 TObject = class 34 function ClassName: string; 35 constructor Create; internal; 36 destructor Destroy; internal; 37 end; 36 Pointer = ^TType; 37 TObject = class; 38 38 39 const 40 MemoryManagerSizeType: TType = Integer; 39 type 41 40 42 type43 TMemoryManager = record44 function Alloc(Size: Integer): Pointer;45 function Free(P: Pointer): Integer;46 function Realloc(P: Pointer; Size: Integer): Pointer;47 end;48 PMemoryManager = ^TMemoryManager;49 41 50 42 TSystem = record 51 MemoryManager: TMemoryManager;52 43 end; 53 44 … … 55 46 procedure Break; internal; 56 47 procedure Continue; internal; 57 procedure WriteLn; internal; 48 procedure WriteLn(Text: string); internal; 49 function SizeOf(Source: TType): Integer; internal; 50 function IntToStr(Value: Integer): string; internal; 58 51 59 procedure Move(const Source: type; var Dest: type; Count: Integer);60 procedure FillChar(var Dest: type; Count: Integer; Value: Byte);52 procedure Move(const Source: TType; var Dest: TType; Count: Integer); internal; 53 procedure FillChar(var Dest: TType; Count: Integer; Value: Byte); internal; 61 54 62 55 implementation 63 64 uses65 MemoryManager;66 56 67 57 initialization -
trunk/IDE/Forms/UCodeForm.lfm
r2 r21 618 618 ) 619 619 BracketHighlightStyle = sbhsBoth 620 OnChange = SynEditSourceChange 620 621 inline SynGutterPartList1: TSynGutterPartList 621 622 object SynGutterMarks1: TSynGutterMarks … … 725 726 end 726 727 end 727 inline SynRightGutterPartList1: TSynRightGutterPartList728 end729 728 end 730 729 object CoolDockClient1: TCoolDockClient … … 735 734 end 736 735 object SynPasSyn1: TSynPasSyn 736 Enabled = False 737 AsmAttri.FrameEdges = sfeAround 738 CommentAttri.FrameEdges = sfeAround 739 IdentifierAttri.FrameEdges = sfeAround 740 KeyAttri.FrameEdges = sfeAround 741 NumberAttri.FrameEdges = sfeAround 742 SpaceAttri.FrameEdges = sfeAround 743 StringAttri.FrameEdges = sfeAround 744 SymbolAttri.FrameEdges = sfeAround 745 CaseLabelAttri.FrameEdges = sfeAround 746 DirectiveAttri.FrameEdges = sfeAround 737 747 CompilerMode = pcmDelphi 738 748 NestedComments = False -
trunk/IDE/Forms/UCodeForm.pas
r2 r21 7 7 uses 8 8 Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, UCoolDocking, 9 SynEdit, SynHighlighterPas ;9 SynEdit, SynHighlighterPas, UProject; 10 10 11 11 type … … 17 17 SynEditSource: TSynEdit; 18 18 SynPasSyn1: TSynPasSyn; 19 procedure SynEditSourceChange(Sender: TObject); 19 20 private 20 21 { private declarations } 21 22 public 22 { public declarations }23 ProjectFile: TProjectFile; 23 24 end; 24 25 … … 28 29 implementation 29 30 31 uses 32 UMainForm; 33 30 34 {$R *.lfm} 35 36 { TCodeForm } 37 38 procedure TCodeForm.SynEditSourceChange(Sender: TObject); 39 begin 40 ProjectFile.Modified := True; 41 end; 31 42 32 43 end. -
trunk/IDE/Forms/UMainForm.lfm
r12 r21 163 163 Caption = 'Save' 164 164 Hint = 'Save project to disk' 165 OnExecute = AProjectSaveExecute 165 166 end 166 167 object AProjectSaveAs: TAction -
trunk/IDE/Forms/UMainForm.pas
r20 r21 54 54 procedure AProjectOpenExecute(Sender: TObject); 55 55 procedure AProjectSaveAsExecute(Sender: TObject); 56 procedure AProjectSaveExecute(Sender: TObject); 56 57 procedure ComboBox1Change(Sender: TObject); 57 58 procedure ComboBoxProducerChange(Sender: TObject); … … 292 293 if SaveDialog1.Execute then begin 293 294 Project.SaveToFile(SaveDialog1.FileName); 294 end; 295 Project.Save; 296 end; 297 end; 298 299 procedure TMainForm.AProjectSaveExecute(Sender: TObject); 300 begin 301 Project.Save; 295 302 end; 296 303 -
trunk/IDE/Transpascal.lpi
r20 r21 71 71 <ResourceBaseClass Value="Form"/> 72 72 <UnitName Value="UMainForm"/> 73 <IsVisibleTab Value="True"/>74 73 <EditorIndex Value="0"/> 75 74 <WindowIndex Value="0"/> 76 <TopLine Value="1 14"/>77 <CursorPos X=" 48" Y="114"/>75 <TopLine Value="133"/> 76 <CursorPos X="14" Y="138"/> 78 77 <UsageCount Value="215"/> 79 78 <Loaded Value="True"/> … … 97 96 <TopLine Value="745"/> 98 97 <CursorPos X="46" Y="759"/> 99 <UsageCount Value="11 8"/>98 <UsageCount Value="117"/> 100 99 <DefaultSyntaxHighlighter Value="Delphi"/> 101 100 </Unit3> … … 106 105 <TopLine Value="1"/> 107 106 <CursorPos X="40" Y="11"/> 108 <UsageCount Value="11 8"/>107 <UsageCount Value="117"/> 109 108 <DefaultSyntaxHighlighter Value="Delphi"/> 110 109 </Unit4> … … 115 114 <TopLine Value="187"/> 116 115 <CursorPos X="34" Y="201"/> 117 <UsageCount Value="11 8"/>116 <UsageCount Value="117"/> 118 117 </Unit5> 119 118 <Unit6> … … 123 122 <TopLine Value="1"/> 124 123 <CursorPos X="1" Y="14"/> 125 <UsageCount Value="11 8"/>124 <UsageCount Value="117"/> 126 125 </Unit6> 127 126 <Unit7> … … 131 130 <TopLine Value="124"/> 132 131 <CursorPos X="42" Y="136"/> 133 <UsageCount Value="11 8"/>132 <UsageCount Value="117"/> 134 133 </Unit7> 135 134 <Unit8> … … 139 138 <TopLine Value="442"/> 140 139 <CursorPos X="47" Y="455"/> 141 <UsageCount Value="11 8"/>140 <UsageCount Value="117"/> 142 141 </Unit8> 143 142 <Unit9> … … 147 146 <TopLine Value="78"/> 148 147 <CursorPos X="27" Y="86"/> 149 <UsageCount Value=" 10"/>148 <UsageCount Value="9"/> 150 149 </Unit9> 151 150 <Unit10> … … 154 153 <TopLine Value="61"/> 155 154 <CursorPos X="7" Y="68"/> 156 <UsageCount Value=" 20"/>155 <UsageCount Value="19"/> 157 156 </Unit10> 158 157 <Unit11> … … 161 160 <TopLine Value="139"/> 162 161 <CursorPos X="16" Y="146"/> 163 <UsageCount Value=" 20"/>162 <UsageCount Value="19"/> 164 163 </Unit11> 165 164 <Unit12> … … 169 168 <TopLine Value="69"/> 170 169 <CursorPos X="1" Y="82"/> 171 <UsageCount Value=" 80"/>170 <UsageCount Value="79"/> 172 171 </Unit12> 173 172 <Unit13> … … 177 176 <TopLine Value="320"/> 178 177 <CursorPos X="1" Y="327"/> 179 <UsageCount Value="3 4"/>178 <UsageCount Value="33"/> 180 179 </Unit13> 181 180 <Unit14> … … 183 182 <IsPartOfProject Value="True"/> 184 183 <UnitName Value="UProject"/> 184 <IsVisibleTab Value="True"/> 185 185 <EditorIndex Value="1"/> 186 186 <WindowIndex Value="0"/> 187 <TopLine Value="2 62"/>188 <CursorPos X=" 1" Y="269"/>187 <TopLine Value="259"/> 188 <CursorPos X="3" Y="266"/> 189 189 <UsageCount Value="223"/> 190 190 <Loaded Value="True"/> … … 197 197 <TopLine Value="70"/> 198 198 <CursorPos X="53" Y="92"/> 199 <UsageCount Value="9 8"/>199 <UsageCount Value="97"/> 200 200 </Unit15> 201 201 <Unit16> … … 205 205 <TopLine Value="3"/> 206 206 <CursorPos X="32" Y="17"/> 207 <UsageCount Value="9 9"/>207 <UsageCount Value="98"/> 208 208 </Unit16> 209 209 <Unit17> … … 213 213 <TopLine Value="45"/> 214 214 <CursorPos X="14" Y="58"/> 215 <UsageCount Value="9 8"/>215 <UsageCount Value="97"/> 216 216 </Unit17> 217 217 <Unit18> … … 221 221 <ResourceBaseClass Value="Form"/> 222 222 <UnitName Value="UProjectManager"/> 223 <WindowIndex Value="0"/> 224 <TopLine Value="44"/> 225 <CursorPos X="39" Y="57"/> 223 <EditorIndex Value="10"/> 224 <WindowIndex Value="0"/> 225 <TopLine Value="1"/> 226 <CursorPos X="37" Y="52"/> 226 227 <UsageCount Value="207"/> 228 <Loaded Value="True"/> 227 229 <DefaultSyntaxHighlighter Value="Delphi"/> 228 230 </Unit18> … … 233 235 <ResourceBaseClass Value="Form"/> 234 236 <UnitName Value="UCodeForm"/> 235 <WindowIndex Value="0"/> 236 <TopLine Value="1"/> 237 <CursorPos X="26" Y="17"/> 237 <EditorIndex Value="2"/> 238 <WindowIndex Value="0"/> 239 <TopLine Value="1"/> 240 <CursorPos X="36" Y="9"/> 238 241 <UsageCount Value="207"/> 242 <Loaded Value="True"/> 243 <LoadedDesigner Value="True"/> 239 244 <DefaultSyntaxHighlighter Value="Delphi"/> 240 245 </Unit19> … … 282 287 <TopLine Value="141"/> 283 288 <CursorPos X="93" Y="154"/> 284 <UsageCount Value="7 6"/>289 <UsageCount Value="75"/> 285 290 </Unit23> 286 291 <Unit24> … … 320 325 <TopLine Value="268"/> 321 326 <CursorPos X="39" Y="283"/> 322 <UsageCount Value="10 9"/>327 <UsageCount Value="108"/> 323 328 </Unit27> 324 329 <Unit28> … … 328 333 <TopLine Value="143"/> 329 334 <CursorPos X="68" Y="156"/> 330 <UsageCount Value="7 3"/>335 <UsageCount Value="72"/> 331 336 </Unit28> 332 337 <Unit29> … … 336 341 <TopLine Value="309"/> 337 342 <CursorPos X="64" Y="322"/> 338 <UsageCount Value="10 6"/>343 <UsageCount Value="105"/> 339 344 </Unit29> 340 345 <Unit30> … … 344 349 <TopLine Value="266"/> 345 350 <CursorPos X="32" Y="279"/> 346 <UsageCount Value="10 6"/>351 <UsageCount Value="105"/> 347 352 </Unit30> 348 353 <Unit31> … … 352 357 <TopLine Value="15"/> 353 358 <CursorPos X="1" Y="28"/> 354 <UsageCount Value="2 3"/>359 <UsageCount Value="22"/> 355 360 </Unit31> 356 361 <Unit32> … … 369 374 <TopLine Value="365"/> 370 375 <CursorPos X="5" Y="370"/> 371 <UsageCount Value=" 3"/>376 <UsageCount Value="2"/> 372 377 </Unit33> 373 378 <Unit34> … … 377 382 <TopLine Value="26"/> 378 383 <CursorPos X="14" Y="39"/> 379 <UsageCount Value="10 3"/>384 <UsageCount Value="102"/> 380 385 </Unit34> 381 386 <Unit35> … … 394 399 <TopLine Value="1"/> 395 400 <CursorPos X="36" Y="55"/> 396 <UsageCount Value="1 6"/>401 <UsageCount Value="15"/> 397 402 <DefaultSyntaxHighlighter Value="Delphi"/> 398 403 </Unit36> … … 402 407 <TopLine Value="1"/> 403 408 <CursorPos X="3" Y="21"/> 404 <UsageCount Value="1 6"/>409 <UsageCount Value="15"/> 405 410 <DefaultSyntaxHighlighter Value="Delphi"/> 406 411 </Unit37> … … 410 415 <TopLine Value="1377"/> 411 416 <CursorPos X="32" Y="1396"/> 412 <UsageCount Value="1 6"/>417 <UsageCount Value="15"/> 413 418 <DefaultSyntaxHighlighter Value="Delphi"/> 414 419 </Unit38> … … 418 423 <TopLine Value="27"/> 419 424 <CursorPos X="84" Y="48"/> 420 <UsageCount Value=" 10"/>425 <UsageCount Value="9"/> 421 426 </Unit39> 422 427 <Unit40> … … 425 430 <TopLine Value="100"/> 426 431 <CursorPos X="43" Y="102"/> 427 <UsageCount Value=" 10"/>432 <UsageCount Value="9"/> 428 433 </Unit40> 429 434 <Unit41> … … 433 438 <TopLine Value="1"/> 434 439 <CursorPos X="44" Y="6"/> 435 <UsageCount Value="1 4"/>440 <UsageCount Value="13"/> 436 441 </Unit41> 437 442 <Unit42> … … 441 446 <TopLine Value="22"/> 442 447 <CursorPos X="2" Y="35"/> 443 <UsageCount Value="1 4"/>448 <UsageCount Value="13"/> 444 449 </Unit42> 445 450 <Unit43> 446 451 <Filename Value="E:\Projekty\PascalClassLibrary\Generics\TemplateGenerics\Generic\GenericList.inc"/> 447 <WindowIndex Value="0"/> 448 <TopLine Value="71"/> 449 <CursorPos X="1" Y="84"/> 450 <UsageCount Value="77"/> 452 <EditorIndex Value="11"/> 453 <WindowIndex Value="0"/> 454 <TopLine Value="12"/> 455 <CursorPos X="14" Y="25"/> 456 <UsageCount Value="78"/> 457 <Loaded Value="True"/> 451 458 </Unit43> 452 459 <Unit44> … … 455 462 <TopLine Value="107"/> 456 463 <CursorPos X="10" Y="120"/> 457 <UsageCount Value="7 4"/>464 <UsageCount Value="73"/> 458 465 </Unit44> 459 466 <Unit45> … … 463 470 <TopLine Value="1"/> 464 471 <CursorPos X="1" Y="12"/> 465 <UsageCount Value="7 3"/>472 <UsageCount Value="72"/> 466 473 </Unit45> 467 474 <Unit46> 468 475 <Filename Value="..\Compiler\UCompiler.pas"/> 469 476 <UnitName Value="UCompiler"/> 470 <EditorIndex Value=" 2"/>477 <EditorIndex Value="3"/> 471 478 <WindowIndex Value="0"/> 472 479 <TopLine Value="60"/> 473 <CursorPos X=" 1" Y="76"/>474 <UsageCount Value="3 5"/>480 <CursorPos X="45" Y="68"/> 481 <UsageCount Value="37"/> 475 482 <Loaded Value="True"/> 476 483 </Unit46> … … 481 488 <TopLine Value="58"/> 482 489 <CursorPos X="1" Y="79"/> 483 <UsageCount Value="3 2"/>490 <UsageCount Value="31"/> 484 491 </Unit47> 485 492 <Unit48> 486 493 <Filename Value="..\Compiler\Analyze\UAnalyzer.pas"/> 487 494 <UnitName Value="UAnalyzer"/> 488 <EditorIndex Value=" 3"/>495 <EditorIndex Value="4"/> 489 496 <WindowIndex Value="0"/> 490 497 <TopLine Value="66"/> 491 498 <CursorPos X="37" Y="79"/> 492 <UsageCount Value="3 4"/>499 <UsageCount Value="36"/> 493 500 <Loaded Value="True"/> 494 501 </Unit48> … … 496 503 <Filename Value="..\Compiler\Analyze\UAnalyzerPascal.pas"/> 497 504 <UnitName Value="UAnalyzerPascal"/> 498 <EditorIndex Value=" 8"/>499 <WindowIndex Value="0"/> 500 <TopLine Value=" 95"/>501 <CursorPos X=" 1" Y="108"/>502 <UsageCount Value="3 4"/>505 <EditorIndex Value="9"/> 506 <WindowIndex Value="0"/> 507 <TopLine Value="709"/> 508 <CursorPos X="36" Y="719"/> 509 <UsageCount Value="36"/> 503 510 <Loaded Value="True"/> 504 511 </Unit49> … … 506 513 <Filename Value="..\Compiler\Produce\UProducerPascal.pas"/> 507 514 <UnitName Value="UProducerPascal"/> 508 <EditorIndex Value=" 6"/>509 <WindowIndex Value="0"/> 510 <TopLine Value=" 267"/>511 <CursorPos X=" 14" Y="270"/>512 <UsageCount Value="3 4"/>515 <EditorIndex Value="7"/> 516 <WindowIndex Value="0"/> 517 <TopLine Value="148"/> 518 <CursorPos X="52" Y="171"/> 519 <UsageCount Value="36"/> 513 520 <Loaded Value="True"/> 514 521 </Unit50> … … 519 526 <TopLine Value="10"/> 520 527 <CursorPos X="40" Y="23"/> 521 <UsageCount Value="3 1"/>528 <UsageCount Value="30"/> 522 529 </Unit51> 523 530 <Unit52> … … 527 534 <TopLine Value="107"/> 528 535 <CursorPos X="22" Y="110"/> 529 <UsageCount Value=" 6"/>536 <UsageCount Value="5"/> 530 537 </Unit52> 531 538 <Unit53> … … 535 542 <TopLine Value="16"/> 536 543 <CursorPos X="33" Y="26"/> 537 <UsageCount Value="1 3"/>544 <UsageCount Value="12"/> 538 545 </Unit53> 539 546 <Unit54> 540 547 <Filename Value="..\Compiler\USourceCode.pas"/> 541 548 <UnitName Value="USourceCode"/> 542 <EditorIndex Value=" 7"/>543 <WindowIndex Value="0"/> 544 <TopLine Value=" 707"/>545 <CursorPos X=" 3" Y="711"/>546 <UsageCount Value="3 4"/>549 <EditorIndex Value="8"/> 550 <WindowIndex Value="0"/> 551 <TopLine Value="588"/> 552 <CursorPos X="9" Y="590"/> 553 <UsageCount Value="36"/> 547 554 <Loaded Value="True"/> 548 555 </Unit54> … … 553 560 <TopLine Value="1"/> 554 561 <CursorPos X="55" Y="19"/> 555 <UsageCount Value=" 6"/>562 <UsageCount Value="5"/> 556 563 </Unit55> 557 564 <Unit56> … … 561 568 <TopLine Value="1"/> 562 569 <CursorPos X="26" Y="5"/> 563 <UsageCount Value=" 6"/>570 <UsageCount Value="5"/> 564 571 </Unit56> 565 572 <Unit57> … … 569 576 <TopLine Value="1"/> 570 577 <CursorPos X="37" Y="12"/> 571 <UsageCount Value="3 2"/>578 <UsageCount Value="31"/> 572 579 </Unit57> 573 580 <Unit58> … … 577 584 <TopLine Value="12"/> 578 585 <CursorPos X="38" Y="26"/> 579 <UsageCount Value="3 2"/>586 <UsageCount Value="31"/> 580 587 </Unit58> 581 588 <Unit59> … … 585 592 <TopLine Value="438"/> 586 593 <CursorPos X="3" Y="406"/> 587 <UsageCount Value=" 6"/>594 <UsageCount Value="5"/> 588 595 </Unit59> 589 596 <Unit60> … … 592 599 <TopLine Value="628"/> 593 600 <CursorPos X="1" Y="649"/> 594 <UsageCount Value="3 2"/>601 <UsageCount Value="31"/> 595 602 </Unit60> 596 603 <Unit61> … … 599 606 <TopLine Value="1"/> 600 607 <CursorPos X="24" Y="4"/> 601 <UsageCount Value="1 3"/>608 <UsageCount Value="12"/> 602 609 </Unit61> 603 610 <Unit62> … … 607 614 <TopLine Value="1"/> 608 615 <CursorPos X="1" Y="1"/> 609 <UsageCount Value="1 2"/>616 <UsageCount Value="11"/> 610 617 </Unit62> 611 618 <Unit63> 612 619 <Filename Value="E:\Programy\Lazarus\fpc\2.4.3\source\rtl\objpas\classes\classesh.inc"/> 613 <EditorIndex Value=" 4"/>620 <EditorIndex Value="5"/> 614 621 <WindowIndex Value="0"/> 615 622 <TopLine Value="625"/> 616 623 <CursorPos X="36" Y="638"/> 617 <UsageCount Value="1 1"/>624 <UsageCount Value="13"/> 618 625 <Loaded Value="True"/> 619 626 </Unit63> 620 627 <Unit64> 621 628 <Filename Value="E:\Programy\Lazarus\fpc\2.4.3\source\rtl\objpas\classes\stringl.inc"/> 622 <EditorIndex Value=" 5"/>629 <EditorIndex Value="6"/> 623 630 <WindowIndex Value="0"/> 624 631 <TopLine Value="428"/> 625 632 <CursorPos X="3" Y="441"/> 626 <UsageCount Value="1 1"/>633 <UsageCount Value="13"/> 627 634 <Loaded Value="True"/> 628 635 </Unit64> 629 636 </Units> 630 <JumpHistory Count=" 29" HistoryIndex="28">637 <JumpHistory Count="30" HistoryIndex="29"> 631 638 <Position1> 632 <Filename Value="..\Compiler\ Analyze\UAnalyzerPascal.pas"/>633 <Caret Line=" 537" Column="1" TopLine="519"/>639 <Filename Value="..\Compiler\USourceCode.pas"/> 640 <Caret Line="740" Column="1" TopLine="727"/> 634 641 </Position1> 635 642 <Position2> 636 643 <Filename Value="..\Compiler\Analyze\UAnalyzerPascal.pas"/> 637 <Caret Line=" 546" Column="1" TopLine="536"/>644 <Caret Line="385" Column="1" TopLine="372"/> 638 645 </Position2> 639 646 <Position3> 640 647 <Filename Value="..\Compiler\Analyze\UAnalyzerPascal.pas"/> 641 <Caret Line=" 550" Column="47" TopLine="540"/>648 <Caret Line="617" Column="1" TopLine="604"/> 642 649 </Position3> 643 650 <Position4> 644 651 <Filename Value="..\Compiler\Analyze\UAnalyzerPascal.pas"/> 645 <Caret Line=" 442" Column="27" TopLine="434"/>652 <Caret Line="385" Column="1" TopLine="372"/> 646 653 </Position4> 647 654 <Position5> 648 655 <Filename Value="..\Compiler\Analyze\UAnalyzerPascal.pas"/> 649 <Caret Line=" 488" Column="21" TopLine="481"/>656 <Caret Line="617" Column="1" TopLine="604"/> 650 657 </Position5> 651 658 <Position6> 652 659 <Filename Value="..\Compiler\Analyze\UAnalyzerPascal.pas"/> 653 <Caret Line=" 562" Column="4" TopLine="548"/>660 <Caret Line="385" Column="1" TopLine="372"/> 654 661 </Position6> 655 662 <Position7> 656 <Filename Value="..\Compiler\Analyze\UAnalyzer .pas"/>657 <Caret Line=" 260" Column="26" TopLine="243"/>663 <Filename Value="..\Compiler\Analyze\UAnalyzerPascal.pas"/> 664 <Caret Line="843" Column="51" TopLine="836"/> 658 665 </Position7> 659 666 <Position8> 660 <Filename Value="..\Compiler\Analyze\UAnalyzer .pas"/>661 <Caret Line=" 257" Column="19" TopLine="243"/>667 <Filename Value="..\Compiler\Analyze\UAnalyzerPascal.pas"/> 668 <Caret Line="385" Column="1" TopLine="363"/> 662 669 </Position8> 663 670 <Position9> 664 <Filename Value="..\Compiler\Analyze\UAnalyzer .pas"/>665 <Caret Line=" 53" Column="27" TopLine="40"/>671 <Filename Value="..\Compiler\Analyze\UAnalyzerPascal.pas"/> 672 <Caret Line="617" Column="30" TopLine="604"/> 666 673 </Position9> 667 674 <Position10> 668 <Filename Value="..\Compiler\Analyze\UAnalyzer .pas"/>669 <Caret Line=" 227" Column="51" TopLine="214"/>675 <Filename Value="..\Compiler\Analyze\UAnalyzerPascal.pas"/> 676 <Caret Line="532" Column="28" TopLine="516"/> 670 677 </Position10> 671 678 <Position11> 672 <Filename Value="..\Compiler\Analyze\UAnalyzer .pas"/>673 <Caret Line=" 257" Column="3" TopLine="244"/>679 <Filename Value="..\Compiler\Analyze\UAnalyzerPascal.pas"/> 680 <Caret Line="722" Column="48" TopLine="703"/> 674 681 </Position11> 675 682 <Position12> 676 <Filename Value="..\Compiler\Analyze\UAnalyzer .pas"/>677 <Caret Line=" 259" Column="48" TopLine="246"/>683 <Filename Value="..\Compiler\Analyze\UAnalyzerPascal.pas"/> 684 <Caret Line="725" Column="61" TopLine="703"/> 678 685 </Position12> 679 686 <Position13> 680 <Filename Value="..\Compiler\Analyze\UAnalyzer .pas"/>681 <Caret Line=" 254" Column="3" TopLine="243"/>687 <Filename Value="..\Compiler\Analyze\UAnalyzerPascal.pas"/> 688 <Caret Line="385" Column="1" TopLine="372"/> 682 689 </Position13> 683 690 <Position14> 684 <Filename Value="..\Compiler\Analyze\UAnalyzer .pas"/>685 <Caret Line=" 53" Column="5" TopLine="30"/>691 <Filename Value="..\Compiler\Analyze\UAnalyzerPascal.pas"/> 692 <Caret Line="617" Column="1" TopLine="604"/> 686 693 </Position14> 687 694 <Position15> 688 <Filename Value="..\Compiler\Analyze\UAnalyzer .pas"/>689 <Caret Line=" 229" Column="47" TopLine="214"/>695 <Filename Value="..\Compiler\Analyze\UAnalyzerPascal.pas"/> 696 <Caret Line="722" Column="1" TopLine="709"/> 690 697 </Position15> 691 698 <Position16> 692 <Filename Value="..\Compiler\Analyze\UAnalyzer .pas"/>693 <Caret Line=" 259" Column="48" TopLine="246"/>699 <Filename Value="..\Compiler\Analyze\UAnalyzerPascal.pas"/> 700 <Caret Line="725" Column="1" TopLine="709"/> 694 701 </Position16> 695 702 <Position17> 696 703 <Filename Value="..\Compiler\Analyze\UAnalyzerPascal.pas"/> 697 <Caret Line=" 562" Column="4" TopLine="548"/>704 <Caret Line="722" Column="1" TopLine="709"/> 698 705 </Position17> 699 706 <Position18> 700 707 <Filename Value="..\Compiler\Analyze\UAnalyzerPascal.pas"/> 701 <Caret Line=" 99" Column="17" TopLine="91"/>708 <Caret Line="515" Column="1" TopLine="502"/> 702 709 </Position18> 703 710 <Position19> 704 <Filename Value="..\Compiler\Analyze\UAnalyzer .pas"/>705 <Caret Line=" 79" Column="30" TopLine="66"/>711 <Filename Value="..\Compiler\Analyze\UAnalyzerPascal.pas"/> 712 <Caret Line="516" Column="1" TopLine="502"/> 706 713 </Position19> 707 714 <Position20> 708 715 <Filename Value="..\Compiler\Analyze\UAnalyzerPascal.pas"/> 709 <Caret Line=" 99" Column="45" TopLine="86"/>716 <Caret Line="517" Column="1" TopLine="502"/> 710 717 </Position20> 711 718 <Position21> 712 719 <Filename Value="..\Compiler\Analyze\UAnalyzerPascal.pas"/> 713 <Caret Line=" 108" Column="1" TopLine="86"/>720 <Caret Line="518" Column="1" TopLine="535"/> 714 721 </Position21> 715 722 <Position22> 716 <Filename Value="..\Compiler\ UCompiler.pas"/>717 <Caret Line=" 79" Column="19" TopLine="63"/>723 <Filename Value="..\Compiler\Analyze\UAnalyzerPascal.pas"/> 724 <Caret Line="849" Column="1" TopLine="836"/> 718 725 </Position22> 719 726 <Position23> 720 <Filename Value=" ..\Compiler\UCompiler.pas"/>721 <Caret Line=" 73" Column="1" TopLine="60"/>727 <Filename Value="Forms\UCodeForm.pas"/> 728 <Caret Line="17" Column="26" TopLine="1"/> 722 729 </Position23> 723 730 <Position24> 724 <Filename Value=" ..\Compiler\UCompiler.pas"/>725 <Caret Line=" 74" Column="1" TopLine="60"/>731 <Filename Value="Forms\UCodeForm.pas"/> 732 <Caret Line="40" Column="16" TopLine="16"/> 726 733 </Position24> 727 734 <Position25> 728 <Filename Value=" ..\Compiler\UCompiler.pas"/>729 <Caret Line=" 76" Column="1" TopLine="60"/>735 <Filename Value="Forms\UCodeForm.pas"/> 736 <Caret Line="9" Column="36" TopLine="1"/> 730 737 </Position25> 731 738 <Position26> 732 739 <Filename Value="Forms\UMainForm.pas"/> 733 <Caret Line=" 114" Column="54" TopLine="107"/>740 <Caret Line="74" Column="5" TopLine="61"/> 734 741 </Position26> 735 742 <Position27> 736 743 <Filename Value="Forms\UMainForm.pas"/> 737 <Caret Line=" 125" Column="3" TopLine="114"/>744 <Caret Line="300" Column="12" TopLine="283"/> 738 745 </Position27> 739 746 <Position28> 740 747 <Filename Value="Forms\UMainForm.pas"/> 741 <Caret Line=" 97" Column="41" TopLine="84"/>748 <Caret Line="294" Column="21" TopLine="283"/> 742 749 </Position28> 743 750 <Position29> 744 <Filename Value=" Forms\UMainForm.pas"/>745 <Caret Line=" 75" Column="42" TopLine="62"/>751 <Filename Value="UProject.pas"/> 752 <Caret Line="42" Column="1" TopLine="93"/> 746 753 </Position29> 754 <Position30> 755 <Filename Value="UProject.pas"/> 756 <Caret Line="268" Column="17" TopLine="248"/> 757 </Position30> 747 758 </JumpHistory> 748 759 </ProjectOptions> … … 786 797 </CompilerOptions> 787 798 <Debugging> 788 <BreakPoints Count=" 4">799 <BreakPoints Count="1"> 789 800 <Item1> 790 801 <Source Value="..\Compiler\Analyze\UAnalyzerPascal.pas"/> 791 <Line Value=" 1204"/>802 <Line Value="849"/> 792 803 </Item1> 793 <Item2>794 <Source Value="..\Compiler\Analyze\UAnalyzerPascal.pas"/>795 <Line Value="1229"/>796 </Item2>797 <Item3>798 <Source Value="..\Compiler\Analyze\UAnalyzerPascal.pas"/>799 <Line Value="1039"/>800 </Item3>801 <Item4>802 <Source Value="..\Compiler\UCompiler.pas"/>803 <Line Value="73"/>804 </Item4>805 804 </BreakPoints> 806 805 <Exceptions Count="3"> -
trunk/IDE/UProject.pas
r10 r21 17 17 Name: string; 18 18 ProducedFileName: string; 19 Modified: Boolean; 19 20 procedure SaveToXMLNode(Node: TDOMNode); virtual; 20 21 procedure LoadFromXMLNode(Node: TDOMNode); virtual; … … 120 121 121 122 procedure TProjectGroup.SaveToXMLNode(Node: TDOMNode); 123 var 124 I: Integer; 125 NewNode: TDOMNode; 122 126 begin 123 127 inherited SaveToXMLNode(Node); 128 with Node do begin 129 NewNode := OwnerDocument.CreateElement('File'); 130 TDOMElement(NewNode).SetAttribute('Name', UTF8Decode(Name)); 131 TDOMElement(NewNode).SetAttribute('Type', 'File'); 132 AppendChild(NewNode); 133 end; 134 for I := 0 to Items.Count - 1 do begin 135 TProjectNode(Items[I]).SaveToXMLNode(NewNode); 136 end 124 137 end; 125 138 … … 160 173 begin 161 174 inherited SaveToXMLNode(Node); 175 Save; 162 176 end; 163 177 … … 199 213 procedure TProjectNode.Save; 200 214 begin 201 215 Modified := False; 202 216 end; 203 217 … … 260 274 261 275 procedure TProject.SaveToFile(FileName: string); 262 begin 263 276 var 277 Doc: TXMLDocument; 278 RootNode: TDOMNode; 279 NewNode: TDOMNode; 280 NewSubNode: TDOMNode; 281 I: Integer; 282 Text: string; 283 begin 284 Doc := TXMLDocument.Create; 285 with Doc do try 286 RootNode := CreateElement('Project'); 287 AppendChild(RootNode); 288 with RootNode do begin 289 NewNode := OwnerDocument.CreateElement('Files'); 290 SaveToXMLNode(NewNode); 291 end; 292 WriteXMLFile(Doc, UTF8Decode(FileName)); 293 finally 294 Free; 295 end; 296 inherited Save; 264 297 end; 265 298
Note:
See TracChangeset
for help on using the changeset viewer.