mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-27 23:44:00 +02:00
codetools: distinct dispinterface and other interfaces
git-svn-id: trunk@23500 -
This commit is contained in:
parent
9d62f8913b
commit
9e02d5824f
@ -4623,7 +4623,7 @@ function TCodeCompletionCodeTool.BuildUnitDefinitionGraph(out
|
||||
end;
|
||||
end;
|
||||
|
||||
ctnRecordType, ctnClassInterface, ctnClass, ctnObject,
|
||||
ctnRecordType, ctnClassInterface, ctnDispinterface, ctnClass, ctnObject,
|
||||
ctnObjCClass, ctnObjCCategory, ctnObjCProtocol, ctnCPPClass:
|
||||
begin
|
||||
ChildNode:=SubNode.FirstChild;
|
||||
|
@ -87,6 +87,7 @@ const
|
||||
ctnObjCCategory = 34;
|
||||
ctnObjCProtocol = 35;
|
||||
ctnCPPClass = 36;
|
||||
ctnDispinterface = 37;
|
||||
|
||||
ctnClassAbstract = 40;
|
||||
ctnClassSealed = 41;
|
||||
@ -165,10 +166,10 @@ const
|
||||
AllClassSections =
|
||||
AllClassBaseSections+AllClassTypeSections+AllClassVarSections;
|
||||
AllClasses =
|
||||
[ctnClass,ctnClassInterface,ctnObject,
|
||||
[ctnClass,ctnClassInterface,ctnDispinterface,ctnObject,
|
||||
ctnObjCClass,ctnObjCCategory,ctnObjCProtocol,
|
||||
ctnCPPClass];
|
||||
AllClassInterfaces = [ctnClassInterface,ctnObjCProtocol];
|
||||
AllClassInterfaces = [ctnClassInterface,ctnDispinterface,ctnObjCProtocol];
|
||||
AllClassObjects = [ctnClass,ctnObject,ctnObjCClass,ctnObjCCategory,ctnCPPClass];
|
||||
AllClassModifiers = [ctnClassAbstract, ctnClassSealed];
|
||||
AllDefinitionSections =
|
||||
@ -367,6 +368,7 @@ begin
|
||||
|
||||
ctnClass: Result:='Class';
|
||||
ctnClassInterface: Result:='Class Interface';
|
||||
ctnDispinterface: Result:='Dispinterface';
|
||||
ctnObject: Result:='Object';
|
||||
ctnObjCClass: Result:='ObjCClass';
|
||||
ctnObjCCategory: Result:='ObjCCategory';
|
||||
|
@ -540,7 +540,7 @@ begin
|
||||
if (SubDesc and ctnsNeedJITParsing)>0 then Result:=ctsUnparsed;
|
||||
end;
|
||||
ctnClass,ctnObject,ctnObjCClass,ctnObjCCategory,ctnObjCProtocol,
|
||||
ctnCPPClass,ctnClassInterface:
|
||||
ctnCPPClass,ctnClassInterface,ctnDispinterface:
|
||||
begin
|
||||
Result:='';
|
||||
if (SubDesc and ctnsForwardDeclaration)>0 then Result:=ctsForward;
|
||||
|
@ -2110,7 +2110,7 @@ begin
|
||||
TypeNode:=NewTool.FindTypeNodeOfDefinition(NewNode);
|
||||
if TypeNode<>nil then begin
|
||||
case TypeNode.Desc of
|
||||
ctnIdentifier, ctnClass, ctnClassInterface, ctnObject,
|
||||
ctnIdentifier, ctnClass, ctnClassInterface, ctnDispinterface, ctnObject,
|
||||
ctnObjCClass, ctnObjCCategory, ctnObjCProtocol, ctnCPPClass:
|
||||
begin
|
||||
NewTool.MoveCursorToNodeStart(TypeNode);
|
||||
@ -2871,7 +2871,7 @@ var
|
||||
// of the prior node
|
||||
;
|
||||
|
||||
ctnClass, ctnClassInterface, ctnObject,
|
||||
ctnClass, ctnClassInterface, ctnDispinterface, ctnObject,
|
||||
ctnObjCClass, ctnObjCCategory, ctnObjCProtocol, ctnCPPClass,
|
||||
ctnRecordType, ctnRecordCase:
|
||||
// do not search again in this node, go on ...
|
||||
@ -2981,7 +2981,7 @@ begin
|
||||
ctnClassPublic, ctnClassPrivate, ctnClassProtected, ctnClassPublished,
|
||||
ctnClassTypePublished,ctnClassTypePublic,ctnClassTypeProtected,ctnClassTypePrivate,
|
||||
ctnClassVarPublished,ctnClassVarPublic,ctnClassVarProtected,ctnClassVarPrivate,
|
||||
ctnClass, ctnClassInterface, ctnObject,
|
||||
ctnClass, ctnClassInterface, ctnDispinterface, ctnObject,
|
||||
ctnObjCClass, ctnObjCCategory, ctnObjCProtocol, ctnCPPClass,
|
||||
ctnRecordType, ctnRecordVariant,
|
||||
ctnParameterList:
|
||||
@ -6516,7 +6516,7 @@ var
|
||||
ExprType.Context:=ExprType.Context.Tool.FindBaseTypeOfNode(Params,
|
||||
ExprType.Context.Node.FirstChild);
|
||||
|
||||
ctnClass, ctnClassInterface, ctnObject,
|
||||
ctnClass, ctnClassInterface, ctnDispinterface, ctnObject,
|
||||
ctnObjCClass, ctnObjCCategory, ctnObjCProtocol, ctnCPPClass,
|
||||
ctnProperty, ctnGlobalProperty:
|
||||
begin
|
||||
@ -8029,7 +8029,7 @@ begin
|
||||
// same context type
|
||||
case ExprNode.Desc of
|
||||
|
||||
ctnClass,ctnClassInterface, ctnObject,
|
||||
ctnClass, ctnClassInterface, ctnDispinterface, ctnObject,
|
||||
ctnObjCClass, ctnObjCCategory, ctnObjCProtocol, ctnCPPClass:
|
||||
// check, if ExpressionType.Context is descend of TargetContext
|
||||
if ContextIsDescendOf(ExpressionType.Context,
|
||||
@ -9563,7 +9563,7 @@ begin
|
||||
Result:=GetIdentifier(@FindContext.Tool.Src[ANode.StartPos]);
|
||||
end;
|
||||
|
||||
ctnClass, ctnClassInterface, ctnObject,
|
||||
ctnClass, ctnClassInterface, ctnDispinterface, ctnObject,
|
||||
ctnObjCClass, ctnObjCCategory, ctnObjCProtocol, ctnCPPClass:
|
||||
if (FindContext.Node.Parent<>nil)
|
||||
and (FindContext.Node.Parent.Desc in [ctnTypeDefinition,ctnGenericType])
|
||||
|
@ -1497,7 +1497,7 @@ begin
|
||||
Add('destructor');
|
||||
end;
|
||||
|
||||
ctnClassInterface,ctnObjCProtocol,ctnCPPClass:
|
||||
ctnClassInterface,ctnDispinterface,ctnObjCProtocol,ctnCPPClass:
|
||||
begin
|
||||
Add('procedure');
|
||||
Add('function');
|
||||
|
@ -1149,7 +1149,6 @@ begin
|
||||
with PackedTypesKeyWordFuncList do begin
|
||||
Add('CLASS',{$ifdef FPC}@{$endif}AllwaysTrue);
|
||||
Add('OBJECT',{$ifdef FPC}@{$endif}AllwaysTrue);
|
||||
Add('DISPINTERFACE',{$ifdef FPC}@{$endif}AllwaysTrue);
|
||||
Add('ARRAY',{$ifdef FPC}@{$endif}AllwaysTrue);
|
||||
Add('SET',{$ifdef FPC}@{$endif}AllwaysTrue);
|
||||
Add('RECORD',{$ifdef FPC}@{$endif}AllwaysTrue);
|
||||
@ -1160,7 +1159,6 @@ begin
|
||||
with BitPackedTypesKeyWordFuncList do begin
|
||||
Add('CLASS',{$ifdef FPC}@{$endif}AllwaysTrue);
|
||||
Add('OBJECT',{$ifdef FPC}@{$endif}AllwaysTrue);
|
||||
Add('DISPINTERFACE',{$ifdef FPC}@{$endif}AllwaysTrue);
|
||||
Add('ARRAY',{$ifdef FPC}@{$endif}AllwaysTrue);
|
||||
Add('SET',{$ifdef FPC}@{$endif}AllwaysTrue);
|
||||
Add('RECORD',{$ifdef FPC}@{$endif}AllwaysTrue);
|
||||
|
@ -3567,6 +3567,9 @@ begin
|
||||
ChildCreated:=true; // maybe change this in future to jit parsing
|
||||
if UpAtomIs('INTERFACE') then
|
||||
IntfDesc:=ctnClassInterface
|
||||
else
|
||||
if UpAtomIs('DISPINTERFACE') then
|
||||
IntfDesc:=ctnDispinterface
|
||||
else
|
||||
IntfDesc:=ctnObjCProtocol;
|
||||
if ChildCreated then begin
|
||||
@ -4658,7 +4661,7 @@ procedure TPascalParserTool.BuildSubTree(ANode: TCodeTreeNode);
|
||||
begin
|
||||
if ANode=nil then exit;
|
||||
case ANode.Desc of
|
||||
ctnClass,ctnClassInterface,ctnObject,
|
||||
ctnClass,ctnClassInterface,ctnDispinterface,ctnObject,
|
||||
ctnObjCClass,ctnObjCCategory,ctnObjCProtocol,ctnCPPClass:
|
||||
BuildSubTreeForClass(ANode);
|
||||
ctnProcedure,ctnProcedureHead:
|
||||
|
@ -6614,7 +6614,7 @@ begin
|
||||
Node:=Tree.Root;
|
||||
while Node<>nil do begin
|
||||
case Node.Desc of
|
||||
ctnClass,ctnClassInterface,ctnObject,
|
||||
ctnClass,ctnClassInterface,ctnDispinterface,ctnObject,
|
||||
ctnObjCClass,ctnObjCCategory,ctnObjCProtocol,ctnCPPClass:
|
||||
BuildSubTreeForClass(Node);
|
||||
ctnProcedure,ctnProcedureHead:
|
||||
|
Loading…
Reference in New Issue
Block a user