Changeset 62


Ignore:
Timestamp:
Jul 17, 2012, 10:14:41 AM (12 years ago)
Author:
chronos
Message:
  • Modified: Show tab sheets of source code forms on file click in project manager.
  • Fixed: Compilation error message line calculation on Windows.
Location:
trunk
Files:
1 deleted
8 edited

Legend:

Unmodified
Added
Removed
  • trunk/Compiler/Analyze/UAnalyzerPascal.pas

    r58 r62  
    568568      if NextToken = 'initialization' then Break
    569569      else if NextToken = 'finalization' then Break
     570      else if NextToken = 'end' then Break
    570571      else begin
    571572        ErrorMessage(SInvalidConstruction, [NextToken]);
     
    14441445      Module := SourceCode.ParentModule.ParentProgram.Modules.Search(Name);
    14451446      if not Assigned(Module) then begin
    1446         if ParseFile(Name) then begin
     1447        if ParseFile(Name + '.pas') then begin
    14471448          Module := SourceCode.ParentModule.ParentProgram.Modules.Search(Name);
    14481449          Exported := AExported;
  • trunk/Compiler/UAnalyzer.pas

    r44 r62  
    374374        // Update cursor position
    375375        Inc(CodePosition.X);
    376         if (CurrentChar = LineEnding) then begin
     376        if (CurrentChar = LineEnding[1]) then begin
    377377          CodePosition.X := 0;
    378378          Inc(CodePosition.Y);
  • trunk/Compiler/UCompiler.pas

    r59 r62  
    111111begin
    112112  I := 0;
    113   while (I < Files.Count) and (ExtractFileNameOnly(Files[I]) <> Name) do Inc(I);
     113  while (I < Files.Count) and (ExtractFileName(Files[I]) <> Name) do Inc(I);
    114114  if I < Files.Count then begin
    115115    if FileExistsUTF8(Files[I]) then begin
     
    127127begin
    128128  I := 0;
    129   while (I < Files.Count) and (ExtractFileNameOnly(Files[I]) <> Name) do Inc(I);
     129  while (I < Files.Count) and (ExtractFileName(Files[I]) <> Name) do Inc(I);
    130130  if I >= Files.Count then begin
    131131    SaveStringToFile(Name, Content);
     
    212212  if MainSource <> '' then begin
    213213    Analyzer.FileName := MainSource;
    214     Analyzer.OnGetSource(ExtractFileNameOnly(Analyzer.FileName), Analyzer.SourceCode);
     214    Analyzer.OnGetSource(ExtractFileName(Analyzer.FileName), Analyzer.SourceCode);
    215215    Analyzer.Process;
    216216    //ShowMessage(IntToHex(Integer(Addr(Analyzer.OnGetSource)), 8));
  • trunk/IDE/Forms/UFormMain.pas

    r61 r62  
    183183    with TProjectFile(Project.Files[0]) do begin
    184184      Compiler.SourceFiles.Files.Clear;
     185      Compiler.TargetFiles.Files.Clear;
    185186      Project.Files.DumpFileList(Compiler.SourceFiles.Files);
    186187      Compiler.MainSource := Project.MainSource.AbsoluteFileName;
     
    497498  Core.ProjectTemplatesInit;
    498499
    499   if Core.ReopenLastOpenedFile and (Core.LastOpenedFiles.Items.Count > 0) then begin
     500  if Core.ReopenLastOpenedFile and (Core.LastOpenedFiles.Items.Count > 0) then
     501  if FileExistsUTF8(Core.LastOpenedFiles.Items[0]) then
    500502    Core.ProjectOpen(Core.LastOpenedFiles.Items[0]);
    501   end;
    502503
    503504  WindowState := wsMaximized;
     
    513514procedure TFormMain.AProjectCloseExecute(Sender: TObject);
    514515begin
    515   //if Project.Modified then ;
     516  //if Project.Modified then ;  A
     517  FormSourceCode.ProjectFile := nil;
    516518  FreeAndNil(Core.Project);
     519  FormProject.UpdateProjectTree;
    517520  UpdateInterface;
    518521end;
  • trunk/IDE/Forms/UFormProject.pas

    r61 r62  
    125125procedure TFormProject.AShowExecute(Sender: TObject);
    126126begin
    127   if Assigned(TreeViewProject.Selected) then
    128   FormSourceCode.SynEditSource.Lines.Assign(TProjectFile(TreeViewProject.Selected.Data).Source);
     127  if Assigned(TreeViewProject.Selected) then begin
     128    FormMain.TabSheetSource.Show;
     129    FormSourceCode.ProjectFile := TProjectFile(TreeViewProject.Selected.Data);
     130  end;
    129131end;
    130132
  • trunk/IDE/Forms/UFormSourceCode.pas

    r57 r62  
    4040procedure TFormSourceCode.SynEditSourceChange(Sender: TObject);
    4141begin
     42  Save;
    4243  if Assigned(Core.Project) and Assigned(ProjectFile) then
    4344    ProjectFile.Modified := True;
  • trunk/IDE/Forms/UFormTargetProject.pas

    r54 r62  
    6666    if TProjectFile(Node.Data) is TProjectFile then begin
    6767      ProjectFile := TProjectFile(Node.Data);
     68      FormMain.TabSheetTarget.Show;
    6869      SynEdit1.Lines.Assign(TProjectFile(Node.Data).Source);
    6970    end;
  • trunk/IDE/UCore.lfm

    r57 r62  
    3737    EmailContact = 'robie@centrum.cz'
    3838    AppName = 'Transpascal IDE'
    39     ReleaseDate = 41103
     39    ReleaseDate = 41107
    4040    RegistryKey = '\Software\Chronosoft\Transpascal'
    4141    RegistryRoot = rrKeyCurrentUser
Note: See TracChangeset for help on using the changeset viewer.