Changeset 57
- Timestamp:
- Jul 16, 2012, 4:11:47 PM (12 years ago)
- Location:
- trunk
- Files:
-
- 17 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Compiler/Analyze/UAnalyzerPascal.pas
r51 r57 150 150 ReadToken; 151 151 end; 152 ShowMessage(IntToStr(TExpression(Expressions.Last).SubItems.Count) + ' ' + TExpression(Expressions.Last).OperatorName); 153 if Assigned(TExpression(Expressions.First)) then 154 ShowMessage('First ' + IntToStr(Integer(TExpression(Expressions.Last).SubItems.First))); 155 if Assigned(TExpression(Expressions.Last)) then 156 ShowMessage('Last ' + IntToStr(Integer(TExpression(Expressions.Last).SubItems.Last))); 152 157 end; 153 158 … … 169 174 Assign(TExpression(TExpression(Expressions.First).SubItems.Last)); 170 175 TExpression(Expressions.First).SubItems.Last := nil; 171 //ShowMessage(IntToStr(Expressions.Count));172 176 if Expressions.Count > 1 then 173 177 TExpression(Expressions[1]).SubItems.First := nil; -
trunk/Compiler/Target/Interpretter/UTargetInterpretter.pas
r56 r57 128 128 129 129 function TExecutorInterpretter.Evaluate(Expression: TExpression): TValue; 130 var 131 I: Integer; 130 132 begin 131 133 with Expression do … … 149 151 end; 150 152 ntVariable: Result := Variable.Value; 153 ntValue: Result := Value; 151 154 end; 152 155 end; -
trunk/Compiler/TranspascalCompiler.lpk
r56 r57 56 56 </Item7> 57 57 <Item8> 58 <Filename Value="Target\UTargets.pas"/> 59 <UnitName Value="UTargets"/> 60 </Item8> 61 <Item9> 58 62 <Filename Value="Target\Dynamic C\UProducerDynamicc.pas"/> 59 63 <UnitName Value="UProducerDynamicC"/> 60 </Item 8>61 <Item 9>64 </Item9> 65 <Item10> 62 66 <Filename Value="Target\ASM8051\UProducerASM8051.pas"/> 63 67 <UnitName Value="UProducerAsm8051"/> 64 </Item9> 65 <Item10> 68 </Item10> 69 <Item11> 70 <Filename Value="Target\ASM8051\UTargetASM8051.pas"/> 71 <UnitName Value="UTargetASM8051"/> 72 </Item11> 73 <Item12> 66 74 <Filename Value="Target\GCC\UProducerGCC.pas"/> 67 75 <UnitName Value="UProducerGCC"/> 68 </Item1 0>69 <Item1 1>70 <Filename Value="Target\ UTargets.pas"/>71 <UnitName Value="UTarget s"/>72 </Item1 1>73 <Item1 2>76 </Item12> 77 <Item13> 78 <Filename Value="Target\GCC\UTargetGCC.pas"/> 79 <UnitName Value="UTargetGCC"/> 80 </Item13> 81 <Item14> 74 82 <Filename Value="Target\Delphi\UProducerPascal.pas"/> 75 83 <UnitName Value="UProducerPascal"/> 76 </Item12> 77 <Item13> 84 </Item14> 85 <Item15> 86 <Filename Value="Target\Delphi\UTargetDelphi.pas"/> 87 <UnitName Value="UTargetDelphi"/> 88 </Item15> 89 <Item16> 90 <Filename Value="Target\PHP\UTargetPHP.pas"/> 91 <UnitName Value="UTargetPHP"/> 92 </Item16> 93 <Item17> 94 <Filename Value="Target\Java\UTargetJava.pas"/> 95 <UnitName Value="UTargetJava"/> 96 </Item17> 97 <Item18> 98 <Filename Value="Target\XML\UTargetXML.pas"/> 99 <UnitName Value="UTargetXML"/> 100 </Item18> 101 <Item19> 78 102 <Filename Value="Target\Interpretter\UTargetInterpretter.pas"/> 79 103 <UnitName Value="UTargetInterpretter"/> 80 </Item13>81 <Item14>82 <Filename Value="Target\Delphi\UTargetDelphi.pas"/>83 <UnitName Value="UTargetDelphi"/>84 </Item14>85 <Item15>86 <Filename Value="Target\PHP\UTargetPHP.pas"/>87 <UnitName Value="UTargetPHP"/>88 </Item15>89 <Item16>90 <Filename Value="Target\Java\UTargetJava.pas"/>91 <UnitName Value="UTargetJava"/>92 </Item16>93 <Item17>94 <Filename Value="Target\XML\UTargetXML.pas"/>95 <UnitName Value="UTargetXML"/>96 </Item17>97 <Item18>98 <Filename Value="Target\ASM8051\UTargetASM8051.pas"/>99 <UnitName Value="UTargetASM8051"/>100 </Item18>101 <Item19>102 <Filename Value="Target\GCC\UTargetGCC.pas"/>103 <UnitName Value="UTargetGCC"/>104 104 </Item19> 105 105 </Files> -
trunk/Compiler/TranspascalCompiler.pas
r56 r57 9 9 uses 10 10 UCompiler, USourceCode, UProducer, UAnalyzer, UTarget, UExecutor, 11 UAnalyzerPascal, U ProducerDynamicc, UProducerASM8051, UProducerGCC,12 UTarget s, UProducerPascal, UTargetInterpretter, UTargetDelphi, UTargetPHP,13 UTarget Java, UTargetXML, UTargetASM8051, UTargetGCC, LazarusPackageIntf;11 UAnalyzerPascal, UTargets, UProducerDynamicc, UProducerASM8051, 12 UTargetASM8051, UProducerGCC, UTargetGCC, UProducerPascal, UTargetDelphi, 13 UTargetPHP, UTargetJava, UTargetXML, UTargetInterpretter, LazarusPackageIntf; 14 14 15 15 implementation -
trunk/IDE/Forms/UFormMain.lfm
r54 r57 1 1 object FormMain: TFormMain 2 Left = 2172 Left = 140 3 3 Height = 501 4 Top = 1044 Top = 52 5 5 Width = 695 6 6 Caption = 'Transpascal IDE' -
trunk/IDE/Forms/UFormMessages.lfm
r45 r57 7 7 ClientHeight = 251 8 8 ClientWidth = 415 9 LCLVersion = ' 0.9.31'9 LCLVersion = '1.1' 10 10 object ListView1: TListView 11 11 Left = 0 -
trunk/IDE/Forms/UFormMessages.pas
r53 r57 72 72 ProjectFile := Project.Files.SearchFile(FileName); 73 73 if Assigned(ProjectFile) then 74 SynEditSource.Lines.Assign(ProjectFile.Source); 74 SynEditSource.Lines.Assign(ProjectFile.Source) 75 else if FileExistsUTF8(FileName) then 76 SynEditSource.Lines.LoadFromFile(FileName); 75 77 SynEditSource.CaretXY := Position; 76 78 TForm(SynEditSource.Owner).Show; -
trunk/IDE/Forms/UFormProject.lfm
r56 r57 1 1 object FormProject: TFormProject 2 Left = 50 52 Left = 507 3 3 Height = 253 4 Top = 19 54 Top = 197 5 5 Width = 331 6 6 Caption = 'Project manager' -
trunk/IDE/Forms/UFormProjectNew.lfm
r48 r57 8 8 ClientWidth = 519 9 9 OnShow = FormShow 10 LCLVersion = ' 0.9.31'10 LCLVersion = '1.1' 11 11 object ButtonOk: TButton 12 12 Left = 424 … … 40 40 ViewStyle = vsIcon 41 41 OnChange = ListView1Change 42 OnDblClick = ListView1DblClick 42 43 OnSelectItem = ListView1SelectItem 43 44 end -
trunk/IDE/Forms/UFormProjectNew.pas
r53 r57 20 20 procedure ListView1Change(Sender: TObject; Item: TListItem; 21 21 Change: TItemChange); 22 procedure ListView1DblClick(Sender: TObject); 22 23 procedure ListView1SelectItem(Sender: TObject; Item: TListItem; 23 24 Selected: Boolean); … … 52 53 end; 53 54 55 procedure TFormProjectNew.ListView1DblClick(Sender: TObject); 56 begin 57 ButtonOk.Click; 58 end; 59 54 60 procedure TFormProjectNew.ListView1SelectItem(Sender: TObject; Item: TListItem; 55 61 Selected: Boolean); -
trunk/IDE/Forms/UFormSourceCode.lfm
r53 r57 1 1 object FormSourceCode: TFormSourceCode 2 Left = 35 22 Left = 353 3 3 Height = 426 4 Top = 9 54 Top = 97 5 5 Width = 535 6 6 Caption = 'Source code' -
trunk/IDE/Forms/UFormSourceCode.pas
r54 r57 40 40 procedure TFormSourceCode.SynEditSourceChange(Sender: TObject); 41 41 begin 42 if Assigned(Core.Project) then42 if Assigned(Core.Project) and Assigned(ProjectFile) then 43 43 ProjectFile.Modified := True; 44 44 end; -
trunk/IDE/Forms/UFormTargetProject.lfm
r53 r57 1 1 object FormTargetProject: TFormTargetProject 2 Left = 25 62 Left = 258 3 3 Height = 240 4 Top = 8 14 Top = 83 5 5 Width = 320 6 6 Caption = 'FormTargetProject' -
trunk/IDE/Transpascal.lpi
r55 r57 150 150 <IsPartOfProject Value="True"/> 151 151 <ComponentName Value="FormMessages"/> 152 <HasResources Value="True"/> 152 153 <ResourceBaseClass Value="Form"/> 153 154 <UnitName Value="UFormMessages"/> … … 202 203 <IsPartOfProject Value="True"/> 203 204 <ComponentName Value="FormProjectNew"/> 205 <HasResources Value="True"/> 204 206 <ResourceBaseClass Value="Form"/> 205 207 <UnitName Value="UFormProjectNew"/> -
trunk/IDE/UCore.lfm
r55 r57 4 4 OldCreateOrder = False 5 5 Height = 290 6 HorizontalOffset = 30 87 VerticalOffset = 7 56 HorizontalOffset = 309 7 VerticalOffset = 77 8 8 Width = 347 9 9 object LastOpenedFiles: TLastOpenedList -
trunk/IDE/UCore.pas
r55 r57 28 28 procedure LastOpenedFilesChange(Sender: TObject); 29 29 private 30 procedure ProjectChange(Sender: TObject); 30 31 public 31 32 ReopenLastOpenedFile: Boolean; … … 68 69 Project := TProject.Create; 69 70 Project.FileName := SNewProject; 71 Project.OnChange := ProjectChange; 70 72 end; 71 73 … … 109 111 LastOpenedFiles.LoadToMenuItem(FormMain.PopupMenu1.Items, 110 112 FormMain.OpenRecentClick); 113 end; 114 115 procedure TCore.ProjectChange(Sender: TObject); 116 begin 117 FormMain.UpdateInterface; 111 118 end; 112 119 -
trunk/IDE/UProject.pas
r54 r57 73 73 TProject = class 74 74 private 75 FActive: Boolean;76 75 FModified: Boolean; 77 76 FOnChange: TNotifyEvent; … … 239 238 var 240 239 I: Integer; 241 begin 240 ParentDir: string; 241 begin 242 ParentDir := ExtractFileDir(Parent.FileName); 243 if Copy(FileName, 1, Length(ParentDir)) = ParentDir then 244 System.Delete(FileName, 1, Length(ParentDir) + 1); 242 245 I := 0; 243 246 while (I < Count) and (TProjectFile(Items[I]).FileName <> FileName) do Inc(I); … … 309 312 procedure TProjectFile.Save; 310 313 begin 311 if Modified then 312 Source.SaveToFile(FileName); 314 Source.SaveToFile(AbsoluteFileName); 313 315 end; 314 316 … … 319 321 if FModified = AValue then Exit; 320 322 FModified := AValue; 323 if Assigned(FOnChange) then FOnChange(Self); 321 324 end; 322 325 … … 364 367 begin 365 368 Doc := TXMLDocument.Create; 369 Self.FileName := FileName; 366 370 with Doc do try 367 371 RootNode := CreateElement('Project'); … … 395 399 396 400 procedure TProject.Save; 401 var 402 I: Integer; 397 403 begin 398 404 Files.Save; 399 405 Packages.Save; 406 for I := 0 to Files.Count - 1 do 407 TProjectFile(Files[I]).Modified := False; 408 Modified := False; 400 409 end; 401 410
Note:
See TracChangeset
for help on using the changeset viewer.