mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-15 23:19:50 +02:00
IDEIntf: TPropertyEditorHook changed method names to be ansistring instead shortstring
git-svn-id: trunk@15712 -
This commit is contained in:
parent
b3038dc825
commit
1546f3eee9
@ -120,7 +120,7 @@ type
|
||||
function DoOnGetSrcPathForCompiledUnit(Sender: TObject;
|
||||
const AFilename: string): string;
|
||||
function OnInternalGetMethodName(const AMethod: TMethod;
|
||||
CheckOwner: TObject): shortstring;
|
||||
CheckOwner: TObject): string;
|
||||
function FindCodeOfMainUnitHint(Code: TCodeBuffer): TCodeBuffer;
|
||||
procedure CreateScanner(Code: TCodeBuffer);
|
||||
procedure SetAbortable(const AValue: boolean);
|
||||
@ -4347,7 +4347,7 @@ begin
|
||||
end;
|
||||
|
||||
function TCodeToolManager.OnInternalGetMethodName(const AMethod: TMethod;
|
||||
CheckOwner: TObject): shortstring;
|
||||
CheckOwner: TObject): string;
|
||||
begin
|
||||
if Assigned(OnGetMethodName) then
|
||||
Result:=OnGetMethodName(AMethod,CheckOwner)
|
||||
|
@ -136,7 +136,7 @@ type
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
TOnGetMethodname = function(const AMethod: TMethod;
|
||||
CheckOwner: TObject): shortstring of object;
|
||||
CheckOwner: TObject): string of object;
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
// flags/states for searching
|
||||
|
16
ide/main.pp
16
ide/main.pp
@ -403,9 +403,9 @@ type
|
||||
procedure OIOnFindDeclarationOfProperty(Sender: TObject);
|
||||
procedure OIOnUpdateRestricted(Sender: TObject);
|
||||
function OnPropHookGetMethodName(const Method: TMethod;
|
||||
CheckOwner: TObject): ShortString;
|
||||
CheckOwner: TObject): String;
|
||||
procedure OnPropHookGetMethods(TypeData: PTypeData; Proc:TGetStringProc);
|
||||
function OnPropHookMethodExists(const AMethodName: ShortString;
|
||||
function OnPropHookMethodExists(const AMethodName: String;
|
||||
TypeData: PTypeData;
|
||||
var MethodIsCompatible, MethodIsPublished,
|
||||
IdentIsMethod: boolean): boolean;
|
||||
@ -413,8 +413,8 @@ type
|
||||
ATypeInfo:PTypeInfo;
|
||||
APersistent: TPersistent;
|
||||
const APropertyPath: string): TMethod;
|
||||
procedure OnPropHookShowMethod(const AMethodName:ShortString);
|
||||
procedure OnPropHookRenameMethod(const CurName, NewName:ShortString);
|
||||
procedure OnPropHookShowMethod(const AMethodName: String);
|
||||
procedure OnPropHookRenameMethod(const CurName, NewName: String);
|
||||
function OnPropHookBeforeAddPersistent(Sender: TObject;
|
||||
APersistentClass: TPersistentClass;
|
||||
AParent: TPersistent): boolean;
|
||||
@ -1412,7 +1412,7 @@ begin
|
||||
end;
|
||||
|
||||
function TMainIDE.OnPropHookGetMethodName(const Method: TMethod;
|
||||
CheckOwner: TObject): ShortString;
|
||||
CheckOwner: TObject): String;
|
||||
var
|
||||
JITMethod: TJITMethod;
|
||||
begin
|
||||
@ -13927,7 +13927,7 @@ begin
|
||||
Result:=GetProjectFileWithRootComponent(AComponent);
|
||||
end;
|
||||
|
||||
function TMainIDE.OnPropHookMethodExists(const AMethodName: ShortString;
|
||||
function TMainIDE.OnPropHookMethodExists(const AMethodName: String;
|
||||
TypeData: PTypeData;
|
||||
var MethodIsCompatible,MethodIsPublished,IdentIsMethod: boolean): boolean;
|
||||
var ActiveSrcEdit: TSourceEditor;
|
||||
@ -13991,7 +13991,7 @@ begin
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TMainIDE.OnPropHookShowMethod(const AMethodName: ShortString);
|
||||
procedure TMainIDE.OnPropHookShowMethod(const AMethodName: String);
|
||||
var
|
||||
ActiveSrcEdit: TSourceEditor;
|
||||
ActiveUnitInfo: TUnitInfo;
|
||||
@ -14019,7 +14019,7 @@ begin
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TMainIDE.OnPropHookRenameMethod(const CurName, NewName: ShortString);
|
||||
procedure TMainIDE.OnPropHookRenameMethod(const CurName, NewName: String);
|
||||
var ActiveSrcEdit: TSourceEditor;
|
||||
ActiveUnitInfo: TUnitInfo;
|
||||
BossResult: boolean;
|
||||
|
@ -1125,13 +1125,13 @@ type
|
||||
TPropHookCreateMethod = function(const Name: ShortString; ATypeInfo: PTypeInfo;
|
||||
APersistent: TPersistent; const APropertyPath: string): TMethod of object;
|
||||
TPropHookGetMethodName = function(const Method: TMethod;
|
||||
CheckOwner: TObject): ShortString of object;
|
||||
CheckOwner: TObject): String of object;
|
||||
TPropHookGetMethods = procedure(TypeData:PTypeData; Proc:TGetStringProc) of object;
|
||||
TPropHookMethodExists = function(const Name:ShortString; TypeData: PTypeData;
|
||||
TPropHookMethodExists = function(const Name: String; TypeData: PTypeData;
|
||||
var MethodIsCompatible,MethodIsPublished,IdentIsMethod: boolean
|
||||
):boolean of object;
|
||||
TPropHookRenameMethod = procedure(const CurName, NewName:ShortString) of object;
|
||||
TPropHookShowMethod = procedure(const Name:ShortString) of object;
|
||||
TPropHookRenameMethod = procedure(const CurName, NewName: String) of object;
|
||||
TPropHookShowMethod = procedure(const Name: String) of object;
|
||||
TPropHookMethodFromAncestor = function(const Method:TMethod):boolean of object;
|
||||
TPropHookChainCall = procedure(const AMethodName, InstanceName,
|
||||
InstanceMethod:ShortString; TypeData:PTypeData) of object;
|
||||
@ -1230,12 +1230,12 @@ type
|
||||
function CreateMethod(const Name: ShortString; ATypeInfo:PTypeInfo;
|
||||
APersistent: TPersistent;
|
||||
const APropertyPath: string): TMethod;
|
||||
function GetMethodName(const Method: TMethod; CheckOwner: TObject): ShortString;
|
||||
function GetMethodName(const Method: TMethod; CheckOwner: TObject): String;
|
||||
procedure GetMethods(TypeData: PTypeData; Proc: TGetStringProc);
|
||||
function MethodExists(const Name: ShortString; TypeData: PTypeData;
|
||||
function MethodExists(const Name: String; TypeData: PTypeData;
|
||||
var MethodIsCompatible,MethodIsPublished,IdentIsMethod: boolean):boolean;
|
||||
procedure RenameMethod(const CurName, NewName: ShortString);
|
||||
procedure ShowMethod(const Name: ShortString);
|
||||
procedure RenameMethod(const CurName, NewName: String);
|
||||
procedure ShowMethod(const Name: String);
|
||||
function MethodFromAncestor(const Method: TMethod):boolean;
|
||||
procedure ChainCall(const AMethodName, InstanceName,
|
||||
InstanceMethod: ShortString; TypeData: PTypeData);
|
||||
@ -3908,7 +3908,7 @@ end;
|
||||
|
||||
function TMethodPropertyEditor.GetEditLimit: Integer;
|
||||
begin
|
||||
Result := MaxIdentLength;
|
||||
Result := 2*MaxIdentLength+1; // clasname.methodname
|
||||
end;
|
||||
|
||||
function TMethodPropertyEditor.GetFormMethodName: shortstring;
|
||||
@ -4013,9 +4013,8 @@ end;
|
||||
procedure TMethodPropertyEditor.SetValue(const NewValue: ansistring);
|
||||
var
|
||||
CreateNewMethod: Boolean;
|
||||
CurValue: ansistring;
|
||||
//OldMethod: TMethod;
|
||||
NewMethodExists,NewMethodIsCompatible,NewMethodIsPublished,
|
||||
CurValue: string;
|
||||
NewMethodExists, NewMethodIsCompatible, NewMethodIsPublished,
|
||||
NewIdentIsMethod: boolean;
|
||||
begin
|
||||
CurValue:=GetValue;
|
||||
@ -5214,7 +5213,7 @@ begin
|
||||
end;
|
||||
|
||||
function TPropertyEditorHook.GetMethodName(const Method: TMethod;
|
||||
CheckOwner: TObject): ShortString;
|
||||
CheckOwner: TObject): String;
|
||||
var
|
||||
i: Integer;
|
||||
begin
|
||||
@ -5249,7 +5248,7 @@ begin
|
||||
TPropHookGetMethods(FHandlers[htGetMethods][i])(TypeData,Proc);
|
||||
end;
|
||||
|
||||
function TPropertyEditorHook.MethodExists(const Name:Shortstring;
|
||||
function TPropertyEditorHook.MethodExists(const Name: String;
|
||||
TypeData: PTypeData;
|
||||
var MethodIsCompatible, MethodIsPublished, IdentIsMethod: boolean):boolean;
|
||||
var
|
||||
@ -5274,7 +5273,7 @@ begin
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TPropertyEditorHook.RenameMethod(const CurName, NewName:ShortString);
|
||||
procedure TPropertyEditorHook.RenameMethod(const CurName, NewName: String);
|
||||
// rename published method in LookupRoot object and source
|
||||
var
|
||||
i: Integer;
|
||||
@ -5284,7 +5283,7 @@ begin
|
||||
TPropHookRenameMethod(FHandlers[htRenameMethod][i])(CurName,NewName);
|
||||
end;
|
||||
|
||||
procedure TPropertyEditorHook.ShowMethod(const Name:Shortstring);
|
||||
procedure TPropertyEditorHook.ShowMethod(const Name:String);
|
||||
// jump cursor to published method body
|
||||
var
|
||||
i: Integer;
|
||||
|
Loading…
Reference in New Issue
Block a user