mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-15 06:09:30 +02:00
IDE+codetools: replaced some FindFile calls with LoadFile
git-svn-id: trunk@16775 -
This commit is contained in:
parent
0e57f86bb5
commit
2011685e93
@ -399,6 +399,7 @@ begin
|
||||
NewBuffer.LastIncludedByFile:=FindIncludeLink(AFilename);
|
||||
end else begin
|
||||
NewBuffer.Source:=OldBuffer.Source;
|
||||
NewBuffer.IsDeleted:=false;
|
||||
Result:=NewBuffer.Save;
|
||||
end;
|
||||
if not Result then exit;
|
||||
|
@ -1060,7 +1060,7 @@ begin
|
||||
case CurrentPage of
|
||||
cepCode:
|
||||
begin
|
||||
CodeBuffer:=CodeToolBoss.FindFile(CodeFilename);
|
||||
CodeBuffer:=CodeToolBoss.LoadFile(CodeFilename,false,false);
|
||||
if CodeBuffer=nil then exit;
|
||||
ACodeTool:=nil;
|
||||
CodeToolBoss.Explore(CodeBuffer,ACodeTool,false);
|
||||
@ -1070,7 +1070,7 @@ begin
|
||||
end;
|
||||
cepDirectives:
|
||||
begin
|
||||
CodeBuffer:=CodeToolBoss.FindFile(DirectivesFilename);
|
||||
CodeBuffer:=CodeToolBoss.LoadFile(DirectivesFilename,false,false);
|
||||
if CodeBuffer=nil then exit;
|
||||
CodeBuffer.AbsoluteToLineCol(CurNode.StartPos,Caret.Y,Caret.X);
|
||||
if Caret.Y<1 then exit;
|
||||
|
@ -143,7 +143,7 @@ begin
|
||||
for i := 0 to Project1.JumpHistory.Count -1 do begin
|
||||
jh_item := Project1.JumpHistory.Items[i];
|
||||
SrcLine:='';
|
||||
CodeBuf:=CodeToolBoss.FindFile(jh_item.Filename);
|
||||
CodeBuf:=CodeToolBoss.LoadFile(jh_item.Filename,false,False);
|
||||
if CodeBuf<>nil then
|
||||
SrcLine:=CodeBuf.GetLine(jh_item.CaretXY.Y-1);
|
||||
Filename:=jh_item.Filename;
|
||||
|
@ -312,7 +312,7 @@ procedure TQuickFixLinkerUndefinedReference.Execute(const Msg: TIDEMessageLine;
|
||||
Error('no main file in project');
|
||||
exit;
|
||||
end;
|
||||
CodeBuf:=CodeToolBoss.FindFile(CurProject.MainFile.Filename);
|
||||
CodeBuf:=CodeToolBoss.LoadFile(CurProject.MainFile.Filename,true,false);
|
||||
if (CodeBuf=nil) then begin
|
||||
Error('project main file has no source');
|
||||
exit;
|
||||
|
@ -310,7 +310,7 @@ begin
|
||||
|
||||
lStartPos := StrToInt(lItem.SubItems[3]);
|
||||
|
||||
CodeBuffer := CodeToolBoss.FindFile(MainFilename);
|
||||
CodeBuffer := CodeToolBoss.LoadFile(MainFilename,false,false);
|
||||
if CodeBuffer = nil then
|
||||
Exit; //==>
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user