IDE+codetools: replaced some FindFile calls with LoadFile

git-svn-id: trunk@16775 -
This commit is contained in:
mattias 2008-09-28 13:15:51 +00:00
parent 0e57f86bb5
commit 2011685e93
5 changed files with 6 additions and 5 deletions

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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; //==>