mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-17 04:29:25 +02:00
Formatting
git-svn-id: trunk@62168 -
This commit is contained in:
parent
557305381b
commit
45446f15b8
@ -2924,7 +2924,8 @@ end;
|
||||
function TFindDeclarationTool.FindDeclarationInUsesSection(
|
||||
UsesNode: TCodeTreeNode; CleanPos: integer;
|
||||
out NewPos: TCodeXYPosition; out NewTopLine: integer): boolean;
|
||||
var AUnitName, UnitInFilename: string;
|
||||
var
|
||||
AUnitName, UnitInFilename: string;
|
||||
UnitNamePos, UnitInFilePos: TAtomPosition;
|
||||
begin
|
||||
Result:=false;
|
||||
|
@ -106,8 +106,7 @@ type
|
||||
SourceChangeCache: TSourceChangeCache): boolean;
|
||||
|
||||
// uses sections
|
||||
function RenameUsedUnit(const OldUnitName, NewUnitName,
|
||||
NewUnitInFile: string;
|
||||
function RenameUsedUnit(const OldUnitName, NewUnitName, NewUnitInFile: string;
|
||||
SourceChangeCache: TSourceChangeCache): boolean;
|
||||
function ReplaceUsedUnits(UnitNamePairs: TStringToStringTree; // ToDo: dotted
|
||||
SourceChangeCache: TSourceChangeCache): boolean;
|
||||
@ -122,8 +121,7 @@ type
|
||||
function AddUnitToMainUsesSection(const NewUnitName, NewUnitInFile: string;
|
||||
SourceChangeCache: TSourceChangeCache;
|
||||
AsLast: boolean = false; CheckSpecialUnits: boolean = true): boolean;
|
||||
function AddUnitToImplementationUsesSection(const NewUnitName,
|
||||
NewUnitInFile: string;
|
||||
function AddUnitToImplementationUsesSection(const NewUnitName, NewUnitInFile: string;
|
||||
SourceChangeCache: TSourceChangeCache;
|
||||
AsLast: boolean = false; CheckSpecialUnits: boolean = true): boolean;
|
||||
function UnitExistsInUsesSection(UsesSection: TUsesSection;
|
||||
@ -426,7 +424,8 @@ end;
|
||||
|
||||
function TStandardCodeTool.RenameSource(const NewName: string;
|
||||
SourceChangeCache: TSourceChangeCache): boolean;
|
||||
var NamePos: TAtomPosition;
|
||||
var
|
||||
NamePos: TAtomPosition;
|
||||
begin
|
||||
Result:=false;
|
||||
BuildTree(lsrSourceName);
|
||||
@ -435,17 +434,16 @@ begin
|
||||
or (Length(NewName)>255) then exit;
|
||||
//debugln(['TStandardCodeTool.RenameSource OldName="',dbgstr(copy(Src,NamePos.StartPos,NamePos.EndPos-NamePos.StartPos)),'"']);
|
||||
SourceChangeCache.MainScanner:=Scanner;
|
||||
SourceChangeCache.Replace(gtNone,gtNone,NamePos.StartPos,NamePos.EndPos,
|
||||
NewName);
|
||||
SourceChangeCache.Replace(gtNone,gtNone,NamePos.StartPos,NamePos.EndPos,NewName);
|
||||
if not SourceChangeCache.Apply then exit;
|
||||
CachedSourceName:=NewName;
|
||||
Result:=true;
|
||||
end;
|
||||
|
||||
function TStandardCodeTool.RenameUsedUnit(const OldUnitName,
|
||||
NewUnitName, NewUnitInFile: string;
|
||||
SourceChangeCache: TSourceChangeCache): boolean;
|
||||
var UnitPos, InPos: TAtomPosition;
|
||||
function TStandardCodeTool.RenameUsedUnit(const OldUnitName, NewUnitName,
|
||||
NewUnitInFile: string; SourceChangeCache: TSourceChangeCache): boolean;
|
||||
var
|
||||
UnitPos, InPos: TAtomPosition;
|
||||
NewUsesTerm: string;
|
||||
begin
|
||||
Result:=false;
|
||||
|
@ -5247,8 +5247,7 @@ begin
|
||||
if (pfMainUnitIsPascalSource in Flags) then
|
||||
begin
|
||||
// rename unit in program uses section
|
||||
CodeToolBoss.RenameUsedUnit(MainUnitInfo.Source, OldUnitName,
|
||||
NewUnitName, '');
|
||||
CodeToolBoss.RenameUsedUnit(MainUnitInfo.Source, OldUnitName, NewUnitName, '');
|
||||
end;
|
||||
if MainUnitInfo = AnUnitInfo then
|
||||
begin
|
||||
|
@ -34,11 +34,12 @@ interface
|
||||
uses
|
||||
Classes, SysUtils, StrUtils, Zipper,
|
||||
// LCL
|
||||
LCLType, Forms, Controls, StdCtrls, Dialogs, ExtCtrls, Buttons, ButtonPanel,
|
||||
LCLType, Forms, Controls, StdCtrls, Dialogs, Buttons, ButtonPanel,
|
||||
// LazUtils
|
||||
FileUtil, LazFileUtils, LazLoggerBase,
|
||||
// IdeIntf
|
||||
IDEWindowIntf, IDEHelpIntf, IDEDialogs, IDEImagesIntf, ProjPackIntf, CompOptsIntf, LazIDEIntf, LCLIntf,
|
||||
IDEWindowIntf, IDEHelpIntf, IDEDialogs, IDEImagesIntf, ProjPackIntf, CompOptsIntf,
|
||||
LazIDEIntf, LCLIntf,
|
||||
// IDE
|
||||
ProjectDefs, Project, PackageDefs, PublishModule, IDEOptionDefs, InputHistory,
|
||||
LazarusIDEStrConsts, IDEProcs, EnvironmentOpts, CompilerOptions;
|
||||
|
Loading…
Reference in New Issue
Block a user