mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-14 20:19:16 +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;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure ChangeParam(aParam: TChgPrmModify; ChgPos: integer);
|
procedure ChangeParam(aParam: TChgPrmModify; aParamIndex: integer);
|
||||||
var
|
var
|
||||||
Code: String;
|
Code: String;
|
||||||
p: LongInt;
|
p: LongInt;
|
||||||
begin
|
begin
|
||||||
|
if aParamIndex=0 then ;
|
||||||
if aParam.Delete then begin
|
if aParam.Delete then begin
|
||||||
if ReplaceStartPos<1 then begin
|
if ReplaceStartPos<1 then begin
|
||||||
// ToDo: delete the last parameter => delete separator from previous parameter
|
// ToDo: delete the last parameter => delete separator from previous parameter
|
||||||
@ -876,6 +877,7 @@ var
|
|||||||
begin
|
begin
|
||||||
Result:=false;
|
Result:=false;
|
||||||
if (Changes=nil) or (Changes.Count=0) then exit(true);
|
if (Changes=nil) or (Changes.Count=0) then exit(true);
|
||||||
|
if TreeOfPCodeXYPosition=nil then ;
|
||||||
BuildTree(lsrEnd);
|
BuildTree(lsrEnd);
|
||||||
SourceChanger.MainScanner:=Scanner;
|
SourceChanger.MainScanner:=Scanner;
|
||||||
if (ProcPos.Code<>nil) and (CaretToCleanPos(ProcPos,CleanPos)=0) then begin
|
if (ProcPos.Code<>nil) and (CaretToCleanPos(ProcPos,CleanPos)=0) then begin
|
||||||
|
@ -86,7 +86,10 @@ uses
|
|||||||
CodeCache, CustomCodeTool, PascalParserTool, MethodJumpTool,
|
CodeCache, CustomCodeTool, PascalParserTool, MethodJumpTool,
|
||||||
FindDeclarationTool, KeywordFuncLists, CodeToolsStructs, BasicCodeTools,
|
FindDeclarationTool, KeywordFuncLists, CodeToolsStructs, BasicCodeTools,
|
||||||
LinkScanner, SourceChanger, CodeGraph, AVL_Tree, contnrs,
|
LinkScanner, SourceChanger, CodeGraph, AVL_Tree, contnrs,
|
||||||
CodeCompletionTemplater, StdCodeTools;
|
{$IFDEF EnableCodeCompleteTemplates}
|
||||||
|
CodeCompletionTemplater,
|
||||||
|
{$ENDIF}
|
||||||
|
StdCodeTools;
|
||||||
|
|
||||||
type
|
type
|
||||||
TNewClassPart = (ncpPrivateProcs, ncpPrivateVars,
|
TNewClassPart = (ncpPrivateProcs, ncpPrivateVars,
|
||||||
|
@ -30,7 +30,7 @@ unit CodeIndex;
|
|||||||
interface
|
interface
|
||||||
|
|
||||||
uses
|
uses
|
||||||
Classes, SysUtils, AVL_Tree, CodeAtom, CodeTree, CodeCache,
|
Classes, SysUtils, AVL_Tree, CodeTree, CodeCache,
|
||||||
FileProcs, StdCodeTools, CodeToolsStructs;
|
FileProcs, StdCodeTools, CodeToolsStructs;
|
||||||
|
|
||||||
type
|
type
|
||||||
|
@ -43,7 +43,7 @@ uses
|
|||||||
{$IFDEF MEM_CHECK}
|
{$IFDEF MEM_CHECK}
|
||||||
MemCheck,
|
MemCheck,
|
||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
Classes, SysUtils, TypInfo, FileProcs, CodeToolsStrConsts, CodeTree, CodeAtom,
|
Classes, SysUtils, TypInfo, FileProcs, CodeToolsStrConsts, CodeTree,
|
||||||
CodeCache, PascalParserTool, CodeCompletionTool, KeywordFuncLists,
|
CodeCache, PascalParserTool, CodeCompletionTool, KeywordFuncLists,
|
||||||
BasicCodeTools, LinkScanner, AVL_Tree, CodeToolsStructs,
|
BasicCodeTools, LinkScanner, AVL_Tree, CodeToolsStructs,
|
||||||
SourceChanger, FindDeclarationTool, ChangeDeclarationTool;
|
SourceChanger, FindDeclarationTool, ChangeDeclarationTool;
|
||||||
|
@ -1102,7 +1102,7 @@ var
|
|||||||
var
|
var
|
||||||
p: Pointer;
|
p: Pointer;
|
||||||
begin
|
begin
|
||||||
p:=Pointer(PtrUInt(CleanPos));
|
p:={%H-}Pointer(PtrUInt(CleanPos));
|
||||||
if WithIdentifiers=nil then WithIdentifiers:=TAVLTree.Create;
|
if WithIdentifiers=nil then WithIdentifiers:=TAVLTree.Create;
|
||||||
if WithIdentifiers.Find(p)<>nil then exit;
|
if WithIdentifiers.Find(p)<>nil then exit;
|
||||||
{$IFDEF CTDEBUG}
|
{$IFDEF CTDEBUG}
|
||||||
@ -1339,7 +1339,7 @@ var
|
|||||||
|
|
||||||
AVLNode:=WithIdentifiers.FindLowest;
|
AVLNode:=WithIdentifiers.FindLowest;
|
||||||
while AVLNode<>nil do begin
|
while AVLNode<>nil do begin
|
||||||
CleanPos:=integer(PtrUInt(AVLNode.Data));
|
CleanPos:=integer({%H-}PtrUInt(AVLNode.Data));
|
||||||
//debugln(['Replace Prefix identifier: ',GetIdentifier(@Src[CleanPos])]);
|
//debugln(['Replace Prefix identifier: ',GetIdentifier(@Src[CleanPos])]);
|
||||||
if not SourceChangeCache.Replace(gtNone,gtNone,CleanPos,CleanPos,WithVar)
|
if not SourceChangeCache.Replace(gtNone,gtNone,CleanPos,CleanPos,WithVar)
|
||||||
then
|
then
|
||||||
|
@ -33,7 +33,7 @@ unit FindOverloads;
|
|||||||
interface
|
interface
|
||||||
|
|
||||||
uses
|
uses
|
||||||
Classes, SysUtils, FileProcs, BasicCodeTools, CodeAtom, CodeTree, CodeGraph,
|
Classes, SysUtils, FileProcs, BasicCodeTools, CodeTree, CodeGraph,
|
||||||
CodeCache, FindDeclarationTool, AVL_Tree, FindDeclarationCache, StdCodeTools;
|
CodeCache, FindDeclarationTool, AVL_Tree, FindDeclarationCache, StdCodeTools;
|
||||||
|
|
||||||
type
|
type
|
||||||
|
Loading…
Reference in New Issue
Block a user