mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-22 14:19:42 +02:00
implemented add file to a package dialog
git-svn-id: trunk@3152 -
This commit is contained in:
parent
7762fc3ae7
commit
602eb57081
@ -2073,7 +2073,12 @@ var CleanCursorPos, Indent, insertPos: integer;
|
|||||||
Params.Flags:=[fdfSearchInParentNodes,fdfSearchInAncestors,
|
Params.Flags:=[fdfSearchInParentNodes,fdfSearchInAncestors,
|
||||||
fdfTopLvlResolving,fdfFindVariable];
|
fdfTopLvlResolving,fdfFindVariable];
|
||||||
if (not FindDeclarationOfIdentAtCursor(Params))
|
if (not FindDeclarationOfIdentAtCursor(Params))
|
||||||
or (Params.NewNode.Desc<>ctnProperty) then exit;
|
or (Params.NewNode.Desc<>ctnProperty) then begin
|
||||||
|
{$IFDEF CTDEBUG}
|
||||||
|
writeln('FindEventTypeAtCursor not a property');
|
||||||
|
{$ENDIF}
|
||||||
|
exit;
|
||||||
|
end;
|
||||||
PropertyContext:=CreateFindContext(Params);
|
PropertyContext:=CreateFindContext(Params);
|
||||||
// identifier is property
|
// identifier is property
|
||||||
// -> check type of property
|
// -> check type of property
|
||||||
@ -2081,8 +2086,12 @@ var CleanCursorPos, Indent, insertPos: integer;
|
|||||||
ProcContext:=PropertyContext.Tool.FindBaseTypeOfNode(
|
ProcContext:=PropertyContext.Tool.FindBaseTypeOfNode(
|
||||||
Params,PropertyContext.Node);
|
Params,PropertyContext.Node);
|
||||||
if (ProcContext.Node=nil) or (ProcContext.Node.Desc<>ctnProcedureType)
|
if (ProcContext.Node=nil) or (ProcContext.Node.Desc<>ctnProcedureType)
|
||||||
then
|
then begin
|
||||||
|
{$IFDEF CTDEBUG}
|
||||||
|
writeln('FindEventTypeAtCursor not a procedure type');
|
||||||
|
{$ENDIF}
|
||||||
exit;
|
exit;
|
||||||
|
end;
|
||||||
// identifier is property of type proc => this is an event
|
// identifier is property of type proc => this is an event
|
||||||
Result:=true;
|
Result:=true;
|
||||||
end;
|
end;
|
||||||
@ -2126,11 +2135,14 @@ var CleanCursorPos, Indent, insertPos: integer;
|
|||||||
begin
|
begin
|
||||||
Result:=false;
|
Result:=false;
|
||||||
ProcNode:=CursorNode;
|
ProcNode:=CursorNode;
|
||||||
while (ProcNode<>nil) and (ProcNode.Desc<>ctnProcedure) do
|
while (ProcNode<>nil) do begin
|
||||||
|
if (ProcNode.Desc=ctnProcedure) then begin
|
||||||
|
SearchedClassname:=ExtractClassNameOfProcNode(ProcNode);
|
||||||
|
if SearchedClassName<>'' then break;
|
||||||
|
end;
|
||||||
ProcNode:=ProcNode.Parent;
|
ProcNode:=ProcNode.Parent;
|
||||||
|
end;
|
||||||
if (ProcNode=nil) then exit;
|
if (ProcNode=nil) then exit;
|
||||||
SearchedClassname:=ExtractClassNameOfProcNode(ProcNode);
|
|
||||||
if SearchedClassname='' then exit;
|
|
||||||
ANode:=FindFirstNodeOnSameLvl(ProcNode);
|
ANode:=FindFirstNodeOnSameLvl(ProcNode);
|
||||||
if (ANode=nil) then exit;
|
if (ANode=nil) then exit;
|
||||||
// search class node
|
// search class node
|
||||||
|
Loading…
Reference in New Issue
Block a user