mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-12-20 23:20:31 +01:00
IDE: fixed typo in identifier name
git-svn-id: trunk@21117 -
This commit is contained in:
parent
8b7dbf4939
commit
f65b51e00b
@ -51,7 +51,7 @@ type
|
|||||||
FModified: Boolean;
|
FModified: Boolean;
|
||||||
FOnModified: TNotifyEvent;
|
FOnModified: TNotifyEvent;
|
||||||
FInModified: Boolean;
|
FInModified: Boolean;
|
||||||
FCanHasLrsInclude: Boolean;
|
FCanHaveLrsInclude: Boolean;
|
||||||
|
|
||||||
FSystemResources: TStringList;
|
FSystemResources: TStringList;
|
||||||
FLazarusResources: TStringList;
|
FLazarusResources: TStringList;
|
||||||
@ -70,7 +70,7 @@ type
|
|||||||
procedure EmbeddedObjectModified(Sender: TObject);
|
procedure EmbeddedObjectModified(Sender: TObject);
|
||||||
function Update: Boolean;
|
function Update: Boolean;
|
||||||
function UpdateMainSourceFile(const AFileName: string): Boolean;
|
function UpdateMainSourceFile(const AFileName: string): Boolean;
|
||||||
procedure UpdateCanHasLrsInclude(const AFileName: string);
|
procedure UpdateCanHaveLrsInclude(const AFileName: string);
|
||||||
function Save: Boolean;
|
function Save: Boolean;
|
||||||
procedure UpdateCodeBuffers;
|
procedure UpdateCodeBuffers;
|
||||||
procedure DeleteLastCodeBuffers;
|
procedure DeleteLastCodeBuffers;
|
||||||
@ -163,7 +163,7 @@ begin
|
|||||||
inherited Create;
|
inherited Create;
|
||||||
|
|
||||||
FInModified := False;
|
FInModified := False;
|
||||||
FCanHasLrsInclude := False;
|
FCanHaveLrsInclude := False;
|
||||||
|
|
||||||
FSystemResources := TStringList.Create;
|
FSystemResources := TStringList.Create;
|
||||||
FLazarusResources := TStringList.Create;
|
FLazarusResources := TStringList.Create;
|
||||||
@ -242,7 +242,7 @@ begin
|
|||||||
SetFileNames(MainFileName);
|
SetFileNames(MainFileName);
|
||||||
|
|
||||||
if UpdateSource then
|
if UpdateSource then
|
||||||
UpdateCanHasLrsInclude(MainFileName);
|
UpdateCanHaveLrsInclude(MainFileName);
|
||||||
|
|
||||||
try
|
try
|
||||||
// update resources (FLazarusResources, FSystemResources, ...)
|
// update resources (FLazarusResources, FSystemResources, ...)
|
||||||
@ -349,7 +349,7 @@ begin
|
|||||||
// update LResources uses
|
// update LResources uses
|
||||||
if CodeToolBoss.FindUnitInAllUsesSections(CodeBuf, LazResourcesUnit, NamePos, InPos) then
|
if CodeToolBoss.FindUnitInAllUsesSections(CodeBuf, LazResourcesUnit, NamePos, InPos) then
|
||||||
begin
|
begin
|
||||||
if not (FCanHasLrsInclude and HasLazarusResources) then
|
if not (FCanHaveLrsInclude and HasLazarusResources) then
|
||||||
begin
|
begin
|
||||||
if not CodeToolBoss.RemoveUnitFromAllUsesSections(CodeBuf, LazResourcesUnit) then
|
if not CodeToolBoss.RemoveUnitFromAllUsesSections(CodeBuf, LazResourcesUnit) then
|
||||||
begin
|
begin
|
||||||
@ -361,7 +361,7 @@ begin
|
|||||||
end;
|
end;
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
if FCanHasLrsInclude and HasLazarusResources then
|
if FCanHaveLrsInclude and HasLazarusResources then
|
||||||
begin
|
begin
|
||||||
if not CodeToolBoss.AddUnitToMainUsesSection(CodeBuf, LazResourcesUnit,'') then
|
if not CodeToolBoss.AddUnitToMainUsesSection(CodeBuf, LazResourcesUnit,'') then
|
||||||
begin
|
begin
|
||||||
@ -408,8 +408,8 @@ begin
|
|||||||
NewTopLine, Filename, false) then
|
NewTopLine, Filename, false) then
|
||||||
begin
|
begin
|
||||||
// there is a resource directive in the source
|
// there is a resource directive in the source
|
||||||
//debugln(['TProjectResources.UpdateMainSourceFile include directive found: FCanHasLrsInclude=',FCanHasLrsInclude,' HasLazarusResources=',HasLazarusResources]);
|
//debugln(['TProjectResources.UpdateMainSourceFile include directive found: FCanHaveLrsInclude=',FCanHaveLrsInclude,' HasLazarusResources=',HasLazarusResources]);
|
||||||
if not (FCanHasLrsInclude and HasLazarusResources) then
|
if not (FCanHaveLrsInclude and HasLazarusResources) then
|
||||||
begin
|
begin
|
||||||
if not CodeToolBoss.RemoveDirective(NewCode, NewX, NewY, true) then
|
if not CodeToolBoss.RemoveDirective(NewCode, NewX, NewY, true) then
|
||||||
begin
|
begin
|
||||||
@ -422,9 +422,9 @@ begin
|
|||||||
end;
|
end;
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
if FCanHasLrsInclude and HasLazarusResources then
|
if FCanHaveLrsInclude and HasLazarusResources then
|
||||||
begin
|
begin
|
||||||
//debugln(['TProjectResources.UpdateMainSourceFile include directive not found: FCanHasLrsInclude=',FCanHasLrsInclude,' HasLazarusResources=',HasLazarusResources]);
|
//debugln(['TProjectResources.UpdateMainSourceFile include directive not found: FCanHaveLrsInclude=',FCanHaveLrsInclude,' HasLazarusResources=',HasLazarusResources]);
|
||||||
if not CodeToolBoss.AddIncludeDirective(CodeBuf,
|
if not CodeToolBoss.AddIncludeDirective(CodeBuf,
|
||||||
Filename,'') then
|
Filename,'') then
|
||||||
begin
|
begin
|
||||||
@ -437,12 +437,12 @@ begin
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TProjectResources.UpdateCanHasLrsInclude(const AFileName: string);
|
procedure TProjectResources.UpdateCanHaveLrsInclude(const AFileName: string);
|
||||||
var
|
var
|
||||||
CodeBuf: TCodeBuffer;
|
CodeBuf: TCodeBuffer;
|
||||||
NamePos, InPos: Integer;
|
NamePos, InPos: Integer;
|
||||||
begin
|
begin
|
||||||
FCanHasLrsInclude := False;
|
FCanHaveLrsInclude := False;
|
||||||
|
|
||||||
CodeBuf := CodeToolBoss.LoadFile(AFileName, False, False);
|
CodeBuf := CodeToolBoss.LoadFile(AFileName, False, False);
|
||||||
if CodeBuf = nil then
|
if CodeBuf = nil then
|
||||||
@ -450,7 +450,7 @@ begin
|
|||||||
|
|
||||||
// Check that .lrs contains Forms and Interfaces in the uses section. If it does not
|
// Check that .lrs contains Forms and Interfaces in the uses section. If it does not
|
||||||
// we cannot add LResources (it is not lazarus application)
|
// we cannot add LResources (it is not lazarus application)
|
||||||
FCanHasLrsInclude :=
|
FCanHaveLrsInclude :=
|
||||||
CodeToolBoss.FindUnitInAllUsesSections(CodeBuf, 'Forms', NamePos, InPos) and
|
CodeToolBoss.FindUnitInAllUsesSections(CodeBuf, 'Forms', NamePos, InPos) and
|
||||||
CodeToolBoss.FindUnitInAllUsesSections(CodeBuf, 'Interfaces', NamePos, InPos);
|
CodeToolBoss.FindUnitInAllUsesSections(CodeBuf, 'Interfaces', NamePos, InPos);
|
||||||
end;
|
end;
|
||||||
@ -482,7 +482,7 @@ begin
|
|||||||
newLrsFileName := ExtractFileName(lrsFileName);
|
newLrsFileName := ExtractFileName(lrsFileName);
|
||||||
|
|
||||||
// update resources (FLazarusResources, FSystemResources, ...)
|
// update resources (FLazarusResources, FSystemResources, ...)
|
||||||
UpdateCanHasLrsInclude(CurFileName);
|
UpdateCanHaveLrsInclude(CurFileName);
|
||||||
if not Update then
|
if not Update then
|
||||||
Exit;
|
Exit;
|
||||||
// update codebuffers of new .lrs and .rc files
|
// update codebuffers of new .lrs and .rc files
|
||||||
@ -586,7 +586,7 @@ procedure TProjectResources.UpdateCodeBuffers;
|
|||||||
begin
|
begin
|
||||||
if HasSystemResources then
|
if HasSystemResources then
|
||||||
UpdateCodeBuffer(rcFileName, FSystemResources.Text);
|
UpdateCodeBuffer(rcFileName, FSystemResources.Text);
|
||||||
if FCanHasLrsInclude and HasLazarusResources then
|
if FCanHaveLrsInclude and HasLazarusResources then
|
||||||
UpdateCodeBuffer(lrsFileName, FLazarusResources.Text);
|
UpdateCodeBuffer(lrsFileName, FLazarusResources.Text);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user