codetools: clean up

git-svn-id: trunk@48650 -
This commit is contained in:
mattias 2015-04-06 16:49:44 +00:00
parent 98ec5b2edc
commit cfdc07e743
6 changed files with 12 additions and 7 deletions

View File

@ -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

View File

@ -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,

View File

@ -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

View File

@ -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;

View File

@ -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

View File

@ -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