mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-22 12:39:29 +02:00
codetools: clean up
git-svn-id: trunk@48650 -
This commit is contained in:
parent
98ec5b2edc
commit
cfdc07e743
@ -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
|
||||
|
@ -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,
|
||||
|
@ -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
|
||||
|
@ -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;
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user