mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-08 10:36:00 +02:00
IDE: fixed checking if unit has lrs include directive
git-svn-id: trunk@23517 -
This commit is contained in:
parent
56be34be3a
commit
ceee76be78
@ -1123,7 +1123,6 @@ begin
|
|||||||
if FileExistsUTF8(LRSFilename)
|
if FileExistsUTF8(LRSFilename)
|
||||||
and (FileAgeUTF8(LFMFilename)<=FileAgeUTF8(LRSFilename))
|
and (FileAgeUTF8(LFMFilename)<=FileAgeUTF8(LRSFilename))
|
||||||
then exit;
|
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
|
// the .lrs file does not exist, or is older than the .lfm file
|
||||||
// -> update .lrs file
|
// -> update .lrs file
|
||||||
Dir:=ExtractFilePath(LRSFilename);
|
Dir:=ExtractFilePath(LRSFilename);
|
||||||
|
@ -170,6 +170,7 @@ begin
|
|||||||
if (PointPos<>nil) and (d-PointPos=4) and (PointPos[1]='l') and
|
if (PointPos<>nil) and (d-PointPos=4) and (PointPos[1]='l') and
|
||||||
(PointPos[2]='r') and (PointPos[3]='s') then
|
(PointPos[2]='r') and (PointPos[3]='s') then
|
||||||
begin
|
begin
|
||||||
|
//DebugLn(['ParseResourceType ',copy(Src,p,PointPos-@Src[p]+3)]);
|
||||||
// using include directive with lrs file
|
// using include directive with lrs file
|
||||||
HasLRSIncludeDirective := True;
|
HasLRSIncludeDirective := True;
|
||||||
end;
|
end;
|
||||||
@ -262,6 +263,8 @@ begin
|
|||||||
ParseResourceType(Code.Source,
|
ParseResourceType(Code.Source,
|
||||||
CodeToolBoss.GetNestedCommentsFlagForFile(Code.Filename),
|
CodeToolBoss.GetNestedCommentsFlagForFile(Code.Filename),
|
||||||
Item.HasLRSIncludeDirective, Item.HasRDirective);
|
Item.HasLRSIncludeDirective, Item.HasRDirective);
|
||||||
|
HasLRSIncludeDirective := Item.HasLRSIncludeDirective;
|
||||||
|
HasRDirective := Item.HasRDirective;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
var
|
var
|
||||||
@ -274,6 +277,7 @@ begin
|
|||||||
if ResourceTypesCache = nil then
|
if ResourceTypesCache = nil then
|
||||||
ResourceTypesCache := TResourceTypesCache.Create;
|
ResourceTypesCache := TResourceTypesCache.Create;
|
||||||
ResourceTypesCache.Parse(Code, HasLRSIncludeDirective, HasRDirective);
|
ResourceTypesCache.Parse(Code, HasLRSIncludeDirective, HasRDirective);
|
||||||
|
DebugLn(['GuessResourceType ',Code.Filename,' HasLRS=',HasLRSIncludeDirective,' HasR=',HasRDirective]);
|
||||||
if HasLRSIncludeDirective then
|
if HasLRSIncludeDirective then
|
||||||
begin
|
begin
|
||||||
Typ := rtLRS;
|
Typ := rtLRS;
|
||||||
|
Loading…
Reference in New Issue
Block a user