mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-17 02:09:21 +02:00
fixed Extract Proc flags not used in selection
git-svn-id: trunk@5816 -
This commit is contained in:
parent
387847f395
commit
a3c5113732
@ -233,7 +233,7 @@ var
|
||||
UsedInNonSelection: Boolean;
|
||||
begin
|
||||
{$IFDEF CTDebug}
|
||||
DebugLn('AddVariableToTree A IsInSelection=',dbgs(IsInSelection),' IsParameter=',dbgs(IsParameter));
|
||||
DebugLn('AddVariableToTree A Ident=',GetIdentifier(@Src[VarNode.StartPos]),' IsInSelection=',dbgs(IsInSelection),' IsParameter=',dbgs(IsParameter));
|
||||
{$ENDIF}
|
||||
UsedInNonSelection:=(not IsInSelection) or IsParameter;
|
||||
if VarTree=nil then
|
||||
@ -242,7 +242,7 @@ var
|
||||
if AVLNode<>nil then begin
|
||||
ProcVar:=TExtractedProcVariable(AVLNode.Data);
|
||||
ProcVar.UsedInSelection:=ProcVar.UsedInSelection or IsInSelection;
|
||||
ProcVar.UsedInNonSelection:=ProcVar.UsedInSelection or UsedInNonSelection;
|
||||
ProcVar.UsedInNonSelection:=ProcVar.UsedInNonSelection or UsedInNonSelection;
|
||||
end else begin
|
||||
NewProcVar:=TExtractedProcVariable.Create;
|
||||
NewProcVar.Node:=VarNode;
|
||||
@ -280,11 +280,11 @@ var
|
||||
// ToDo: Params.OnTopLvlIdentifierFound:=@OnTopLvlIdentifierFound;
|
||||
Params.SetIdentifier(Self,@Src[VarStartPos],@CheckSrcIdentifier);
|
||||
{$IFDEF CTDebug}
|
||||
DebugLn('AddVariableAtCursor A ',GetIdentifier(Params.Identifier));
|
||||
DebugLn('AddVariableAtCursor Searching ',GetIdentifier(Params.Identifier));
|
||||
{$ENDIF}
|
||||
if not FindDeclarationOfIdentAtCursor(Params) then begin
|
||||
{$IFDEF CTDebug}
|
||||
DebugLn('AddVariableAtCursor B found');
|
||||
DebugLn('AddVariableAtCursor B not found');
|
||||
{$ENDIF}
|
||||
exit;
|
||||
end;
|
||||
@ -344,7 +344,7 @@ var
|
||||
ChildNode: TCodeTreeNode;
|
||||
begin
|
||||
{$IFDEF CTDebug}
|
||||
DebugLn('TExtractProcTool.ScanNodesForVariables A ',StartNode.DescAsString);
|
||||
DebugLn('TExtractProcTool.ScanNodesForVariables A Node=',StartNode.DescAsString);
|
||||
{$ENDIF}
|
||||
Result:=false;
|
||||
ChildNode:=StartNode.FirstChild;
|
||||
@ -679,11 +679,11 @@ var
|
||||
VariableName:=GetIdentifier(@Src[ProcVar.Node.StartPos]);
|
||||
VarTypeNode:=FindTypeNodeOfDefinition(ProcVar.Node);
|
||||
{$IFDEF CTDebug}
|
||||
DebugLn('AAA1 VarTypeNode=',copy(Src,VarTypeNode.StartPos,VarTypeNode.EndPos-VarTypeNode.StartPos));
|
||||
DebugLn('TExtractProcTool.CreateProcVarSection VarTypeNode=',copy(Src,VarTypeNode.StartPos,VarTypeNode.EndPos-VarTypeNode.StartPos));
|
||||
{$ENDIF}
|
||||
TypeDefEndPos:=FindLineEndOrCodeAfterPosition(VarTypeNode.EndPos);
|
||||
{$IFDEF CTDebug}
|
||||
DebugLn('AAA2 PlusComment=',copy(Src,VarTypeNode.StartPos,TypeDefEndPos-VarTypeNode.StartPos));
|
||||
DebugLn('TExtractProcTool.CreateProcVarSection PlusComment=',copy(Src,VarTypeNode.StartPos,TypeDefEndPos-VarTypeNode.StartPos));
|
||||
{$ENDIF}
|
||||
VariableTypeCode:=copy(Src,VarTypeNode.StartPos,
|
||||
TypeDefEndPos-VarTypeNode.StartPos);
|
||||
|
Loading…
Reference in New Issue
Block a user