diff --git a/components/codetools/changedeclarationtool.pas b/components/codetools/changedeclarationtool.pas index c5d720e996..65dbf46c81 100644 --- a/components/codetools/changedeclarationtool.pas +++ b/components/codetools/changedeclarationtool.pas @@ -590,11 +590,12 @@ var end; end; - procedure ChangeParam(aParam: TChgPrmModify; ChgPos: integer); + procedure ChangeParam(aParam: TChgPrmModify; aParamIndex: integer); var Code: String; p: LongInt; begin + if aParamIndex=0 then ; if aParam.Delete then begin if ReplaceStartPos<1 then begin // ToDo: delete the last parameter => delete separator from previous parameter @@ -876,6 +877,7 @@ var begin Result:=false; if (Changes=nil) or (Changes.Count=0) then exit(true); + if TreeOfPCodeXYPosition=nil then ; BuildTree(lsrEnd); SourceChanger.MainScanner:=Scanner; if (ProcPos.Code<>nil) and (CaretToCleanPos(ProcPos,CleanPos)=0) then begin diff --git a/components/codetools/codecompletiontool.pas b/components/codetools/codecompletiontool.pas index e9e898d86a..2f583b0b2f 100644 --- a/components/codetools/codecompletiontool.pas +++ b/components/codetools/codecompletiontool.pas @@ -86,7 +86,10 @@ uses CodeCache, CustomCodeTool, PascalParserTool, MethodJumpTool, FindDeclarationTool, KeywordFuncLists, CodeToolsStructs, BasicCodeTools, LinkScanner, SourceChanger, CodeGraph, AVL_Tree, contnrs, - CodeCompletionTemplater, StdCodeTools; + {$IFDEF EnableCodeCompleteTemplates} + CodeCompletionTemplater, + {$ENDIF} + StdCodeTools; type TNewClassPart = (ncpPrivateProcs, ncpPrivateVars, diff --git a/components/codetools/codeindex.pas b/components/codetools/codeindex.pas index 5fb88a6838..edfa3e30a4 100644 --- a/components/codetools/codeindex.pas +++ b/components/codetools/codeindex.pas @@ -30,7 +30,7 @@ unit CodeIndex; interface uses - Classes, SysUtils, AVL_Tree, CodeAtom, CodeTree, CodeCache, + Classes, SysUtils, AVL_Tree, CodeTree, CodeCache, FileProcs, StdCodeTools, CodeToolsStructs; type diff --git a/components/codetools/eventcodetool.pas b/components/codetools/eventcodetool.pas index cb81cbd368..9661e3d6cb 100644 --- a/components/codetools/eventcodetool.pas +++ b/components/codetools/eventcodetool.pas @@ -43,7 +43,7 @@ uses {$IFDEF MEM_CHECK} MemCheck, {$ENDIF} - Classes, SysUtils, TypInfo, FileProcs, CodeToolsStrConsts, CodeTree, CodeAtom, + Classes, SysUtils, TypInfo, FileProcs, CodeToolsStrConsts, CodeTree, CodeCache, PascalParserTool, CodeCompletionTool, KeywordFuncLists, BasicCodeTools, LinkScanner, AVL_Tree, CodeToolsStructs, SourceChanger, FindDeclarationTool, ChangeDeclarationTool; diff --git a/components/codetools/extractproctool.pas b/components/codetools/extractproctool.pas index c09384ba88..9d91e1a918 100644 --- a/components/codetools/extractproctool.pas +++ b/components/codetools/extractproctool.pas @@ -1102,7 +1102,7 @@ var var p: Pointer; begin - p:=Pointer(PtrUInt(CleanPos)); + p:={%H-}Pointer(PtrUInt(CleanPos)); if WithIdentifiers=nil then WithIdentifiers:=TAVLTree.Create; if WithIdentifiers.Find(p)<>nil then exit; {$IFDEF CTDEBUG} @@ -1339,7 +1339,7 @@ var AVLNode:=WithIdentifiers.FindLowest; while AVLNode<>nil do begin - CleanPos:=integer(PtrUInt(AVLNode.Data)); + CleanPos:=integer({%H-}PtrUInt(AVLNode.Data)); //debugln(['Replace Prefix identifier: ',GetIdentifier(@Src[CleanPos])]); if not SourceChangeCache.Replace(gtNone,gtNone,CleanPos,CleanPos,WithVar) then diff --git a/components/codetools/findoverloads.pas b/components/codetools/findoverloads.pas index 943b02c091..f0d9feb92e 100644 --- a/components/codetools/findoverloads.pas +++ b/components/codetools/findoverloads.pas @@ -33,7 +33,7 @@ unit FindOverloads; interface uses - Classes, SysUtils, FileProcs, BasicCodeTools, CodeAtom, CodeTree, CodeGraph, + Classes, SysUtils, FileProcs, BasicCodeTools, CodeTree, CodeGraph, CodeCache, FindDeclarationTool, AVL_Tree, FindDeclarationCache, StdCodeTools; type