diff --git a/components/codetools/codetoolmanager.pas b/components/codetools/codetoolmanager.pas index 42a78e6f20..646998220d 100644 --- a/components/codetools/codetoolmanager.pas +++ b/components/codetools/codetoolmanager.pas @@ -53,7 +53,6 @@ type TCodeTool = TEventsCodeTool; TDirectivesTool = TCompilerDirectivesTree; - TGetStringProc = procedure(const s: string) of object; TOnBeforeApplyCTChanges = procedure(Manager: TCodeToolManager; var Abort: boolean) of object; TOnAfterApplyCTChanges = procedure(Manager: TCodeToolManager) of object; @@ -672,7 +671,7 @@ type // functions for events in the object inspector function GetCompatiblePublishedMethods(Code: TCodeBuffer; const AClassName: string; TypeData: PTypeData; - Proc: TGetStringProc): boolean; + Proc: TGetStrProc): boolean; function PublishedMethodExists(Code:TCodeBuffer; const AClassName, AMethodName: string; TypeData: PTypeData; out MethodIsCompatible, MethodIsPublished, IdentIsMethod: boolean @@ -3109,7 +3108,7 @@ begin end; function TCodeToolManager.GetCompatiblePublishedMethods(Code: TCodeBuffer; - const AClassName: string; TypeData: PTypeData; Proc: TGetStringProc): boolean; + const AClassName: string; TypeData: PTypeData; Proc: TGetStrProc): boolean; begin {$IFDEF CTDEBUG} DebugLn('TCodeToolManager.GetCompatiblePublishedMethods A ',Code.Filename,' Classname=',AClassname); diff --git a/components/codetools/eventcodetool.pas b/components/codetools/eventcodetool.pas index b67df61f2f..92ac9784cc 100644 --- a/components/codetools/eventcodetool.pas +++ b/components/codetools/eventcodetool.pas @@ -49,8 +49,6 @@ uses SourceChanger, FindDeclarationTool, ExtractProcTool; type - TECTGetStringProc = procedure(const s: string) of object; - { TEventsCodeTool } TEventsCodeTool = class(TExtractProcTool) @@ -68,9 +66,9 @@ type SourceChangeCache: TSourceChangeCache): boolean; function GetCompatiblePublishedMethods(const UpperClassName: string; - TypeData: PTypeData; Proc: TECTGetStringProc): boolean; + TypeData: PTypeData; Proc: TGetStrProc): boolean; function GetCompatiblePublishedMethods(ClassNode: TCodeTreeNode; - TypeData: PTypeData; Proc: TECTGetStringProc): boolean; + TypeData: PTypeData; Proc: TGetStrProc): boolean; function PublishedMethodExists(const UpperClassName, UpperMethodName: string; TypeData: PTypeData; out MethodIsCompatible, MethodIsPublished, IdentIsMethod: boolean @@ -247,7 +245,7 @@ end; function TEventsCodeTool.GetCompatiblePublishedMethods( const UpperClassName: string; TypeData: PTypeData; - Proc: TECTGetStringProc): boolean; + Proc: TGetStrProc): boolean; var ClassNode: TCodeTreeNode; begin Result:=false; @@ -271,7 +269,7 @@ end; function TEventsCodeTool.GetCompatiblePublishedMethods( ClassNode: TCodeTreeNode; TypeData: PTypeData; - Proc: TECTGetStringProc): boolean; + Proc: TGetStrProc): boolean; var Params: TFindDeclarationParams; CompListSize: integer; diff --git a/ide/main.pp b/ide/main.pp index 12eb3b554e..70be7e259b 100644 --- a/ide/main.pp +++ b/ide/main.pp @@ -432,7 +432,7 @@ type procedure OIOnUpdateRestricted(Sender: TObject); function OnPropHookGetMethodName(const Method: TMethod; PropOwner: TObject): String; - procedure OnPropHookGetMethods(TypeData: PTypeData; Proc:TGetStringProc); + procedure OnPropHookGetMethods(TypeData: PTypeData; Proc:TGetStrProc); function OnPropHookMethodExists(const AMethodName: String; TypeData: PTypeData; var MethodIsCompatible, MethodIsPublished, @@ -457,7 +457,7 @@ type procedure OnPropHookAddDependency(const AClass: TClass; const AnUnitName: shortstring); procedure OnPropHookGetComponentNames(TypeData: PTypeData; - Proc: TGetStringProc); + Proc: TGetStrProc); function OnPropHookGetComponent(const ComponentPath: String): TComponent; // designer events @@ -1606,9 +1606,9 @@ begin {$ENDIF} end; -procedure TMainIDE.OnPropHookGetMethods(TypeData:PTypeData; - Proc:TGetStringProc); -var ActiveSrcEdit: TSourceEditor; +procedure TMainIDE.OnPropHookGetMethods(TypeData: PTypeData; Proc: TGetStrProc); +var + ActiveSrcEdit: TSourceEditor; ActiveUnitInfo: TUnitInfo; begin if not BeginCodeTool(ActiveSrcEdit,ActiveUnitInfo,[ctfSwitchToFormSource]) @@ -15849,7 +15849,7 @@ begin end; procedure TMainIDE.OnPropHookGetComponentNames(TypeData: PTypeData; - Proc: TGetStringProc); + Proc: TGetStrProc); begin PkgBoss.IterateComponentNames(GlobalDesignHook.LookupRoot,TypeData,Proc); end; diff --git a/packager/basepkgmanager.pas b/packager/basepkgmanager.pas index 549a09313f..3f60084bfb 100644 --- a/packager/basepkgmanager.pas +++ b/packager/basepkgmanager.pas @@ -45,7 +45,7 @@ uses MemCheck, {$ENDIF} TypInfo, Classes, SysUtils, Forms, FileUtil, LCLProc, - PropEdits, LazIDEIntf, PackageIntf, MenuIntf, + LazIDEIntf, PackageIntf, MenuIntf, LazarusIDEStrConsts, EnvironmentOpts, PackageDefs, PackageSystem, ComponentReg, CompilerOptions, Project; @@ -147,7 +147,7 @@ type // components function GetUsableComponentUnits(CurRoot: TPersistent): TFPList; virtual; abstract; // list of TUnitInfo procedure IterateComponentNames(CurRoot: TPersistent; TypeData: PTypeData; - Proc: TGetStringProc); virtual; abstract; + Proc: TGetStrProc); virtual; abstract; function FindUsableComponent(CurRoot: TPersistent; const ComponentPath: string): TComponent; virtual; abstract; function FindReferencedRootComponent(CurRoot: TPersistent; diff --git a/packager/pkgmanager.pas b/packager/pkgmanager.pas index 985e377bf3..c55b7ce191 100644 --- a/packager/pkgmanager.pas +++ b/packager/pkgmanager.pas @@ -307,7 +307,7 @@ type // components function GetUsableComponentUnits(CurRoot: TPersistent): TFPList; override; // list of TUnitInfo procedure IterateComponentNames(CurRoot: TPersistent; TypeData: PTypeData; - Proc: TGetStringProc); override; + Proc: TGetStrProc); override; function FindUsableComponent(CurRoot: TPersistent; const ComponentPath: string): TComponent; override; function FindReferencedRootComponent(CurRoot: TPersistent; @@ -4053,7 +4053,7 @@ begin end; procedure TPkgManager.IterateComponentNames(CurRoot: TPersistent; - TypeData: PTypeData; Proc: TGetStringProc); + TypeData: PTypeData; Proc: TGetStrProc); procedure CheckComponent(aRoot: TComponent); var