IDE: fixed checking if unit has lrs include directive

git-svn-id: trunk@23517 -
This commit is contained in:
mattias 2010-01-21 14:17:02 +00:00
parent 56be34be3a
commit ceee76be78
2 changed files with 4 additions and 1 deletions

View File

@ -1123,7 +1123,6 @@ begin
if FileExistsUTF8(LRSFilename)
and (FileAgeUTF8(LFMFilename)<=FileAgeUTF8(LRSFilename))
then exit;
debugln('TBuildManager.UpdateLRSFromLFM ',LRSFilename,' LFMAge=',dbgs(FileAgeUTF8(LFMFilename)),' LRSAge=',dbgs(FileAgeUTF8(LRSFilename)));
// the .lrs file does not exist, or is older than the .lfm file
// -> update .lrs file
Dir:=ExtractFilePath(LRSFilename);

View File

@ -170,6 +170,7 @@ begin
if (PointPos<>nil) and (d-PointPos=4) and (PointPos[1]='l') and
(PointPos[2]='r') and (PointPos[3]='s') then
begin
//DebugLn(['ParseResourceType ',copy(Src,p,PointPos-@Src[p]+3)]);
// using include directive with lrs file
HasLRSIncludeDirective := True;
end;
@ -262,6 +263,8 @@ begin
ParseResourceType(Code.Source,
CodeToolBoss.GetNestedCommentsFlagForFile(Code.Filename),
Item.HasLRSIncludeDirective, Item.HasRDirective);
HasLRSIncludeDirective := Item.HasLRSIncludeDirective;
HasRDirective := Item.HasRDirective;
end;
var
@ -274,6 +277,7 @@ begin
if ResourceTypesCache = nil then
ResourceTypesCache := TResourceTypesCache.Create;
ResourceTypesCache.Parse(Code, HasLRSIncludeDirective, HasRDirective);
DebugLn(['GuessResourceType ',Code.Filename,' HasLRS=',HasLRSIncludeDirective,' HasR=',HasRDirective]);
if HasLRSIncludeDirective then
begin
Typ := rtLRS;