CodeTools: return method overloads for compatibility after r55031 #3ec399d85a

git-svn-id: trunk@55037 -
This commit is contained in:
ondrej 2017-05-22 06:57:39 +00:00
parent 5abb0b0ca3
commit c3ef5a5623
2 changed files with 33 additions and 0 deletions

View File

@ -355,6 +355,13 @@ type
out InheritedDeclContext: TFindContext;
ProcName: string = '' // default is 'Assign'
): boolean;
function AddAssignMethod(ClassNode: TCodeTreeNode; MemberNodeExts: TFPList;
const ProcName, ParamName, ParamType: string;
OverrideMod, CallInherited, CallInheritedOnlyInElse: boolean;
SourceChanger: TSourceChangeCache;
out NewPos: TCodeXYPosition; out NewTopLine: integer;
LocalVarName: string = '' // default is 'aSource'
): boolean;
function AddAssignMethod(ClassNode: TCodeTreeNode; MemberNodeExts: TFPList;
const ProcName, ParamName, ParamType: string;
OverrideMod, CallInherited, CallInheritedOnlyInElse: boolean;
@ -6253,6 +6260,19 @@ begin
NewPos,NewTopLine, BlockTopLine, BlockBottomLine);
end;
function TCodeCompletionCodeTool.AddAssignMethod(ClassNode: TCodeTreeNode;
MemberNodeExts: TFPList; const ProcName, ParamName, ParamType: string;
OverrideMod, CallInherited, CallInheritedOnlyInElse: boolean;
SourceChanger: TSourceChangeCache; out NewPos: TCodeXYPosition; out
NewTopLine: integer; LocalVarName: string): boolean;
var
BlockTopLine, BlockBottomLine: integer;
begin
Result := AddAssignMethod(ClassNode, MemberNodeExts, ProcName, ParamName, ParamType,
OverrideMod, CallInherited, CallInheritedOnlyInElse, SourceChanger, NewPos, NewTopLine,
BlockTopLine, BlockBottomLine, LocalVarName);
end;
function TCodeCompletionCodeTool.GetPossibleInitsForVariable(
CursorPos: TCodeXYPosition; out Statements: TStrings; out
InsertPositions: TObjectList; SourceChangeCache: TSourceChangeCache): boolean;

View File

@ -473,6 +473,9 @@ type
out NewX, NewY, NewTopLine: integer): boolean;
function FindSmartHint(Code: TCodeBuffer; X,Y: integer;
Flags: TFindSmartFlags = DefaultFindSmartHintFlags): string;
function FindDeclarationInInterface(Code: TCodeBuffer;
const Identifier: string; out NewCode: TCodeBuffer;
out NewX, NewY, NewTopLine: integer): boolean;
function FindDeclarationInInterface(Code: TCodeBuffer;
const Identifier: string; out NewCode: TCodeBuffer;
out NewX, NewY, NewTopLine, BlockTopLine, BlockBottomLine: integer): boolean;
@ -2181,6 +2184,16 @@ begin
{$ENDIF}
end;
function TCodeToolManager.FindDeclarationInInterface(Code: TCodeBuffer;
const Identifier: string; out NewCode: TCodeBuffer; out NewX, NewY,
NewTopLine: integer): boolean;
var
BlockTopLine, BlockBottomLine: integer;
begin
Result := FindDeclarationInInterface(Code, Identifier, NewCode, NewX, NewY, NewTopLine,
BlockTopLine, BlockBottomLine);
end;
function TCodeToolManager.FindDeclarationWithMainUsesSection(Code: TCodeBuffer;
const Identifier: string; out NewCode: TCodeBuffer;
out NewX, NewY, NewTopLine: integer): Boolean;