mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-18 21:42:51 +02:00
implemented showing proc specifiers in codeexplorer
git-svn-id: trunk@6405 -
This commit is contained in:
parent
9a37fb3c97
commit
53d6e145dc
@ -61,6 +61,7 @@ type
|
|||||||
phpWithResultType, // extract colon + result type
|
phpWithResultType, // extract colon + result type
|
||||||
phpWithOfObject, // extract 'of object'
|
phpWithOfObject, // extract 'of object'
|
||||||
phpWithCallingSpecs, // extract cdecl; inline;
|
phpWithCallingSpecs, // extract cdecl; inline;
|
||||||
|
phpWithProcModifiers, // extract forward; alias; external;
|
||||||
phpWithComments, // extract comments and spaces
|
phpWithComments, // extract comments and spaces
|
||||||
phpInUpperCase, // turn to uppercase
|
phpInUpperCase, // turn to uppercase
|
||||||
phpCommentsToSpace, // replace comments with a single space
|
phpCommentsToSpace, // replace comments with a single space
|
||||||
@ -244,6 +245,7 @@ const
|
|||||||
'phpWithResultType',
|
'phpWithResultType',
|
||||||
'phpWithOfObject',
|
'phpWithOfObject',
|
||||||
'phpWithCallingSpecs',
|
'phpWithCallingSpecs',
|
||||||
|
'phpWithProcModifiers',
|
||||||
'phpWithComments',
|
'phpWithComments',
|
||||||
'phpInUpperCase',
|
'phpInUpperCase',
|
||||||
'phpCommentsToSpace',
|
'phpCommentsToSpace',
|
||||||
|
@ -418,20 +418,22 @@ begin
|
|||||||
if CurPos.Flag=cafSemicolon then
|
if CurPos.Flag=cafSemicolon then
|
||||||
ExtractNextAtom(true,Attr);
|
ExtractNextAtom(true,Attr);
|
||||||
// read specifiers
|
// read specifiers
|
||||||
if phpWithCallingSpecs in Attr then begin
|
if [phpWithCallingSpecs,phpWithProcModifiers]*Attr<>[] then begin
|
||||||
while (CurPos.StartPos<=ProcNode.FirstChild.EndPos) do begin
|
while (CurPos.StartPos<=ProcNode.FirstChild.EndPos) do begin
|
||||||
if CurPos.Flag=cafSemicolon then begin
|
if CurPos.Flag=cafSemicolon then begin
|
||||||
ExtractNextAtom(false,Attr);
|
ExtractNextAtom(phpWithProcModifiers in Attr,Attr);
|
||||||
end else begin
|
end else begin
|
||||||
if (UpAtomIs('INLINE') or UpAtomIs('CDECL')) then begin
|
if (UpAtomIs('INLINE') or UpAtomIs('CDECL')) then begin
|
||||||
ExtractNextAtom(phpWithCallingSpecs in Attr,Attr);
|
ExtractNextAtom([phpWithCallingSpecs,phpWithProcModifiers]*Attr<>[],
|
||||||
ExtractMemStream.Write(';',1);
|
Attr);
|
||||||
|
if not (phpWithProcModifiers in Attr) then
|
||||||
|
ExtractMemStream.Write(';',1);
|
||||||
end
|
end
|
||||||
else if (CurPos.Flag=cafEdgedBracketOpen) then begin
|
else if (CurPos.Flag=cafEdgedBracketOpen) then begin
|
||||||
ReadTilBracketClose(false);
|
ReadTilBracketClose(false);
|
||||||
ExtractNextAtom(false,Attr);
|
ExtractNextAtom(phpWithProcModifiers in Attr,Attr);
|
||||||
end else begin
|
end else begin
|
||||||
ExtractNextAtom(false,Attr);
|
ExtractNextAtom(phpWithProcModifiers in Attr,Attr);
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
@ -257,7 +257,7 @@ begin
|
|||||||
Result:=ACodeTool.ExtractProcHead(CodeNode,
|
Result:=ACodeTool.ExtractProcHead(CodeNode,
|
||||||
[phpWithStart,phpWithVarModifiers,
|
[phpWithStart,phpWithVarModifiers,
|
||||||
phpWithParameterNames,phpWithDefaultValues,phpWithResultType,
|
phpWithParameterNames,phpWithDefaultValues,phpWithResultType,
|
||||||
phpWithOfObject,phpWithCallingSpecs]);
|
phpWithOfObject,phpWithCallingSpecs,phpWithProcModifiers]);
|
||||||
|
|
||||||
ctnProperty:
|
ctnProperty:
|
||||||
Result:='property '+ACodeTool.ExtractPropName(CodeNode,false);
|
Result:='property '+ACodeTool.ExtractPropName(CodeNode,false);
|
||||||
@ -352,10 +352,10 @@ begin
|
|||||||
NodeImageIndex:=GetNodeImage(CodeNode);
|
NodeImageIndex:=GetNodeImage(CodeNode);
|
||||||
if InFrontViewNode<>nil then
|
if InFrontViewNode<>nil then
|
||||||
ViewNode:=CodeTreeview.Items.InsertObjectBehind(
|
ViewNode:=CodeTreeview.Items.InsertObjectBehind(
|
||||||
InFrontViewNode,NodeText,NodeData)
|
InFrontViewNode,NodeText,NodeData)
|
||||||
else if ParentViewNode<>nil then
|
else if ParentViewNode<>nil then
|
||||||
ViewNode:=CodeTreeview.Items.AddChildObject(
|
ViewNode:=CodeTreeview.Items.AddChildObject(
|
||||||
ParentViewNode,NodeText,NodeData)
|
ParentViewNode,NodeText,NodeData)
|
||||||
else
|
else
|
||||||
ViewNode:=CodeTreeview.Items.AddObject(nil,NodeText,NodeData);
|
ViewNode:=CodeTreeview.Items.AddObject(nil,NodeText,NodeData);
|
||||||
ViewNode.ImageIndex:=NodeImageIndex;
|
ViewNode.ImageIndex:=NodeImageIndex;
|
||||||
|
Loading…
Reference in New Issue
Block a user